Primitives to Meshes#
Key: primitivesToMeshes
This operation replaces gprim types sphere, cylinder, capsule, cone, and cube with a mesh approximation. This allows the geometry to be used with operations that require mesh types.
Capsule height describes the cylindrical body, excluding the two hemispherical caps. Capsule meshes approximate this height and preserve the radius and axis without stretching the caps. Use capsuleRadialDivisions for circumferential detail, capsuleLengthDivisions for body subdivisions, and capsuleCapDivisions for rounded-end detail. Increasing these values increases mesh size. Capsules are always closed.
Capsule prototypes have radius one. The height/radius ratio is first converted to a single-precision float. All eight exponent bits and the highest 20 fraction bits, without the sign bit, are encoded as seven uppercase hexadecimal digits after _hr. The lowest three fraction bits are zeroed for geometry, so ratios with the same code share a prototype without ratio-collision suffixes, independently of conversion order. Capsules with the same quantized ratio, axis, and subdivision settings share a prototype; a uniform scale restores each capsule’s radius, while its body height approximates the original according to the quantized ratio. Capsules with invalid dimensions (nonpositive radius, negative height, nonfinite dimensions, or a ratio outside the finite float range) are skipped.
Arguments#
Primitives to convert#
Optional list of prim paths to consider
Name:
pathsType:
[string]Default Value:
[]
Convert sphere primitives#
Whether or not to generate meshes from sphere prims.
Name:
convertSpheresType:
boolDefault Value:
True
Longitude divisions#
The number of longitudinal divisions in which to divide spheres. Must be at least 3.
Name:
sphereLongitudeDivisionsType:
intDefault Value:
32Min Value:
3.0Max Value:
1000.0
Latitude divisions#
The number of latitudinal divisions in which to divide spheres. Must be at least 2.
Name:
sphereLatitudeDivisionsType:
intDefault Value:
16Min Value:
2.0Max Value:
1000.0
Convert cylinder primitives#
Whether or not to generate meshes from cylinder prims.
Name:
convertCylindersType:
boolDefault Value:
True
Wall divisions#
The number of divisions to make around the cylinder wall. Must be at least 3.
Name:
cylinderWallDivisionsType:
intDefault Value:
32Min Value:
3.0Max Value:
1000.0
Length divisions#
The number of end-to-end divisions to make along the cylinder. Must be positive.
Name:
cylinderLatitudeDivisionsType:
intDefault Value:
1Min Value:
1.0Max Value:
1000.0
Generate endcaps#
Whether or not to add endcaps to generated cylinder meshes.
Name:
cylinderEndcapsType:
boolDefault Value:
True
Convert capsule primitives#
Whether or not to generate meshes from capsule prims.
Name:
convertCapsulesType:
boolDefault Value:
True
Radial divisions#
The number of divisions around the capsule. Must be at least 3.
Name:
capsuleRadialDivisionsType:
intDefault Value:
32Min Value:
3.0Max Value:
1000.0
Length divisions#
The number of lengthwise divisions along the cylindrical body. Must be positive.
Name:
capsuleLengthDivisionsType:
intDefault Value:
1Min Value:
1.0Max Value:
1000.0
Cap latitude divisions#
The number of latitude divisions per hemispherical endcap. Must be positive.
Name:
capsuleCapDivisionsType:
intDefault Value:
8Min Value:
1.0Max Value:
1000.0
Convert cone primitives#
Whether or not to generate meshes from cone prims.
Name:
convertConesType:
boolDefault Value:
True
Side divisions#
The number of divisions to make around the side of the cone. Must be at least 3.
Name:
coneSideDivisionsType:
intDefault Value:
64Min Value:
3.0Max Value:
1000.0
Length divisions#
The number of divisions to make along the length of the cone. Must be positive.
Name:
coneLengthDivisionsType:
intDefault Value:
3Min Value:
1.0Max Value:
1000.0
Generate bases#
Whether or not to add a base to generated cone meshes.
Name:
coneBasesType:
boolDefault Value:
True
Convert cube primitives#
Whether or not to generate meshes from cube prims.
Name:
convertCubesType:
boolDefault Value:
True