Realistic Fog

Started by
8 comments, last by EAX 22 years, 4 months ago
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
EAX
Advertisement
I''ve thought the same thing before...
If at first you don't succeed, redefine success.
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.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
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!
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...
DigitalBlur
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
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Actually I didn''t even mention the fog to her.

EAX
EAX
http://www.gamasutra.com/features/20011003/boyd_01.htm

Think you need to register to view.

xyzzy
I think a combination of volumetric fog and some sort of particle effects could do the trick. I do agree, Quake 3''s fog did look quite good.

Moe''s site
This sort of reminds me of someone on here saying that they knew they had been programming too much when they walked outside, looked at a tree and thought look at the polygon count and textures on that
Keys to success: Ability, ambition and opportunity.

This topic is closed to new replies.

Advertisement