Volume shading shades a three-dimensional volume, rather than a surface. Typically, volume shaders provide atmospheric effects such as mist and fog.
There are two ways to assign a volume shader:
This makes a volume out of objects to which the material is applied.
Usually when you assign a volume shader to a material, you want to make its surface transparent so the shading within the volume is visible. You can do this with the mental images Transmat shader.
To assign a volume shader to a camera, use the Render Scene dialog. To assign a volume shader to a material, use the material's Volume shader component. This component is found on the mental ray Connection rollout, and in the mental ray material itself. See the “Procedures” that follow.
To apply volume shading to a camera:
On the Render toolbar, click Render Scene.
If the active renderer is not already the mental ray renderer, go to the Common panel, and on the Assign Renderer rollout, click the “...” button for the Production renderer. A Choose Renderer dialog is displayed. Highlight “mental ray Renderer” in the list, and then click OK.
Click the Renderer tab to go to the Renderer panel. On the Camera Effects rollout, find the Camera Shaders group, and click Volume.
The Material/Map Browser is displayed.
Choose a volume shader from the list in the Browser, and then click OK.
To apply volume shading to an object:
Choose Customize > Preferences. Go to the mental ray panel, and turn on Enable Mental Ray Extensions.
On the Render toolbar, click Render Scene.
If the active renderer is not already the mental ray renderer, go to the Common panel, and on the Assign Renderer rollout, click the “...” button for the Production renderer. A Choose Renderer dialog is displayed. Highlight “mental ray Renderer” in the list, and then click OK.
Open the Material Editor. Use the mental ray Connection rollout to assign a volume shader to the Volume component.
Another technique would be to use the mental ray material, and assign a shader to the Volume component.
Also on the mental ray Connection rollout, click to unlock the Surface component. Click the button and use the Browser to
assign the Transmat (physics) shader to the surface.
(If you are using the mental ray material, you don't need to first unlock the Surface component.)
Apply the material to objects you wish to use as shaded volumes.