Archived

This topic is now archived and is closed to further replies.

EAX

Realistic Fog

Recommended Posts

While I was driving my girlfriend home tonight, I was looking at the fog. I noticed that it was constantly changing density in different places. I''ve seen fog in 3D Graphics engines and demos before, but I haven''t seen any the recreated fog in this manner. I don''t know if there are any that do or not, but that is something I was wondering about. Sometimes the density of the fog would be thick and last a while, but other times it would keep changing from thick to thin. I would think programming fog to be like that would be more realistic... I''m not exactly sure how it would be done, or if it has been done already. I would appreciate any responses even though there isn''t really any particular question. Anyway, thanks for reading this all the way through(if you did read it all the way through.) EAX

Share this post


Link to post
Share on other sites
Your talking about volumetric fog. I''ve seen it implemented in ray tracers and have even worked on implementing it in a ray tracer. With that knowledge I can tell you that the computations required to implement it in a game type program is not a trivial task and requires a massive amount of computational time. I have ideas on how it might be done but it would not be easy.
With a uniform fog you simply use the distance from the camera as a reference of how much fog color to add to the pixel. with clumps of fog you have to first determine what pixes are covered with the clump and then how thick the clump is at that point and apply the appropriate coloration to the pixel.
Any time the view point moves the pixels that are affected by any one clump change. with the flat fog it''s a uniform effect.

I hope that helps clear up the question. If you do find a way to do it in real time please let me know.

Share this post


Link to post
Share on other sites
You can do another texture pass over objects with an animated cloudy texture and also use standard depth fog. Quake III does something like this, and it looks quite good, even if it isn''t really physically accurate.

To do true volumetric fog you''d have to do backward raytracing from a certain distance to your camera, getting a cumulative fog color for each pixel.

Another trick for small foggy/smokey areas is to use lots of billboards. It looks quite good, but wil make the system die if used too much!

Share this post


Link to post
Share on other sites
What''s to stop you from using spherical fog volumes with a medium to small radius and clump them together? That way as you walk from one sphere volume to another the density will change.

Theres my two cents any way...

Share this post


Link to post
Share on other sites
what the hell are you doing driving your girlfriend home in dense fog? that''s dangerous. coulda killed her. not only that, you start observing the fog? that''s worse. keep your eyes on the road. that''s two lives you''re putting at risk. on top of that, you were probably telling your girlfriend about the fog. you swear she was interested, probably just made her feel insecure that you care more about fog than her. honestly...

=)

a2k

Share this post


Link to post
Share on other sites