Corona Normal Shader - C4D
How to use Normal textures?
You can use the Corona Normal Shader in the material editor to load RGB Normal texture files that you want to use in the bump channel. The textures can be loaded using either the native Cinema 4D Bitmap shader or using the Corona Bitmap Shader; this last one will offer more filtering options and generally renders faster:
When loading the Normal texture file in Cinema 4D, Corona Renderer will automatically change the texture's "Color profile" to "Linear" to get the best results.
Unfortunately, there are various standards for how Normal texture information is stored and interpreted by the different 3D software. For example, red color may represent either "up in the plane of texture" direction or "right in the plane of texture" direction. The light blue color (RGB 128 128 255) usually represents "flat" areas (directly facing the viewer); however, the image may have some kind of gamma correction applied to it, which may change that color value.
This means that the same image may produce different results when loaded as a Normal texture in other software. Likewise, two normal maps created by different software may produce different results when loaded as Normal textures and rendered in a single 3D application.
To overcome this, the Corona Normal Shader offers several options:
- Flip X (red) - determines the left-to-right direction of the normal map (higher red values mean either the right direction or the left direction of the normals).
Flip Y (green) - determines the bottom-to-top direction of the normal map (higher green values mean either bottom direction or up direction of the normals).
- Swap red and green - this decides which color should be interpreted as the left-to-right direction and which as the left-to-right direction
How to find out what settings to use?
There are two ways to find out which settings are correct:
- Get reliable information about the Normal texture you are using (e.g., it could be included in a readme file supplied with the texture map).
- Using the trial and error approach.
Sometimes it is easy to imagine what the normals should look like (in the case of a spherical or pyramidal pattern), but sometimes it may be more complicated (e.g., in the case of a chaotic, organic pattern).
Below is a guide showing what settings to apply in various cases.
In the first example, we will be using a Normal texture generated from a half-sphere, seen from above. It was saved directly from the Corona VFB as a 32-bit EXR file:
The following is a screenshot of the geometry that was used to capture the Normal texture:
You can download the Normal texture from here: [link]
Let's see what happens if we load the above Normal texture into a Corona Normal Shader with the default settings.
First, load the Corona Normal shader into the Bump channel of a Corona Material (Legacy or Physical), then load the Normal texture into the Corona Normal Shader, and finally enable some reflectivity to the material to see the final effect:
It is clear that the Bump channel is not working correctly (for example, the bumps look concave, and they should be convex). So let's try fixing that:
First, let's render the test object without any texture loaded into the Bump channel to see what the correct normals look like:
Now, let's try enabling the "Flip Y (green)" checkbox in the Corona Normal Shader and render the image again:
"Flip Y (green)" option enabled.
We can now see that the material looks closer to what we would expect - the bumps are convex, and the shading looks correct.
We can further fine-tune the material by adjusting the Bump's channel strength:
"Strength value" lowered from 100% to 60%.
The material now looks as we would like it. The solution was to enable the "Flip Y (green)" option and lower the strength of the Bump channel to the desired value.
As mentioned before, the solution may be different for Normal textures downloaded from (or generated by) different sources.
In the following example, the solution was also to enable the "Flip Y (green)" option; otherwise, the result would be incorrect.
In the following case, the solution was to change the texture's "Color profile" to "Linear" (because somehow the "Color profile" was set to sRGB) and keep the "Flip Y (green)" option disabled; otherwise, the result would be incorrect.
Note: Interactive rendering is extremely useful in finding out what settings should be used for a specific Normal texture.