4. Photon boundary cube volume shader
In order to avoid calculating caustics in infinite space, mental ray requires defined 3D volumes in which the photons will will be contained. In the case of this tutorial, we will be using the Photon Boundary Cube with a “parti_volume” shader. This same shader will also be applied to the camera and the water surface in future sections of the tutorial as well.
NOTE: It is really important to set up all the shaders BEFORE you start casting photons into the scene and trying to render. If your renders seem like they’re crashing maya, it’s because you skipped some of these steps. (Hanging renders are really just taking a long time because photons are floating in the ether of infinite space rather than being caught by the render volume. You can cancel hanging renders by selecting your main Maya window and hitting “ESC” key).
-
Select “photonBoundary_pCube1”, right-click and hold to bring up the context-sensitive menu and assign new “Lambert” material
-
Rename “lambert2” to “photonBoundary_lambert2”
-
Navigate to shading group “lambert2SG” using the “Go to output connection” button and rename it to “photonBoundary_lambert2SG”
-
Scroll down to “mental ray > Custom Shaders” and enable “Suppress all maya Shaders”
Transmat shaders help mental ray skip certain calculations in channels that should be ignored. And since we won’t be using certain calculations for our caustics effects, we’ll put transmat shaders into those slots:
-
Put “transmat” shaders in both the “Material Shader” and “Shadow Shader” slots by clicking on the checkered boxes next to them
, selecting “transmat” shader from the list, then navigating back to the “photonBoundary_lambert2SG” shading group by pressing the “Go to output connection” button -
Similarly, put “transmat_photon” shaders in both the “Photon Shader” slot, and the “Phot Volume Shader” slots, navigating back to the “photonBoundary_lambert2SG” shading group by pressing the “Go to output connection” button after each new shader is added
Now it’s finally time to set up the volume shader. This is the shader that will be used to handle all photons inside the volume of the photon boundary cube.
-
Put a “parti_volume” shader into the “Volume Shader” channel by clicking the “assign shader” button
-
Rename “parti_volume1” to “photonBoundary_parti_volume1”, and leave all of the settings at their defaults (we will adjust them in future sections of this tutorial once the caustic effect can start being rendered)
At this point, it would be a good idea to Navigate back to shading group “photonBoundary_lambert2SG” one last time by pressing the “Go to output connection” button , and make sure all the shader assignments match the image below.
In order to avoid selecting this cube again accidentally while setting up the rest of the materials, it’s a good practice to put it on a referenced layer:
-
Select “photonBoundary_pCube1” again
-
Create a new layer from selection in the Layer Editor
-
Rename the layer “Reference”
-
Set its mode to “R” (Stands for “Reference”) so that any objects in this layer will be visible, but not selectable
5. Environment materials
Environment materials do not require any special setup (the material used for the environment in this tutorial is the default grey lambert1 material, which works fine).
But similarly to the photon boundary cube, you don’t want to select this cube by accident either, so add it to the same reference layer:
-
Select “environment_pCube1”
- Right-clicking on the “Reference” layer and choose “Add Selected Objects” from the context-sensitive menu
Author: david allen
Submitted: 2014-05-14 18:18:06 UTC
Tags: coustics, maya, refractive, reflective, and volumetric
Software: Maya
Views: 58,909
Related Items
-
Animated Olympic Fire 2014 (Maya) 3D Model
$69.00 (USD) -
Elephant 3d textured model 3ds max and maya scene files 3D Model
$30.00 (USD) -
1-Click Texture Batch Bake for Maya for Maya 1.0.0 (maya script)
$20.00 (USD) -
"Rapid Rig: Poser" for Maya for Maya 2.0.9 (maya script)
$20.00 (USD) -
Nick-Maya Rig With Advance Facial Setup for Maya 0.1.0
$20.00 (USD) -
Pamela Maya (2013) Rig for Maya 0.0.1
$20.00 (USD) -
The Alchemy Tools for Maya for Maya 1.0.0 (maya script)
$20.00 (USD) -
Arab Rig for Maya with Ncloth simulation for Maya 0.0.1
$99.00 (USD) -
Poly Tools for Maya for Maya 0.4.2 (maya script)
$20.00 (USD)