PDA

View Full Version : Distance color attenuation


smg0000
10-15-2006, 11:24 AM
Hi everyone, i come up with an issue that's been talked about over and over again in the past years and for which i tried to find solutions all this time but none of them worked as they were suposed to. Now i will cut to the chase showing off the most basic example of a scene:

I thought i'd find what i needed in the technique used in games. It's all about creating that outdoor mood. A sunset scene for example. You walk around in the middle of a street surounded by tall buildings. You will notice that besides the warm atmosphere and those slightly smooth casted shadows, the blocks right near you are perfectly visible while those situated at a distance seem to blend with that orange background creating an effect of some sort of fog. When i started this thread i didn't even know how to call it (i still don't) but i thought it's got something with attenuation or falloff or fog... i don't know. That's why i came here to ask for some help. Here 5 links to some screenshots from Valve's Half-Life 2:

http://www.ixbt.com/games/images/halflife2/hl2_01.jpg
http://www.russellmcwhae.com/data/images/desktop-backgrounds/half-life-2-swamp.jpg
http://www.sg.hu/kep/2003_10/1008halflife4.jpg
http://burn.d3vour.com/gambar/hl2ep1/screenshot_3.jpg
http://img.hrej.cz/66/49a22fc210806f6e78f9a3a2d44f44.jpg

Despite the relatively small size, the last image represents that effect the best. You can notice in every image there that all he geometry seems to lose opacity in the distance. And that's exactly what's been killing me all this time.

I'd appreciate a lot if anyone could give me some tips for how to work that out (the more simple - the better... like i wouldn't necessarily want to use any external software... but if there's no other way...)

gringer
10-17-2006, 02:40 AM
Hi,

Mental Ray has a shader called Lume Mist. I've not used it before, however the example shots looked as if it was pretty flexible. Perhaps it's worth checking out?

http://www.lume.com/manual/html/Mist.html

Cheers :D

CaptainObvious
10-18-2006, 11:52 AM
Every single 3D app I have ever used supports basic fog effects like this.
Basically, just find your package's most simple fog effect and use it. The color should be almost white, with a color similar to the backdrop. So slightly blue on a sunny day.

JamesMK
10-18-2006, 12:57 PM
For optimum control and tweakability, just render out a depth pass from your 3D app and use that to add distance haze in post - that's usually a safe bet since you don't run the risk of having to rerender stuff in case the fog effect turns out too strong or too weak.

You can, technically speaking, do things like this with lights too, by using a bunch of spots way back in the distance restricted to the objects you want to appear hazy, and set their colour to something similar to the sky backdrop.

smg0000
10-18-2006, 01:34 PM
For optimum control and tweakability, just render out a depth pass from your 3D app and use that to add distance haze in post - that's usually a safe bet since you don't run the risk of having to rerender stuff in case the fog effect turns out too strong or too weak.

You can, technically speaking, do things like this with lights too, by using a bunch of spots way back in the distance restricted to the objects you want to appear hazy, and set their colour to something similar to the sky backdrop.

yeah yeah yeah... i'm gettin there... thanks all.... i used a technique almost like that... dragged a directional light source over the whole scene and applied a volume light effect.. tweaked some settings and ... daaamn... :love: it renders fast and looks beautiful from any angle :p

CGTalk Moderation
10-18-2006, 01:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.