Manual/Raytraced Transparency
From BlenderWiki
Contents[hide] |
Raytraced Transparency
Mode: All Modes
Panel: Shading/Material Context → Mirror Transp
Hotkey: F5
Description
Raytracing is also used for simulating the refraction of light rays through a transparent material, like a lens. A ray is sent from the camera and travels through the scene until it encounters an object. If the first object hit by the ray is non-transparent, then the ray takes the color of the object. If the object is transparent, then the ray continues its travel through it to the next object, and so on, until a non-transparent object is finally encountered which gives the whole chain of rays its color. Eventually, the first transparent object inherits the colors of its background, proportionally to its Alpha value (and the Alpha value of each transparent Material hit in-between). But while the ray travels through the transparent object, it can be deflected from its course according to the Index of Refraction (IOR) of the material. When you actually look through a plain sphere of glass, you will notice that the background is upside-down and distorted: this is all because of the Index of Refraction of glass.
Enable Raytracing:
You need to enable raytracing in your scene settings if you want to use raytraced transparency and refraction. This is done in the Scene/Render context → Render Panel. Raytracing is enabled by default in Blender 2.37 and higher. |
Alpha value:
You need to set your Alpha value (A in the Material Pannel) at something else than 1.000. |
Options
- RayTransp
- Enables and disables raytraced transparency
- IOR
- Sets how much a ray travelling through the Material will be refracted, hence producing a distorted image of its background. See Examples.
- Depth
- Sets the maximum number of transparent surfaces a single ray can travel through. There is no typical value. Transparent objects outside the Depth range will be rendered pitch black if viewed through the transparent object that the Depth is set for. In other words: if you notice black areas on the surface of a transparent object, the solution is probably to increase its Depth value (this is a common issue with raytracing transparent objects).
- Limit
- materials thicker than this are not transparent
- Falloff
- how fast light is absorbed as is passes through the material. Gives 'depth' and 'thickness' to glass
- Fresnel
- Sets the power of the Fresnel effect. The Fresnel effect controls how transparent the Material is, depending on the angle between the surface normal and the viewing direction. Typically, the larger the angle, the more opaque a Material becomes (this generally occurs on the outline of the object).
- Fac
- A controlling 'factor' to adjust how the blending (between transparent and non-transparent areas) happens.
- SpecTra
- This slider controls the Alpha/falloff for Specular colors
Colored reflections
By default, an almost perfectly reflective Material like Chrome, or a Mirror object, will reflect the exact colors of its surrounding. But some other equally reflective Materials tint the reflections with their own color. This is the case for well polished copper and gold, for example. In order to replicate this within Blender, you have to set the Mirror Color accordingly.
Examples
(Influence of the IOR of an Object on the distortion of the background: spheres of Water, Glass and Diamond (top to bottom).). There are different values for typical materials: Air is 1.000 (no refraction), Alcohol is 1.329, Glass is 1.517, Plastic is 1.460, Water is 1.333 and Diamond is 2.417.
Hints
In order to get a physically accurate Fresnel effect with the current algorithm, you have to set Fresnel to 5.0 and Fac to 1.25. Nevertheless, you can play with these values for the sake of artistic freedom, if you feel the need to.
Casting Transparent Shadows
By default, the shadows of transparent objects are rendered solid black, as if the object was not transparent at all. But in reality, the more transparent an object is, the lighter its shadow will be. This can be taken into account, not in the Mirror Transp panel transparent object settings.
Transparent shadows are set on the materials that receive the shadows from the transparent object. This is enabled and disabled with the TraShadow button, in the Shading/Material context → Shaders Panel. The shadow's brightness is dependent on the Alpha value of the shadow casting Material.
|