Composite Node based Fog - BLENDER

Share with others..
Post Reply
User avatar
Draise
Captain
Posts: 3198
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Composite Node based Fog - BLENDER

Post by Draise »

Composite Node based Fog within Blender

Image

Found a handy little technique to add fog in post processing. Because.. well in TS workspace renders, you don't have fog. So I learnt how to make fog using a Map Value node and a Mix node with an add algorithm. You can download the file here. (You may have to register first)

So the idea is to use Z depth information into a Map value, then using the following idea play with an Add formula and the original you want to add fog to to get a final result.

Image
2 compositing nodes to add some distance fog in Cycles. I unburried the idea from a tutorial by (the famous) Andrew Price. Give attribution to him, if any. I just made a quick scene to show the effect in action.

In the "Map Value" node: -- Offset: Distance of the fog relative to the camera. (Negative values are in front.) -- Size: Acts a bit like a density setting. -- Minimum: Just keep it at zero. -- Maximum: Limits the effect. (Especially useful for the sky.)

In the "Add" (Color Mix) node: -- Fac: Map Value. Don't touch. It does all the trick. -- Image (top): Source image. -- Image (bottom): Fog color. You're not limited to shades of grey.

Unfortunately, it's not practical to make a node group of this because most of the needed values can't be exposed. Anyway... Enjoy!

Thanks to Kaluura and Andrew Price, though I know them not.
pugman 1
Captain
Posts: 1555
Joined: 21 May 2009, 19:26
Type the number ten into the box: 0
Location: Germany

Re: Composite Node based Fog - BLENDER

Post by pugman 1 »

Nice one Draise,i realy need to learn this sort of stuff,
Just where to find the time
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Composite Node based Fog - BLENDER

Post by froo »

Heh cool. Node based.
Nice find Draise!
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Composite Node based Fog - BLENDER

Post by trueBlue »

Draise wrote: Because.. well in TS workspace renders, you don't have fog.
Sure we do thanks to Dele!
Example included has the Fog's distance animated:
Attachments
Fog.zip
(247.08 KiB) Downloaded 194 times
User avatar
Draise
Captain
Posts: 3198
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Re: Composite Node based Fog - BLENDER

Post by Draise »

Ah yes, trueblue. I have played with those shaders, but I couldn't make it to work with the Translucent shader, or I didn't know how to apply it to that shader (as the fog is shader based) and mix and match the nodes to get translucency in real-time with fog.
Post Reply