Creating God-rays with volumetric lights
Basic Setup
    As a general workflow it's a good idea to render the God-ray fog in a separate render layer with our spot light and a material override with a blackhole shader on all the objects. That way our fog will render out on black so we can comp it in.

    The setup for God rays is simple:

    1. Turn on the "Use environment volume" checkbox in the Render Settings, V-ray Tab, Environment section.
    2. Press the checkerboard box to load a Vray Environment Fog node

    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.

Adding noise detail to the light beams

    You can simulate the look of floating dust particles in the air by adding a procedural 3D noise texture to fog's color or density, and even animate it. Since density is a single channel (as opposed to color which is RGB) make sure to turn on "alpha as luminance" in the 3D texture.

    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)

Limiting the affect of Environment Fog with Sets

    In this example there is just one light. If you have multiple lights you can restrict the fog to the one light with the set editor. Then set the "Light Mode" for the environment fog to "Override shape lights".

    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.

Caustics

    To see caustic effects in the light fog, enable caustics in the Indirect Illumination section of the render settings. Adjust the multiplier and search distance.

For more details, check out the examples in the Vray Max help page as well as the new 3.0 Maya docs.
All content © copyright Light Collab.