subdivideSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(756131754, 213087256)
The SubdivideSpacewarpModifier provides procedural means for subdividing polygons for radiosity processing.
The SubdivideSpacewarpModifier has three new remeshing algorithms (Delaunay, Adaptive, and Variable Curvature), and all the properties and interfaces below are new, except for size
, showAllTriangles
, and manualUpdate
.
Available in 3ds Max 2021.3 Update and higher.
subdivideSpacewarpModifier...
{toc}
<subdivideSpacewarpModifier>.remeshType Integer default: 0 -- integer; Remesh_Type
Gets/sets the Subdivide Mode, where:
<subdivideSpacewarpModifier>.manualUpdate Integer default: 1 -- integer; Manual_Update
Get/Set the Update mode of the modifier:
0 - Manual
1 - Automatic
2 - Render
<subdivideSpacewarpModifier>.size Float default: 39.3701 -- animatable; world units
Get/set the size, which is the target face length scale on the output mesh. The default value is 1 meter, converted to the scene's base unit.
<subdivideSpacewarpModifier>.delaunaySize Float default: 39.3701 -- animatable; worldUnits; Delaunay_Size
Get/set the size, which is the target face length scale on the output mesh. The default value is 1 meter, converted to the scene's base unit.
<subdivideSpacewarpModifier>.delaunayRelaxationCoeff Float default: 0.0 -- animatable; float; Delaunay_Relaxation_Coefficient
Get/set the Relax value, which is the blending between relaxed and unrelaxed vertex positions at each relaxation iteration, where 1.0 is fully relaxed.
<subdivideSpacewarpModifier>.delaunayRelaxationIterations Integer default: 5 -- animatable; integer; Delaunay_Relaxation_Iterations
Get/set the number of relaxation iterations to apply to the output mesh.
<subdivideSpacewarpModifier>.adaptiveEdgeLength Float default: 39.3701 -- animatable; worldUnits; Adaptive_Edge_Length
Get/set the target edge length on the output mesh. The default value is 1 meter, converted to the scene's base unit.
<subdivideSpacewarpModifier>.adaptiveRegularity Float default: 0.5 -- animatable; float; Adaptive_Regularity
Get/set the degree of regularity imposed upon the output mesh.
<subdivideSpacewarpModifier>.adaptiveThreshold Float default: 0.5 -- animatable; float; Adaptive_Threshold
Get/set the normal threshold value for the remesh algorithm.
<subdivideSpacewarpModifier>.variableCurvatureEdgeLength Float default: 39.3701 -- animatable; worldUnits; Variable_Curvature_Edge_Length
Get/set the target edge length on the output mesh. The default value is 1 meter, converted to the scene's base unit.
<subdivideSpacewarpModifier>.variableCurvatureRegularity Float default: 0.5 -- animatable; float; Variable_Curvature_Regularity
Get/set the degree of regularity imposed on the output mesh.
<subdivideSpacewarpModifier>.variableCurvatureThreshold Float default: 0.5 -- animatable; float; Variable_Curvature_Threshold
Get/set the normal threshold for the remesh algorithm.
<subdivideSpacewarpModifier>.variableCurvatureVariableDensity Float default: 0.1 -- animatable; float; Variable_Curvature_Variable_Density
Get/set the amount of density variation in regions of strong curvature. A smaller value permits more refinement in such regions.
<subdivideSpacewarpModifier>.variableCurvatureTransition Float default: 0.0 -- animatable; worldUnits; Variable_Curvature_Transition
Get/set the transition region width near boundaries or constrained edges.
<subdivideSpacewarpModifier>.variableCurvatureIterations Integer default: 1 -- animatable; integer; Variable_Curvature_Iterations
Get/set the number of algorithm iterations. Use of this parameter is discouraged. Note: this parameter is not exposed in the modifier UI.
<subdivideSpacewarpModifier>.preserveMeshData BooleanClass default: true -- boolean; Preserve_Mesh_Data
Specifies whether to preserve original mesh data on the output mesh, using the values in the properties below.
<subdivideSpacewarpModifier>.preservedMapIndex Integer default: 1 -- integer; Preserved_Map_Index
Get/set the map channel for which map coordinates and seams should be propagated to the output mesh.
<subdivideSpacewarpModifier>.preservedSharpEdgeAngle Float default: 30.0 -- float; Preserved_Sharp_Edge_Angle
Specifies whether to propagate hard edges, detected based upon the angle between adjacent face normals, to the output mesh. Additionally, this parameter influences the degree of refinement near such edges for the Variable Curvature algorithm.
<subdivideSpacewarpModifier>.preserveSharpEdgesByAngle BooleanClass default: false -- boolean; Preserve_Sharp_Edges_By_Angle
Get/set the angle, in degrees, above which hard edges are detected.
<subdivideSpacewarpModifier>.showAllTriangles Boolean default: true -- boolean; Show_All_Triangles
Get/Set the state of the "Display Subdivisions" checkbox. Controls whether to display the subdivision in the viewport or not.
<subdivideSpacewarpModifier>.size Float default: 39.3701 -- animatable; world units
Get/Set the Subdivision Size value.
These parameters are not visible in the Subdivision Modifier UI, and all apply to the legacy Subdivision mode.
<subdivideSpacewarpModifier>.subdivideDiagonalRatio Float default: 0.6 -- float; Subdivide_Diagonal_Ratio
The diagonal length scaling factor for computing quadrilateral face quality metrics; value of 0.6 by default, range [0.0, 1.0].
<subdivideSpacewarpModifier>.subdivideDoEnforceQuality BooleanClass default: true -- boolean; Subdivide_Do_Enforce_Quality
A flag controlling the imposition of quality checks on the output mesh.
<subdivideSpacewarpModifier>.subdivideDoFormQuads BooleanClass default: false -- boolean; Subdivide_Do_Form_Quads
A flag indicating whether triangular faces generated by the remesh algorithm should be merged into quadrilateral faces.
<subdivideSpacewarpModifier>.subdivideDoSubdivideTriangles BooleanClass default: true -- boolean; Subdivide_Do_Subdivide_Triangles
A flag indicating whether triangular faces are to be subdivide during remeshing.
<subdivideSpacewarpModifier>.subdivideMaxSteinerPoints Integer default: -1 -- integer; Subdivide_Maximum_Steiner_Points
The maximum number of Steiner points to be used by the remesh algorithm, or the invalid value -1 to indicate the unlimited case.
<subdivideSpacewarpModifier>.subdivideNumBuckets Integer default: 64 -- integer; Subdivide_Number_of_Buckets
The number of "buckets" into which faces should be divided, according to quality metrics, during remeshing.
<subdivideSpacewarpModifier>.subdivideQuadAreaRatio Float default: 0.75 -- float; Subdivide_Quad_Area_Ratio
An area scaling factor for computing quadrilateral face quality metrics.
<subdivideSpacewarpModifier>.subdivideRefinementType Integer default: 1 -- integer; Subdivide_Refinement_Type
The refinement type to employ in the remesh algorithm, wher 0 = standard triangulation and 1 = Rivara.
Methods:
<void>UpdateSubdivision()
Remeshes each object to which the modifier is applied, using the current parameters.
<void>UpdateSubdivisionWithInfo <&integer>nObjectsSucceeded <&integer>nObjectsTot <&integer>computeTime
nObjectsSucceeded is In and Out parameter
nObjectsTot is In and Out parameter
computeTime is In and Out parameter
Performs the same operation as UpdateSubdivision()
, and also returns the total number of objects (nObjectsTot
), the number for which remeshing succeeded (nObjectsSucceeded
), and the compute time (computeTime
).
-- subdivide example
resetMaxFile #noprompt
b = Box lengthsegs:1 widthsegs:1 heightsegs:1 pos:[0.0,0.0,0.0] isSelected:on width:50.0 length:50.0 height:50.0 mapCoords:true
subdv = subdivideSpacewarpModifier remeshType:2 manualUpdate:0 -- adaptive, manual update
addModifier b subdv
subdv.UpdateSubdivision() -- manually update