Light Fog.


Hey there, I am making preparations for my next project. Trying to clear out issues before they rise.
One of them is light fog.
Here is the test scene:

What way should I use to get nice light fog from the window to the floor where highligh is happening. If using traditional spotlight and enabling light fog, you get circular light fog cone. If I resize that cone larger than window, weird artifacts start to happen. So I understand the cone border detects where fog should happen, and if it hits mesh it disables fog behind that mesh.
Here is the reference what I like and would like to know how it was made:

Prefferably I would like to render it as separate pass and comp it together later. I am willing to learn but have no idea where to start, any tips or hints are very welcome.
Thank you


well… i think the best way to achieve that result, is mapping your image to the color light slot.


Sry slipknot66 but you are missing my point here. Lets wait if someone else understands what I am trying to do. If noone will answer I’ll try to express myself better.


There are many god rays plugins and scripts that can do this in most compositors.

For example, genarts sapphire:
or the foundry tinder


Well I think slipknot66 is right. In the 2nd picture you posted the person mapped the stainglass texture to the colour slot of the light, turned on light fog, probably with a decay rate. Your window is square so you can adjust the barn doors if you are getting artifacts.


That second picture is from MR’s feature list page.
Yes I have thought to make those volumetric rays directly in comp but as I got some time, I would like to learn something new.
OK, adding color to the spotlight and enabling light fog. Thats exactly what I’ve been trying to do since from the beginning. I ran into trouble and was wondering that maybe it is some kind of common mistake.

Anyway, here is the same scene what I gave as a example. But here light fog is enabled and also a fractial is connected to spotlights color. Everything is fine until the cone is smaller than my square window:

But now, once I resize the cone so that it is bigger than my square window:

Thats what’s giving me problems. I guess mayas standard light fog is entirely 2D effect, or I am doing something completly wrong.
If you look again now that Mental Ray pic, its all fine there :shrug:
Wonder how that pic is made.


i think i found a solution, check this tutorial, im trying this one too:)


well… here is what i got until now, playing with volume photons etc… now im melting my brain trying to find a way to emmit some colors…:slight_smile:


Use a 3dFluid as fog, map the color to the light, render in mentalray with raytrace shadows. In my experience, it’s faster then using parti shaders.


EDIT: actually, it’s even better to model the window, and map the transperancy of the window with the color. See attached example.


You can change the Fog Color by changing the Scatter Color on ur Parti_Volume shader assigned to the Bounding Box if thats what ur trying to do!


Thank guys alot :thumbsup:
slipknot66, I also found this tutorial but for some reason I was thining that altough it seems similar, it is not very good for simple volumetric light.
Anyway, now I got something to start with, thank you guys very much again :slight_smile:


Hey zylphyr, thank you again for the scene. I think it will work very good for what I need it to do. And depending on the fluid complexity it renders very fast too. :thumbsup:

slipknot66, were you able to attach color to those volumetrics, and could you add abit grain too. Could you tell me what was the rendering time on the last pic. Or if you can make new tests, I would be interested to know.


Hey, I’ve been playing with volume fog in mental ray recently. I’ve managed to get the fog too be non-homogenous byt just setting the uniform value of the parti_volume to something other than 0 (the closer to 1, the more the fog billows).
As for colours, you can set the fog colour, but I haven’t yet tried to add patters of colour (as if it is coming through a stained glass window).
I will try that tonite though. If I come up with anything, I’ll post it here.


ok… now the light is generating colors, but is passing thru the objects… i think is something wrong with the shadows, im using raytraced shadows…

the firts image i posted i was using a mentalray spotlight, now im using a maya default light


You are getting photon leaking above the window. You’ll need to increase the subdivisions for your wall and or ceiling to fix that. The reason that occurs is due to the GI radius being too large and the photons consider the radius on both sides of the wall instead of being blocked because the photons consider vert information when calculating the accuracy. You can raise the GI accuracy to compensate for that but it will increase your render time of course, or what I tend to do is add more subdivisions in the problamatic areas. That tends to take less of a hit on rendering than increasing the accuracry settings.


That is very weird slipknot66, but what are the rendering times?
Thats what I got with zylphyr’s metheod after playing around abit:

It took 5min with P4 2.4, I think it is just going to work fine what I need it for!


well… thanks Bill, but i know that already… this is just a test with volume, and to eliminate that with GI you just need to turn on FG and increase the number of rays, as this is just a test im not worrying about GI is an example how FG can help

Nice render Splin, but hey… now im interested to find a way to resolv this problem with volume photns, i know that using fuids is much more faster than volume, but im not sure if you can achieve the same results with fuids. well im still melting my brain here…loll as soon as i get some results i will post it here:buttrock:


Very cool slipknot66. A little bit grain and a nice smooth falloff and it will be very cool.
I just needed a simple grainy volumetrics to fall from square size window to the floor while still casting nice variety of details from the environments outside. Now I can continue working on it and my mission is complete, thx again zylphyr :thumbsup:
Tho I think after I have resolved other issues with my upcoming project, I will definetly try to play around abit with volumetric scattering.
Waiting with great anticipation with what you are able to come up slipknot66!


Only problem is that the fog appears to be coming in from beyond the edge of the window.


You mean the rendering from slipknot66?

I were just wondering and going through both ideas in my mind. I like the fast cool looking volumetrics what using fluid container gives. But on the other hand I also really like the nice glow or bloom what FG gives to volumetric scattering. Thats the only minus so far what I’ve been able to come up with when using fluids.
Really looking forward to those new renderings of yours slipknot66. By the way, would you be so nice slipknot66 and share out that scene you are working on. Would save me lot of headache I guess :wink: