Adverti horiz upsell
Spotlight Fog
Spotlight Fog
admin, added 2006-09-05 14:10:19 UTC 90,922 views  Rating:
(2 ratings)
Page 1 of 1

Here's a common problem... you add fog to a spotlight, render an image and... no fog. The problem is simple and is inherit to how Maya calculates lightfog.



Above we see a simple scene with a single spotlight. No fog added yet.



The thing to notice is how once fog has been added to the light, a new conical object appears in the scene (the blue cone above). This is a new shape node which is a child of the spotlight's transform node. Also, if you look in the Multilister, a new shading group has appeared, called 'LightFogSE' which has a volume material associated with it. This Shading Group is assigned to the above blue conical shape.



When rendered, we can see that we do have fog... but the fog only appears in the region of the blue cone; with soft edges (based on the Fog Spread attribute of the spotlight), and a hard edged cap. The spotlight in the above render has its Decay set to '0' which explains the hard edge at the end of the cone. The only was to soften the end is to modify the decay of the spotlight, which may not suit your scene. But what we want to do here is to have the fog extend further into the scene.



What I have now done to fix the placement of the fog is modify the spotlight's scale... By increasing the scale of the spotlight, I am also scaling the blue conical shape thus increasing the area encompased by the fog. Also, I scaled it specifically so that the end of the cone in completely below the groundplane... so that the hard edge is no longer visible.



Also notice that since I have Shadows 'on' for the spotlight, volumetric shadowing is appearing within the fog cone.



Finally, I've mapped the above image of water to the spotlight's color, which will color both the emitted light and the volumetric fog. By using an image sequence of moving water, some nice effects become possible.


dolphin.mov