Dev:Source/Materials/Transmissivity
目次
Transmissivity
Up to 2.41, all of the material properties in Blender have been surface properties. That is, as soon as the ray touches the surface of the material, its entire effect on the color of the pixel is complete. As rays move through the inside of objects, the size and shape of those objects has had no bearing on the ray. When a ray leaves some transparent objects, it has a second opportunity to render the far surface's characteristics.
In 2.42, Blender now computes the length of each ray chord as it passes through an object. This length of the ray chord can be used to measure how light gets filtered progressively through the object. This property of material science is called transmissivity.
In simple terms, thick transparent objects should appear thicker, just by the nature of light getting absorbed or scattered as it travels through the object. This is not a surface characteristic, but it is an important material characteristic.
Two New Material Properties
By default, transmissivity is not enabled, so that existing materials will continue to render much as they used to in previous Blender versions. You can choose the 'filter' and 'alpha' values and their effects will be computed on each surface as before.
To allow for creative and realistic rendering options, there are two new parameters in the "Ray Transparency" material options. These are '"ray length limit'" and '"ray filtering power.'" The sliders are labeled "Limit" and "Power" respectively. The other important parameters when playing with transparent objects are the ray filtering amount (labeled "Filter") and the object's or texture's overall alpha value.
- Alpha
- Filter
- Limit (new)
- Power (new)
If the Alpha value (computed according to the overall material or any texture channel) is less than 1, then rays can pass into and through the object. This is a prerequisite for all transparent rendering in general.
If the Filter value is non-zero, then some amount of light will be scattered or absorbed as rays enter and leave the object.
If the Limit slider is set to any value greater than 0.0, then transmissivity effects are enabled. For most users who want to enable transmissivity, the maximum value of 100.0 units is the recommended setting. Any ray that passes through an object which is longer than this limit will simply be considered to be that long, so it provides a cap value to the effect of transmissivity. Essentially, the filter and alpha values are scaled by the ray's length.
If the Power slider is set to 1.0, then the effect of transmissivity is linear: the ray's length is directly proportional to the effect. This is typical for realistic material visuals. If it is set to 2.0, then the effect is squared, things will get cloudy much faster. If it is set to 0.5, then the effect is limited to the root of the length, for a much more subtle effect.
The Down-Side of Transmissivity
There is a new wrinkle in calculating material transmissivity. Just as with many other textures, artists will have to consider the ultimate design scale of their models when developing their materials. Glass is no longer unit-less, but will absorb/scatter light according to the size of the glass object. Droplet is no longer equal to aquarium and ocean.
For the detail-oriented, realism-seeking artist, this is probably nothing new: they probably have five or six different water materials to cover different filtration amounts. They recognize that elephant skin and mouse fur must be engineered for well-known Orco scales. This transmissivity change may in fact simplify an artist's material inventory if they stick to a certain unit scale, since they won't need to manage different filter amounts for the same material type.
For the newcomer, though, there may be a few questions as to why a transparent object seems to be as black as a welder's mask, even though the filter and alpha properties are only 0.5. A material designed for meters will also look odd if appended to an inch-per-unit model.
Thicker Shadows
If you want to see the effect of transmissivity (or of transparent alpha behaviors in general), be sure to enable the "Transparent Shadows" flag on the materials of the receiving surfaces. For example, if you are modeling a glass vase on a wooden table, remember to enable TraShadow on the wood material. Round transmissive objects will give off smoothly graduated shadows instead of flatly shaded shadows.
Total Internal Reflection
When a ray enters a denser material, it slows down, and thus bends to a steeper incident angle. Conversely, when a ray leaves a denser material, this process should reverse, and the ray should leave at a more shallow incident angle. At some point, though, those shallow rays would be parallel to the surface of the dense object, or remain inside the material. Since the photon's path stays inside the dense material, the path does not compute a change in course based on the index of refraction. It just bends just like any other mirror reflection. The appearance of this reflection inside an object is very pronounced and is usually surprisingly silvery-looking, or catches some strong color from the environment after the ray eventually escapes the object on another route. This phenomenon is called Total Internal Reflection.
Previously, the Blender internal raytracer bailed if a refracting ray would not escape the mesh. That is, any exiting ray which has an exiting determinant below zero (too shallow an angle), was simply and quietly left alone to exit straight out of the object.
Now, Blender's raytracer will correctly reflect rays back into the object in such cases. These reflections still count against the raytransp depth you can set for the material, not against the raymirror depth budget.
-- Halley