3 min read

Normals Smoothing Inconsistently in Cheetah3D

Normals Smoothing Inconsistently in Cheetah3D
Polygon object in Cheetah3D version 6 with irregular smoothing of normals

You may run into an unexpected behavior in Cheetah3D where your polygon object looks distorted because the normals are smoothing inconsistently.  Instead of consistent face rendering, you may notice normals that stand out as if they are distinct from other co-planar normals within the same face.  Here is an example that shows the effect I am describing.

💡
The problem and possible solutions described here applied to Cheetah3D version 6. Either may not be applicable in the latest version(s) of C3D
Polygon object in Cheetah3D version 6 with irregular smoothing of normals

In this case, I have created a parametric Cylinder object with 8x10x1 sections with a height of 3.0 units and rotated the cylinder by 90 degrees to appear horizontal.

Parametric cylinder properties

There are three different types of Smooth algorithms available for a polygon object in Cheetah3D, including Flat, Phong, and Constraint.  The default algorithm seems to be "Constraint" with a Smooth angle of 45.0 degrees.  It appears that co-planar normals positioned at the same angle as the Smoothing angle may cause this irregular smoothing behavior.

In the example above, I made an 8-sided Polygon with 45-degree angles at each vertex. (360 / 8 = 45)  The same issue can appear outside of these default conditions.  Take, for example, the following 18-sided polygon object with 20-degree angles at each vertex.  If I set the Smoothing angle to 20 degrees, the same issue appears, apparently because the angle of the normal and the Smooth angle property are identical. (i.e.: both are at 20 degrees)

Another example polygon object with irregular smoothing of normals

One Possible Solution

To fix this, you can try to adjust the Smooth angle value to be something other than the default of 45.0 degrees or simply different than the corresponding angles of your normals in your polygon object.  If we apply values greater than the angle of the polygon faces, then C3D will smooth the surfaces as expected, and the irregular shading (checker-board) goes away. To do this, perform the following:

  1. Select your polygon object in the Object Browser
  2. Under the Properties panel, Locate Smooth -> Smooth:
  3. Verify that your Smooth algorithm is set to "Constraint"
  4. Under the "Properties" inspector locate Smooth -> Smooth angle
  5. Change the value of the Smooth angle property as needed
Example polygon object in Cheetah3D with smooth angle set to 45.1 degrees

Alternatively, if we set the Smooth angle property to something smaller than the angle of the polygon faces then the object will render with hard edges but the faces will be rid of the inconsistent smoothing artifacts shown above.  This is essentially the same as using the "Flat" smoothing option.

Example polygon object in Cheetah3D with smooth angle set to 44.9 degrees

I hope this helps you get around this behavior in your own Cheetah3D projects and that you found this tip to be helpful.  Thanks for reading.

Cheers!