Fog Problems When Looking Up.
by Jason Gossiaux · in Torque Game Engine · 12/09/2007 (1:30 pm) · 2 replies
I recently implemented the fractal clouds resource, and it is working fine. However I am attempting to use Fog to shade the clouds and sky, and am running into some issues.
The biggest issue seems to be that no matter how I configure my fog, it is always missing along an area above me. So the sky and clouds are properly shaded when looking horizontally, but when I look up you see this area that isn't being affected by the fog.
I realize that many issues exist with fog - specifically that the individual fog layer colors don't work and so on... but that shouldn't be a problem? I'm just not sure how to get the fog to fill in above me without totally blocking the visibility of the clouds. Any help is appreciated.
The biggest issue seems to be that no matter how I configure my fog, it is always missing along an area above me. So the sky and clouds are properly shaded when looking horizontally, but when I look up you see this area that isn't being affected by the fog.
I realize that many issues exist with fog - specifically that the individual fog layer colors don't work and so on... but that shouldn't be a problem? I'm just not sure how to get the fog to fill in above me without totally blocking the visibility of the clouds. Any help is appreciated.
About the author
#2
It looks like one of the Fractal Sky resources was using the Fog color to color the cloud background. This one suffers from the ring around the top of the player that isn't fogged. Its probably some aspect of the system (limitation?) that I am not understanding. Very odd.
The other resource was using the absolute sky color to color the cloud background. This is a better solution that frees up the fog for hiding the horizon
The clouds from those first two resources are just alpha blends of the background, from transparent to white.
Finally, a third resource has a third cloud layer that is "darker" to simulate storm clouds. So, to acheive realistic nighttime clouds (and better shaded daytime ones too) I just need to expose whatever code is coloring that third layer. Probably not hard.
I hope this helps anyone in the future that is looking to use just the fractal sky resource, and that has some questions regarding how it all works :P
12/09/2007 (11:07 pm)
Alright so I think I got it figured out. Geesh resources can get mixed up over time. It looks like one of the Fractal Sky resources was using the Fog color to color the cloud background. This one suffers from the ring around the top of the player that isn't fogged. Its probably some aspect of the system (limitation?) that I am not understanding. Very odd.
The other resource was using the absolute sky color to color the cloud background. This is a better solution that frees up the fog for hiding the horizon
The clouds from those first two resources are just alpha blends of the background, from transparent to white.
Finally, a third resource has a third cloud layer that is "darker" to simulate storm clouds. So, to acheive realistic nighttime clouds (and better shaded daytime ones too) I just need to expose whatever code is coloring that third layer. Probably not hard.
I hope this helps anyone in the future that is looking to use just the fractal sky resource, and that has some questions regarding how it all works :P
Torque Owner Jason Gossiaux
Indie Dev
Typically when reading through the various Day/Night resources, people discuss how they use Fog to color clouds better. With this method they can simulate the grey cloud cover that accompanies nighttime. However I cannot find a way to make the fog extend high enough without obscuring the horizontal view, or leaving a gap above the player.
I think a better method might just be to edit the sky code to color the clouds as you need them to be colored... which I'll probably end up doing. But I can see where an underwater game would be severely affected by this fog issue. Its baffling... because I see so many old screenshots where the fog is 360 degrees.