How to
work with glass
Creating glass
The simplest way to create geometry that looks like glass is by using a glass material. You can find several glass materials on the Material Palette. There is a whole Glass section, which includes Bumpy Glass, Frosted Glass, Glass, and Ice Cube. Simply drag and drop your material from the gallery onto your object.
Breaking or shattering glass
You can either cut up your piece of geometry manually, or use the Break or Shatter tools on the Model shelf to cut your geometry automatically. The break tool cuts your model along a jagged line one time, whereas the shatter tool cuts your model along a jagged line multiple times.
Once you have completed your cuts, you can use the RBD Fractured Object or RBD Glue Object tools on the Rigid Bodies shelf to turn your object into a dynamic object.
Rendering glass
You can render glass with any light and any rendering engine. However there are certain tips and tricks to improve your glass render.
-
By default the glass materials have faux caustics. For better quality caustics, you can turn off the Do Faux Caustics checkbox on the Blur.Density.Shadow tab which will make the shadow completely black, then use photon maps.
If you render with caustics, you should use physically based rendering. For more information on using Caustics with PBR, see Physically based rendering.
-
To use an environment map on the shader, you must use micropolygon rendering. Environment maps will not work with Physically based rendering. You can set the Environment map on the Ray Trace tab of the glass shader.
If you use an environment map, it is faster to render with Physically Based Rendering.
-
The glass shaders add some distortion to other objects behind it. This is controlled by the Index of Refraction parameter on the Ray Trace tab of the glass shaders. The closer the value is to
1, the less deformed the objects behind it will be. -
To control the blurriness of reflections you can increase the Cone Angle parameter on the Blur.Density.Shadow tab. This value is in degrees.
Advanced - writing your own glass shader
Drag a glass material from the Material Palette onto your object. In the SHOP network, navigate by double-clicking to dive inside the following nodes: glass material → VOP VEX Surface SHOP → If-Then Block. Take a look at the specular, traceReflect, and traceRefract nodes.