Corona Mapping Randomizer, Triplanar, and Normal maps are commonly used in Corona to create realistic texturing effects on 3D Models. However, the order in which these maps are combined can greatly affect the final result. In this article, we will explore the differences between the correct and the incorrect order of operations.
Corona Normal, Mapping Randomizer, and Triplanar Maps
Let’s understand each of these nodes before we dive into the correct order of operations for combining them:
1. Corona Mapping Randomizer: Textures on a 3D Model can often appear repetitive, which instantly gives away that the scene is CGI. However, by using the Corona Mapping Randomizer map, we can add randomness and variation to the texture’s appearance. It can be used to break up the regular pattern of a texture and add a more natural look to the surface. It's important to note that the Corona Mapping Randomizer only modifies the existing texture mapping.
Note: Corona Mapping Randomizer was called Corona UVW Randomizer in Corona 9 and older.
2. Corona Triplanar Map: it is used to avoid visible seams and stretching in textures, without requiring UVW mapping. It projects textures along the object’s XYZ axes. It’s important to note that the Corona Triplanar Map creates a new texture mapping for the objects and ignores any existing UVW mapping.
3. Corona Normal Map: it is used to add illusion of depth and surface details to a 3D model using RGB textures. It’s important to note that the Corona Normal Map does not provide UVW mapping of its own but instead it is mapped to the object surface based on existing UVW coordinates.
Now that we understand what each of these nodes does, let's see how to correctly combine them and why it is so.
The correct order of operations:
Normal map > Corona Mapping Randomizer > Corona Triplanar > Material Bump Channel
The reason for this order is that the normal map alters the way that light interacts with the surface of the object, and the Corona Mapping Randomizer then randomizes the placement of textures on the surface. By applying the normal map first, we ensure that the surface detail and depth are correctly applied to the object before any randomization occurs, and that the Corona Mapping Randomizer "understands" how to transform the normal map to achieve the expected shading (i.e. the convex features of the normal map remain convex and concave parts remain concave). The Corona Triplanar map is applied as the last one, because otherwise (in case of plugging a Corona Triplanar map into a Corona Mapping Randomizer), the Randomizer map would not "understand" how to treat the mapping coming from the Triplanar map, which would result in incorrect shading.
Render result using the correct order. Note that all the surface details are are convex-shaped as expected despite the randomization.
Incorrect order of operations:
1. In the case of Corona Mapping Randomizer > Corona Triplanar > Normal map, the result of randomizing the transformations of a normal map and applying triplanar map are converted into shading information as the last step. Corona Normal map is doing its job as it should - it interprets the RGB values as shading normals, however this is not what we (usually) want to achieve since the shading may appear flipped (i.e. concave features of the normal map will become convex, and the other way around).
Render result using the incorrect order. Note that even though we are using the same normal map texture as in the "correct" example, the surface details are now unexpectedly concave-shaped.
2. In the case of Normal map > Corona Triplanar > Corona Mapping Randomizer, the main issue is with Corona Mapping Randomizer as it is applied after the Triplanar map, the randomization might not produce the desired result as the Triplanar map has already combined the projections from different axes.
Render result using the incorrect order. the surface details show unexpected randomization and artifacts due to using Corona Mapping Randomizer as the last.