Glass shader
1.Overview
Glass shader is a kind of glass that is used to render glass. It can simulate a wide variety of glass types, such as common glass, colored glass, oblique glass, and edge glass, even some crystal products and transparent plastics.
2.ShaderParameters
ShaderParameters |
Description |
Tint amount |
Set the coloring amount. |
Refraction bump Scale |
Change the amplitude of concave and convex Refraction |
Reflection amount |
Set the reflection visibility. The lower the value reflection, the higher the value reflection. |
Fresnel bias |
Defines the visible coefficient dependent on the direction reflection |
Fresnel Scale |
Set the intensity of environment image reflection |
Back Light Scale |
Set the visible multiplier of the backlight. The lower the multiplier, the higher the visibility. |
Filter color |
Sets the diffusetexture filter color. You can use each pixel of diffuse texture as the filter color. |
Gradient Multiplier |
Set gradient Multiplier |
3.Glass attributes and types
Depending on different types of glass, such as ordinary windows, it is quite transparent and determines whether the light is completely reflected (whether it is clean ).
(Ordinary glass)
(Clean and dirty)
Some glass types have a considerable slope, which will lead to refraction, and in some cases we can imagine the visual color difference.
Important: When the refractive chromatic aberration is not supported, the appearance of the diagonal glass or crystal is enhanced.
Beveled glass)
(Crystal)
You can also render colored glass or edge glass, which is slightly reduced in refraction. This type of glass is often seen in churches, doors, lamps, and some windows.
4.How to use glass shader
Most of the attributes simulated by the glassshader are described above. The lighting adjustment is correct. Although it has some parameters, the default value can be used:
Refraction bump scale:Adjust the refraction concave/convex Ratio
Filter color:Adjust the color of the glass to use the pixel color of diffuse texture.
Reflection amount, Fresnel bias, Fresnel pow, Back Light Scale. See shaderParameters
Additional instructions:
You can use a highlight texture for reflection.
You can use diffusemap to color each pixel (colored glass and dirty glass are useful), but note that if diffusemap is very dark, the refraction will be invisible.
5.Case study: colored glass
In this tutorial, you will rest on how to make the effects of colored glass. As usual, we will start from the reference map of what we want to achieve"
Next, use the reference graph to create a diffuse texture bumpmap (use the NVIDIA plug-in and use nine samples for low-frequency bump)
Now we apply the diffuse map to get the following effect:
Apply bumpmap to get the following results:
Final effect:
Author: Wuhua wujiu Source: wine.