Game Development Community

SkyscatterSky and Fog

by Jaimi McEntire · in Torque 3D Professional · 07/07/2009 (10:19 am) · 4 replies

Is there a way to make the scatter sky gradient at the horizon the same as the fog color? I always get a burnt orange color, and I'm trying to get my scene to "fog out" better.

#1
07/07/2009 (10:39 am)
Check out the latest docs for it. You can change the fog to match the horizon color. You will also want to mess with the rayleigh and mie scattering.
#2
07/07/2009 (11:14 am)
The scattersky really looks great, and it's really powerful. Unfortunately, it's a bit of a pain when your horizon is exposed, and things start clipping at the far plane. I can't seem to get everything to fog just right and look right, and all the color guessing is driving me nuts. I sort of miss the old "renderbans". Hopefully this will become easier to handle in the future.
#3
07/07/2009 (1:35 pm)
The ScatterSky will actually sample around the horizon to calculate a fog color, which it sets on the SceneGraph. Unfortunately a single "average" fog color cannot actually match the exact color of the sky at any one section of the horizon ...

If there is enough fog (in reality) you could not actually see the horizon so maybe the ScatterSky should be able to render a fog band that alphas in based on fog density?

It does seem a bit of a waste though to be doing all the scattering calculations to get a nice horizon line-color just to end up covering it up with a solid color gradient... but honestly if the fog is very dense it might look better and actually be more realistic.
#4
07/07/2009 (1:41 pm)
Quote:If there is enough fog (in reality) you could not actually see the horizon so maybe the ScatterSky should be able to render a fog band that alphas in based on fog density?

I think this is a great idea. The scatter sky blends well into a water plain, but I have none, and a ground plane clips at the far plane just like everything else. I've tried to match the fog color, but you can still see the edges of the sky dome at the horizon. I think a fog band would fix all of these.