= 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|/ref/panes/materialpalette]. There is a whole Glass section, which includes [Bumpy Glass|/gallery/shop/material/bumpy_glass], [Frosted Glass|/gallery/shop/material/frosted_glass], [Glass|/gallery/shop/material/glass], and [Ice Cube|/gallery/shop/material/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|Node:sop/break] or [Shatter|Node:sop/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|Node:dop/rbdfracturedobject] or [RBD Glue Object|Node:dop/rbdglueobject] tools on the __Rigid Bodies__ shelf to turn your object into a dynamic object. [Anim:/images/Glass.gif] == 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|/rendering/pbr]. * To use an environment map on the shader, you must use micropolygon rendering. Environment maps will not work with [Physically based rendering|/rendering/pbr]. 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|/rendering/pbr]. * 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|/ref/panes/materialpalette] 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.