Announcement

Collapse
No announcement yet.

Creating atmosphere without fog volumes?

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

  • replied
    Thats pretty awesome. Thanks for sharing. Want to test it on one of my mobile games... definitely sounds less heavy than actual fog volumes

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    @Arnage
    Thank you. Much appreciated.

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

    Thank you cinebeast

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    This isn't really helpful, but I just wanted to say that your game looks beautiful.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:

Working...
X