Announcement

Collapse
No announcement yet.

Creating atmosphere without fog volumes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating atmosphere without fog volumes?

    Hi.

    I am trying to find viable ways of creating a nice atmosphere for my game.

    I have been working on this specific issue since i got unreal engine 4 last year October sometime. Its the first thing i checked because it was or is the most important thing for me regarding rendering the game.
    I still have not come up with a viable solution.

    Epic staff suggested i use fog sheets... but this is not yielding satisfactory results as its effectively just creating an overlay effect.
    I am strongly of the opinion only fog volumes or occlusion of atmospheric fog will give me what i want. But neither of those exist.

    It would be very much appreciated if anyone can give me a solution or point me in the right direction.

    Above Ground Desired Result
    Click image for larger version

Name:	b14f2125c6.jpg
Views:	1
Size:	192.2 KB
ID:	1147184

    Cave areas desired result
    Click image for larger version

Name:	6bca80a5d6.jpg
Views:	1
Size:	131.5 KB
ID:	1147185

    Actual cave area results
    Click image for larger version

Name:	53f02261c2.jpg
Views:	1
Size:	145.3 KB
ID:	1147186

    I honestly don't know what else to try.
    http://celestialarch.com
    Free UE4 things available. More coming

    #2
    Oh yes. It might be worth mentioning that i did try to create everything with just fog sheets. And disabling atmospheric fog. This looked good yes. But performance hit was significant. I mean it went from 45fps to 4fps by using these massive fog sheets in the level.
    http://celestialarch.com
    Free UE4 things available. More coming

    Comment


      #3
      Have you already tried using the ExponentialHeightFog actor without success? Inside a cave it would probably look pretty close to your desired cave image, using a lower Density value and setting the Start Distance out far enough from the player. Also try out different color values, using a darker color should add to the effect. On top of that add in some PP effects and you should be able to get your desired result with much less of a performance hit.

      You would want to turn it on using a trigger of some sort so it's only visible inside the cave though, or at least modify the settings when the player leaves the cave. I use a similar setup for underwater effects and it works pretty well once you get the settings tweaked.
      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

      Comment


        #4
        Unfortunately i have tried exp height fog as well.
        The problem is i need the fog to start at the players location. Which results in this issue.

        I also searched trello. Doesnt look like fog volumes are on the cards.
        http://celestialarch.com
        Free UE4 things available. More coming

        Comment


          #5
          Have you considered a post process material? To recreate the fog effect just blend based on scene depth and to mask out the caves (or even create a nice transition between the two) you could use the pixel's world position.

          Comment


            #6
            Man what an experience. You know... when i run into stuff like this i get angry. But its this anger that drives me to keep reading and keep experimenting until i find something i like.

            I eventually did go with fog sheets. And to demonstrate how well it changes color i added some blue near the cave entrance for demonstration purposes.
            As for the performance hit. I soon realized the only reason i was having this, is because at fullscreen my game performs at a terrible rate.

            Only when there is absolutely nothing to render does it render well. Which i know is related to my GFX cart...
            Anycase.

            Fog Sheets seem to be the way to go after all. Well, that and a healthy combination of adjusting Sky color to compensate in areas.

            Click image for larger version

Name:	258bca5378.jpg
Views:	1
Size:	255.2 KB
ID:	1071578
            http://celestialarch.com
            Free UE4 things available. More coming

            Comment


              #7
              Originally posted by Arnage View Post
              Have you considered a post process material? To recreate the fog effect just blend based on scene depth and to mask out the caves (or even create a nice transition between the two) you could use the pixel's world position.
              Hi.

              Edit : ok its been long day i completely misread your post.
              I need to go read and research on this masking out areas thing.

              If you know the document that refers to this please point me there. Or if you would be so kind to give a brief explanation of what im researching.
              I know what masking is, but how i would go about masking something... perhaps something similar to a world based location, like the example they used to make things transparent around the player... i can use that i guess... then just add sphere or other things where i want the masking to occur... hmmm.

              Am i on the right track?
              Thx man... sorry had too much coffee
              Last edited by C-Arch; 03-30-2015, 05:44 PM.
              http://celestialarch.com
              Free UE4 things available. More coming

              Comment


                #8
                This isn't really helpful, but I just wanted to say that your game looks beautiful.
                I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                You can e-mail me at cinebst@gmail.com.

                Comment


                  #9
                  Originally posted by Crocopede View Post
                  Oh yes. It might be worth mentioning that i did try to create everything with just fog sheets. And disabling atmospheric fog. This looked good yes. But performance hit was significant. I mean it went from 45fps to 4fps by using these massive fog sheets in the level.
                  Maybe add the fog just to the player character blueprint, instead to the entire level?
                  LEGENDS of EPICA [Twitter] [Facebook] [YouTube] [Vimeo]

                  Comment


                    #10
                    Originally posted by Crocopede View Post
                    Hi.

                    Edit : ok its been long day i completely misread your post.
                    I need to go read and research on this masking out areas thing.

                    If you know the document that refers to this please point me there. Or if you would be so kind to give a brief explanation of what im researching.
                    I know what masking is, but how i would go about masking something... perhaps something similar to a world based location, like the example they used to make things transparent around the player... i can use that i guess... then just add sphere or other things where i want the masking to occur... hmmm.

                    Am i on the right track?
                    Thx man... sorry had too much coffee
                    Here's an example:

                    Click image for larger version

Name:	PostProcessFog.jpg
Views:	1
Size:	28.6 KB
ID:	1071598

                    And the post process material:

                    Click image for larger version

Name:	PostProcessFogNodes.png
Views:	1
Size:	161.5 KB
ID:	1071599

                    I hope that explains it a little better. Let me know if anything else is unclear.

                    Note that this is not really physically accurate because only the geometry location defines the fog color. It would be more correct to consider the colors along a ray from the camera to the geometry. However, that would complicate the shader and seemed unnecessary for your use case.

                    Comment


                      #11
                      @Arnage
                      Thank you. Much appreciated.

                      @Unit23
                      I want more control so rather adding them manually.

                      Thank you cinebeast
                      http://celestialarch.com
                      Free UE4 things available. More coming

                      Comment


                        #12
                        The best thing would just be if Epic would allow to tweak the heightfog locally via post volumes! This way you could have 1 heightfog actor but many different settings for it based on post volumes for different areas (and it would be awesome to be able to apply a material to the fog to get some animation going on in there^^). I remember that we actually integrated something like this into Unreal 3 back in the days when we worked on Spec Ops, so this shouldnt be to crazy to reimplement into Unreal 4. But then...I am no graphics programmer^^

                        Cheers!
                        Check out UNREAL 4 Lighting Academy
                        https://forums.unrealengine.com/show...ng-like-that-)

                        Comment


                          #13
                          Hi Crocopede,

                          I am using basically the same trick as Arnage, the only differences are:
                          - I am calculating the fog in my regular materials for my objects, not in a post process one
                          - I am using Material Parameter Collection values to control everything globally- this would give you some desired control you where writting about here
                          - and I am getting my distance for the fog in another way (as this is not a post process mat), you can get it from the object's position on specific axis if your camera is fixed, you can calculate object's distance from the camera, or you can calculate pixel's distance from the camera, all tested and works beautifully

                          Click image for larger version

Name:	fog.png
Views:	1
Size:	230.8 KB
ID:	1071817

                          I am using this method for an unlit mobile environment and it runs around 55FPS on Adreno 305, that 5FPS noticed after adding the UMG HUD. And it looks like that:
                          Click image for larger version

Name:	frogme.jpg
Views:	1
Size:	126.0 KB
ID:	1071820

                          So if you are looking for some performance improvements this method might be worth exploring.
                          Attached Files

                          Comment


                            #14
                            Pretty clever man. I was wondering what the results would be like if applied to all materials and not fog volumes.
                            Is your performance still good running it on all materials?
                            http://celestialarch.com
                            Free UE4 things available. More coming

                            Comment


                              #15
                              Originally posted by Crocopede View Post
                              Pretty clever man. I was wondering what the results would be like if applied to all materials and not fog volumes.
                              Is your performance still good running it on all materials?
                              Yes, this 55FPS on Adreno 305 is with the scene that you can see at the screenshot, and most of the stuff here is using this "fog" calculation.

                              Comment

                              Working...
                              X