Volumetric Shader through Mental Ray by Silvia Palara, USA
In this tutorial I will try to summarize what I learned throught trial and error about Mental Ray shaders, and how to achieve interesting volumetric effects only through shaders. My aim is to describe how I got this image and how different parameters affect the look and behavior of the shaders. This is by no means a comprehensive guide to MR shaders but I hope it will give you some good ideas.
The scene is composed of a sphere and a spot light, positioned to the right of the camera. Both are enclosed into a box as backdrop. Select the light and in the perspective view, choose "Look Through Selected". Position the light so that the sphere is framed by the light cone. Give the light a cone of about 30 degrees. Assign a shader of your choice to the box. I chose a checkered texture. Assign a plain Lambert to the shpere.
Mental Ray Materials
When you assigned the Lambert to the sphere, a Shading Group node was created. MR materials must be manually plugged in this node. If you open the Attribute Editor for the node and expand the MR section, you will notice some interesting fields in which we can plug Mental Ray shaders.
- Material Shader - The surface material.
- Shadow Shader - Used when MR's calculations don't give the desired effect.
- Volume Shader - If the shape is closed, we can "fill" it with some medium.
- Photon Shader - For every MR material shader, plug in its photon shader.
- Photon Volume Shader - For every MR volume shader, plug in its photon shader.
This shader is used to describe materials whose most important characteristics are reflection and refraction.
It is most often used for glass, crystal, water, ect. Do the following:
- Assign a dielectric material to the MR material. Leave the values to default.
- Assign a dielectric photon material to the MR photon shader. Leave the values to default.
- Enable Global Illumination in the Render Globals.
- Set the light to emit photons, since MR materials are photon based.
If your sphere appears almost black, increase the photon intensity
until you start to see more of the sphere. Note that only dielectric
object with no thickness are transparent to what's behind them. So
objects behind a plane, or inside the sphere, will be visible, while
objects behind the sphere will not be visible.