Options which affect how nodes are cooked.
Methods ¶
splitGeosByGroup
: bool
Property
Normally, geos are split into parts in two different ways. First it is split by group and within each group it is split by primitive type.
For example, if you have a geo with group1 covering half of the mesh and volume1 and group2 covering the other half of the mesh, all of curve1, and volume2 you will end up with 5 parts. First two parts will be for the half-mesh of group1 and volume1, and the last three will cover group2.
This toggle lets you disable the splitting by group and just have the geo be split by primitive type alone. By default, this is True and therefore geos will be split by group and primitive type. If set to false, geos will only be split by primitive type.
splitGroupSH
: int
Property
Normally, geos are split into parts in two different ways. First it is split by group and within each group it is split by primitive type.
For example, if you have a geo with group1 covering half of the mesh and volume1 and group2 covering the other half of the mesh, all of curve1, and volume2 you will end up with 5 parts. First two parts will be for the half-mesh of group1 and volume1, and the last three will cover group2.
This toggle lets you disable the splitting by group and just have the geo be split by primitive type alone. By default, this is True and therefore geos will be split by group and primitive type. If set to false, geos will only be split by primitive type.
splitGeosByAttribute
: bool
Property
This toggle lets you enable the splitting by unique values of a specified attribute. By default, this is False and the geo be split as described above. as described above. If this is set to true, and splitGeosByGroup set to false, mesh geos will be split on attribute values The attribute name to split on must be created with hapi.setCustomString and then the splitAttrSH handle set on the struct.
splitAttrSH
: int
Property
This toggle lets you enable the splitting by unique values of a specified attribute. By default, this is False and the geo be split as described above. as described above. If this is set to true, and splitGeosByGroup set to false, mesh geos will be split on attribute values The attribute name to split on must be created with hapi.setCustomString and then the splitAttrSH handle set on the struct.
maxVerticesPerPrimitive
: int
Property
For meshes only, this is enforced by convexing the mesh. Use -1 to avoid convexing at all and get some performance boost.
refineCurveToLinear
: bool
Property
For curves only. If this is set to true, then all curves will be refined to a linear curve and you can no longer access the original CVs. You can control the refinement detail via hapi.CookOptions.curveRefineLOD. If it’s false, the curve type (NURBS, Bezier etc) will be left as is.
curveRefineLOD
: float
Property
Controls the number of divisions per unit distance when refining a curve to linear. The default in Houdini is 8.0.
clearErrorsAndWarnings
: bool
Property
If this option is turned on, then we will recursively clear the errors and warnings (and messages) of all nodes before performing the cook.
cookTemplatedGeos
: bool
Property
Decide whether to recursively cook all templated geos or not.
splitPointsByVertexAttributes
: bool
Property
Decide whether to split points by vertex attributes. This takes all vertex attributes and tries to copy them to their respective points. If two vertices have any difference in their attribute values, the corresponding point is split into two points. This is repeated until all the vertex attributes have been copied to the points.
With this option enabled, you can reduce the total number of vertices on a game engine side as sharing of attributes (like UVs) is optimized. To make full use of this feature, you have to think of Houdini points as game engine vertices (sharable). With this option OFF (or before this feature existed) you had to map Houdini vertices to game engine vertices, to make sure all attribute values are accounted for.
packedPrimInstancingMode
: hapi.packedPrimInstancingMode
Property
Choose how you want the cook to handle packed primitives. The default is: hapi.packedPrimInstancingMode.Disabled
handleBoxPartTypes
: bool
Property
Choose which special part types should be handled. Unhandled special part types will just be refined to hapi.partType.Mesh.
handleSpherePartTypes
: bool
Property
Choose which special part types should be handled. Unhandled special part types will just be refined to hapi.partType.Mesh.
checkPartChanges
: bool
Property
If enabled, sets the hapi.PartInfo.hasChanged member during the cook. If disabled, the member will always be True. Checking for part changes can be expensive, so there is a potential performance gain when disabled.
cacheMeshTopology
: bool
Property
This toggle lets you enable the caching of the mesh topology. By default, this is False. If this is set to true, cooking a mesh geometry will update only the topology if the number of points changed. Use this to get better performance on deforming meshes.
preferOutputNodes
: bool
Property
If enabled, calls to hapi.cookNode on an OBJ node will cook the output nodes of any nested SOP nodes. If none exist or the option is disabled, HAPI will instead cook the display nodes of any nested SOP nodes.
extraFlags
: int
Property
For internal use only. :)