![]() |
Polygon Crucher SDK - Documentation
Documentation
|
Normals always need explanations, as there is 3 kind of normals in the SDK:
CPointNormalChannel => Auto generated normal channels on each point (allows normal breaks) => Ignored during optimization CFaceNormalChannel => Auto generated normal channels on each face => Ignored during optimization CSpecNormalChannel => User specified channel => Taken into account during optimization
The 2 first kind of normals are auto-generated, which means it can be autogenerated before optimization, but also after.
To generate normals automatically you may use:
CSpecNormalChannel is the class through you can optimize some provided normal. This is important to balance if the provided normals have a real interest. If auto generated normals are sufficient, this is better to not provide normals. Normal optimization adds important constraint and reduces the optimization quality, leading to lower optimization ratio.
If normals are important, then you provide them and use CSpecNormalChannel.
To optimize properly normals you must define the normal optimization threshold (radian)
This threshold define an angle between normals above which optimization consider that there is a normal break. A normal break constraint optimizer which will try to optimize something else.
There is several level of protection for normal optimization. OPTIMIZE_KEEP_NORMALS is the lowest (the one I would use). OPTIMIZE_KEEP_NORMALS|OPTIMIZE_PROTECT_NORMALS is stronger and **OPTIMIZE_KEEP_NORMALS|OPTIMIZE_EXCLUDE_NORMALS **will freeze any points that has a normal break above specified threshold.
Modules | |
Smooth angle and normals | |