PBR stands for Physically Based Rendering. It was first introduced by Disney in 2012 and later widely adopted by the gaming industry. Compared to traditional rendering methods like Blinn-Phong, PBR adheres to the principle of energy conservation and follows physical rules. Artists only need to adjust a few simple parameters to ensure correct rendering effects even in complex scenes. PBR is a physically-based rendering method that follows energy conservation and introduces IBL to simulate global illumination. It uses parameters like metallic, roughness, etc., to make adjusting rendering effects more convenient.
The base color. Base Color * Base Color Texture = Final Base Color. The base color is the albedo value of the object. Unlike traditional diffuse color, it contributes to both specular and diffuse reflection. We can control the contribution ratio using the aforementioned metallic and roughness parameters.
Simulates the metallic degree of a material. The higher the metallic value, the stronger the specular reflection, meaning it reflects more of the surrounding environment.
The metallic-roughness texture. Used in conjunction with metallic and roughness values, they are multiplied together.
As we adjust the material's metallic value, we can observe that the higher the metallic value, the clearer the reflection of the surrounding environment becomes, and it starts changing from a solid white to colored. This is because dielectric materials (i.e., when metallic is 1) reflect 100% of the light off the object's surface, thus reflecting the colored surrounding environment:
Refers to the property of a surface material where light reflection characteristics differ in different directions, often manifesting as varying gloss or reflection effects on the material's surface. This effect is present in many real-world materials, especially metals, fabrics, and hair.
Anisotropy texture. The RG channels store the anisotropic direction, which is multiplied by the result of anisotropyRotation; the B channel stores the anisotropic strength, which is multiplied by anisotropy.
Enabling Anisotropy
Navigate to the Inspector, enable anisotropy, and then adjust the corresponding parameters to achieve the desired effect:
The emissive texture. We can set an emissive texture and an emissive color (emissiveFactor) to achieve a self-illuminating effect, allowing the material to be rendered with color even without lighting.
Used to simulate a transparent protective layer covering an object's surface (similar to the clear varnish on car paint). It adds an independent layer of specular reflection on top of the original material, making the surface appear shinier, deeper, and more realistic.
Often manifested as a change in the surface color of an object with varying viewing and lighting angles. This effect can be seen in nature on things like soap bubbles, insect wings, and pearls.
The index of refraction for the thin film. This value determines the degree of light bending and, for thin-film interference, affects the resulting color of the light.
Typically used to simulate the subtle sheen on the surface of materials like fabric. This sheen is generally visible at certain viewing angles and is similar to the light scattering properties of materials like silk, velvet, or other fine fibers.
Used to provide more complex and detailed color variations for the sheen effect. By using this texture, the sheen color can have different appearances in different areas of the surface.
Defines the surface roughness for the sheen. A lower value indicates a smoother surface with a more concentrated sheen; a higher value means a rougher surface with a softer, more diffused sheen.
Allows the roughness to have different characteristics in different areas. By defining this variation with a texture, complex roughness can be achieved on the same surface.
Sheen variation on fabric surface at different angles
Enabling Sheen
Select the material and adjust the corresponding parameters to get the desired effect:
Describes the portion of light that passes through an object rather than being reflected or absorbed. When light hits a transparent or translucent object, some of it will pass through, which is the basic manifestation of transmission.
The transmission texture, sampling the R channel, is multiplied by transmission to control the transmission intensity of different areas on the material's surface.
Enabling Transmission
First, you need to enable Opaque Texture under the Camera and in the scene:
Then select the material and adjust the transmission-related parameters:
According to physical laws, we consider refraction to be built upon transmission. This means that the phenomenon of refraction only occurs when light transmits through a material. That is, refraction will only take effect when transmission is greater than 0.
The absorption color, which determines the change in color as light travels inside an object. By setting this color, you can simulate optical absorption effects in materials like colored glass, liquids, or gemstones.
The attenuation distance, which defines the distance over which light attenuates as it travels inside an object. A shorter distance makes the material appear denser with more pronounced color changes. A longer distance allows light to penetrate further with more gradual color changes. A value of 0 means light does not attenuate with distance.
The refraction thickness, used to control the refractive effect as light passes through an object. A larger thickness value will cause more significant bending of light, while a smaller value will result in more linear propagation.
The refraction thickness texture, sampling the G channel. White areas represent greater thickness, and black areas represent lesser thickness. It is multiplied by thickness.
Color change as attenuationDistance gradually increases
Enabling Refraction
After ensuring transmission is enabled, set thickness to a value greater than 0 to enable refraction.
You can adjust parameters like attenuation color and attenuation distance to work with refraction.
To implement our refraction algorithm, we made the following assumptions:
We use a simple geometric shape to approximate the surface properties of the object and use refractionMode to represent the material's refraction mode.
Uses a sphere as the geometric approximation to simulate the object's surface, which can efficiently handle the behavior of light refraction on curved surfaces.
Uses a plane as the geometric approximation to simulate the object's surface, suitable for handling light transmission and refraction on flat materials.