How to Rotate Normal Maps in Octane by Creating a Script

SilverwingVFX shows how to create a script to rotate normal maps in Octane Render for Cinema 4D.

It’s a pretty obscure issue, but the normals don’t look right when you rotate a texture in Octane using UV transform. Here, SilverwingfVFX (Raphael Rau) offers a solution by creating a custom OSL script to rotate the normals.

The first part of the video discusses the problem that rotating a texture in Octane using UV transform can cause the normals to be inverted. Rau proposes creating an OSL script to solve this problem.

The second part of the video shows how to create the OSL script, and Rau breaks down the steps involved in creating the script, including:

  • Referencing the Open Shading Language (OSL) specification to find the formula to rotate a vector
  • Using a variable to store the intermediate result
  • Using the range function to remap the output value

The latter part of the video applies the script to fix the normals on a material. The speaker shows how to use a range map to remap the color value between 0 and 0.5, which functions as the angle for the normal rotation.

A while ago, Silverwing covered how to improve surface normals in Octane. Visit that tutorial here.