View Full Version : Env Fog
atulhp 05-03-2002, 01:23 PM Can somebody please tell me how can i have a envoironment fog in a scene [in max its very simple though], i tried a lot but invain, frankly speaking i couldnt find the option anywhere......
its urgent...
Thank you in Advance
|
|
alexx
05-03-2002, 01:37 PM
best thing would be to render your scene with Z-channel and then apply the fog in post.
Jhonus
05-03-2002, 02:33 PM
its in render globals
check the help docs! :thumbsup:
pixho
05-03-2002, 08:55 PM
Hi,
I strongly suggest you to fake the env fog with a simple shading network, because you can have way more control over it than the default's envFog.
Here is a quick example of how you can do:
Assuming you already have your material for your object, create a smplerInfo node, a setRange, a surfaceShader and a blendColor node.
The trick is to use the distance from the camera to the pixel beeing shaded to fake the fog.
Now, connect the pointCameraZ of the samplerInfo to the Z input of the setRange.
Enter 0 in minZ, 1 in MaxZ.
Then, connect the outputZ of the same setRange to the blendColor.blender. Connect the blendColor outvalue to the surfaceShader color's input.
Assign the surfaceShader to your object.
Ok, here you have your network done.
Now you need to adjust Z distance from the camera to blend the 2 colors of your blendColors.
You need to know that when you look through the cam, the axis is -Z and not +Z.
So in oldMaxZ, you'll enter a distance value < to the oldMinZ.
Use the measureDistance tool to determine the distance from the cam to your obejct and report this value to the oldMinZ.
When you have found correct settings, connect your original material (the one you made) to the color1 or 2 of the blendColor node to see your material faded with the other color.
I hope this is clear enough, feel free to send me a email (offlist) and I'll make you a quick sample scene, but this is very basic ;-)
Hope this helps...
Emmanuel
CGTalk Moderation
01-13-2006, 05:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.