Corona Normal Shader - C4D

In addition to the below content, see also: Corona Normal Shader at Chaos Docs

 

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:

00_CoronaNormalShader_Sample_A.png

 

 

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.

01_CoronaNormalShader_LinearProfile.png

 

 

Special considerations


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:

  1. 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).
  2. 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).

  3. 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

Note: ''Override UVW'' overrides which UVW set is used for a Bitmap. It is mostly aimed for the Corona Proxy object when or if it contains multiple UVW sets. Override UVW can be used to specify which should be used for rendering. Normal C4D objects rarely contain multiple UVW tags. And if they do, by default the UVW is automatically selected for whole material based on position of material tag.

 

norm1.jpg

 

 

How to find out what settings to use?


There are two ways to find out which settings are correct:

  1. 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).

  2. 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:

03_CoronaNormalShader_Sphere-Normal-Map.jpg

 

The following is a screenshot of the geometry that was used to capture the Normal texture:

04_CoronaNormalShader_Sphere-Normal-Geometry.png

 

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:

norm_sphere1.jpg

 

 

06_CoronaNormalShader_Example_A.jpg

 

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:

07_CoronaNormalShader_Example_B.jpg

 

 

Now, let's try enabling the "Flip Y (green)" checkbox in the Corona Normal Shader and render the image again:

norm_sphere2.jpg

 

09_CoronaNormalShader_Example_B_FlipYAxis.jpg

"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:

10_CoronaNormalShader_Example_B_UI_Strength.png

 

11_CoronaNormalShader_Example_B_Strength.jpg

"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.

12_CoronaNormalShader_Example_C.png

 

flipg2.jpg

 

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.

14_CoronaNormalShader_Example_D.png

 

flipg.jpg

 

15_CoronaNormalShader_Example_D_MtlSetup_Before.png 16_CoronaNormalShader_Example_D_MtlSetup_After.png

Before (incorrect)

After (correct)

 

Note: Interactive rendering is extremely useful in finding out what settings should be used for a specific Normal texture. 

 

 
 
Was this article helpful?
0 out of 0 found this helpful