Daniel Elliott

Volumetric Scattering in Unreal Engine 4 ideas UPDATE 1

Here’s a test I managed to get going. It’s pretty bare bones. but as a proof of concept it works.


There are some limitations and drawbacks right now.

a) It’s slow. The inital tracing is fine, its the shadow traces that really bog it down. Although 30fps isn’t too bad for this kind of look. It might be possible to do this on a mesh quad on a translucent material in separate translucency, then we could lower the res to 50% or so and get the speed back up. Also there are probably optimizations I can do to speed up the tracing.

b) The step sizes are based on the distance to nearest point so when the shadow samples are taken I’m just testing to see if it eventually occluded and just set the light to 0 for that trace. The problem is that the tracing jumps in non constant sizes and you see jumps in darkness. Linear stepping would help this or I need to look at a cleverer way of doing the shadow/shaft part.

c) Not sure if this is a bug or not but When the game is played, the distance fields don’t work for post processing. If this was a translucent quad I’m guessing this would work. That’s next on the list to try.

Leave a Reply

Your email address will not be published. Required fields are marked *