How to Adjust Crease Angles, Lighting, Normals?

How to Adjust Crease Angles, Lighting, Normals?

Regarding lighting/normals, sometimes it may be preferred to have constant normal vector within surface of single triangle, resulting in “flat” lighting. If this is the case then there is no need to store normals in PRC stream explicitly, they could be auto-generated implicitly. There is special parameter to control how normals will be auto-generated. By using  PDF3DIntermediateModel::SetCreaseAngle(), this is threshold angle in degrees between planes of adjacent triangles for averaging shared normals.  Set it to ZERO and each triangle will have normals based only on it’s plane resulting in “flat” lighting. (setting it to value like 45 degrees would result in “smooth” lighting).