Creating God-rays with volumetric lights |
Basic Setup
The setup for God rays is simple:
The problem is it will likely render black. This can have a number of causes including the fog distance and height, as well as the intensity of the light. Fog Height: If your light is placed above the max height value, it will clip and render black. Use the measure distance tool to determine the height of your scene (i.e. how high you place your spot light) and then use this value for the envFog height. Fog Distance: If the fog beam is further than the distance it will again render black. To determine the correct value here, select an object furthest from the camera (you can also create a sphere that you use temporarily for this purpose), and use the object details HUD to see the "distance from camera" for that far object. Use this value for the fog distance. Light Intensity: As a rule of thumb, increase the light intensity times ten (x10). If you want to have the fog fade with distance you will need to set the decay rate of the spot light to quadratic. This also will require a much higher light intensity depending on your scene scale. Try adjusting this in IPR with fog off (if you see your light hit the objects the values is high enough, if everything is unlit it is not), then multiply that value x10 and turn the fog on. Use an override on the intensity so it only affects your fog render layer. The next problem is that it will have a lot of noise in the fog. For this we need to adjust the subdivs on the EnvFog.
This however can have a significant impact on render time, so an more economical approach is to instead do this in comp by multiplying the fog with an animated 2D noise in Nuke. If you render in Deep Exr you can do the same in 3D in Nuke (note that Deep is currently not working with volumetrics in Vray. This should be updated with Vray 3.0)
If you want to instead restrict the fog to a particular area, you can create a poly cube and connect this to your fog in the set editor. You also will need to uncheck cast/receive shadows and primary visibility on the mesh's render stats so it does not render or block the fog. The mesh then acts as a bounding box, limiting the affect of the fog to within its boarders.
|