Subdivision
 
 
 

Each subdivision level (SubdivisionLevel) is a mesh that represents the same surface with different approximation. Subdivision levels are child nodes of a Geometry object. An object can have multiple levels and exactly one is active at a time. Each subdivision level is a normal mesh, stored as a relative difference to the previous level. When a level is modified, the upper level vertices will have the positions calculated from the modified one plus the relative differences from the previous modifications of the upper level. Until the level is modified the difference is (0,0,0) in all vertices. When a level becomes active these relative positions are transformed into absolute ones so that brushes can work on the level as a regular mesh. When deactivating a level the details are transferred to the new active level and positions are changed back to relative.

Subdivision produces M*N faces from an N-faces mesh where faces have M corners. It uses the Catmull-Clark scheme for creating and smoothing the higher level vertices.

Each level is connected with the upper and lower one. If a polygon is taken from one level, it has 4 corresponding polygons in the next level, and one in the previous level. This correspondence is based on an identifier called the global ID. On level 0 the global ID is equivalent to the face ID in the beginning. If a face has global ID of N, on the next level the corresponding faces has the global ID of N*4+k, k=[0..3]. On the previous level its pair is the one with the [N/4] global ID.

It is possible to create the UV coordinates for a higher level of subdivision if the original level has any. The new UVs can be unsmoothed, smoothed or CC-smoothed. Smoothing means the vertices from the original level will have the original UVs while the inner ones will have the averaged value of the neighbors. If UVs are not intended to be created during subdivision, they can be recreated at any time later.