Senior Production – Week 3

I did not do much this week aside from looking at doing exponential falloff height fog and putting in more animation for zombies. I need to tune the fog some more, but having just a constant fog falloff does not look that good when it’s intended to be seen as low-laying fog. When its falloff is over hundreds of feet then it looks decent, but when it falls off after a foot from the ground, it just looks weird.

I’m using http://www.iquilezles.org/www/articles/fog/fog.htm as a reference for the fog falloff. The fog looks really nice when it’s applied to stuff the scale of mountain ranges, but even with the falloff it does not look quite right at smaller scales. There are two solutions that I can think of at the moment. The first is to just replace the fog evaluator in the shader with a particle system that covers the level. The two issues with this is that I’m not sure how apparent the particle clipping will be when they intersect the player and ground and I’m not sure how many particles will be needed to have a good effect/how well they will perform. It looks like Unity might have a way to solve this using the overlay tag in the RenderQueue property, but it’s not entirely clear about what it does. The second solution is to ray march through a fog volume and take around 3 or 4 samples at points along the ray towards the ground. At each sample I could either sample a 3D noise texture or calculate fractional Brownian motion in 3D to determine the density of the fog at that point. This would probably give the best overall effect after some tweaking of parameters, but again I’m not sure how well it will perform.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>