Perform optimizations of the node.
<node3d>.optimize( | |
flag = viz.OPT_DEFAULT | |
) |
Optimization flag | |
viz.OPT_FLATTEN_STATIC_TRANSFORMS | Flatten Static Transform nodes by applying their transform to the geometry on the leaves of the scene graph, then removing the now redundant transforms. Static transformed Subgraphs that have multiple parental paths above them are not flattened, if you require this then the subgraphs have to be duplicated - for this use viz.OPT_FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS. |
viz.OPT_REMOVE_REDUNDANT_NODES | Remove rendundant nodes, such as groups with one single child. |
viz.OPT_REMOVE_LOADED_PROXY_NODES | Remove loaded proxy nodes. |
viz.OPT_COMBINE_ADJACENT_LODS | Optimize the LOD groups, by combining adjacent LOD's which have complementary ranges. |
viz.OPT_SHARE_DUPLICATE_STATE | Optimize State in the scene graph by removing duplicate state, replacing it with shared instances, both for StateAttributes, and whole StateSets. |
viz.OPT_MERGE_GEOMETRY | |
viz.OPT_CHECK_GEOMETRY | |
viz.OPT_MAKE_FAST_GEOMETRY | |
viz.OPT_SPATIALIZE_GROUPS | Spatialize scene into a balanced quad/oct tree. |
viz.OPT_COPY_SHARED_NODES | Copy any shared subgraphs, enabling flattening of static transforms. |
viz.OPT_TRISTRIP_GEOMETRY | Convert Geometry surface primitives into tri strips. |
viz.OPT_TESSELLATE_GEOMETRY | Tessellate all geodes, to remove POLYGONS. |
viz.OPT_OPTIMIZE_TEXTURE_SETTINGS | Optimize textures by freeing image data. |
viz.OPT_MERGE_GEODES | Combine geodes. |
viz.OPT_FLATTEN_BILLBOARDS | Flatten MatrixTransform/Billboard pairs. |
viz.OPT_TEXTURE_ATLAS_BUILDER | Optimize texture usage in the scene graph by combining textures into texture atlas. Use of texture atlas cuts down on the number of separate states in the scene, reducing state changes and improving the chances of use larger batches of geomertry. |
viz.OPT_STATIC_OBJECT_DETECTION | Optimize the setting of StateSet and Geometry objects in scene so that they have a STATIC DataVariance when they don't have any callbacks associated with them. |
viz.OPT_FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS | Similar to viz.OPT_FLATTEN_STATIC_TRANSFORMS in that is desgined to remove static transforms from the scene graph, pushing down the transforms to the geometry leaves of the scene graph, but with the difference that any subgraphs that are shared between different transforms of duplicated and flatten individually. This results in more static transforms being removed, but also means that more data is generated, and as a result may not always be the most appropriate flatten visitor to use. |
viz.OPT_INDEX_MESH | Convert geometry that uses DrawArrays to DrawElements i.e., construct a real mesh. This removes duplicate vertices. |
viz.OPT_VERTEX_POSTTRANSFORM | Optimize the triangle order in a mesh for best use of the GPU's post-transform cache. |
viz.OPT_VERTEX_PRETRANSFORM | Optimize the use of the GPU pre-transform cache by arranging vertex attributes in the order they are used. |
viz.OPT_ALL | A combination of all optimization flags. |
viz.OPT_DEFAULT | A combination of the following flag: |