SubdivideSpacewarpModifier : SpacewarpModifier
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.
Constructor
subdivideSpacewarpModifier... {toc}
Properties
<subdivideSpacewarpModifier>.remeshType Integer default: 0 -- integer; Remesh_TypeGets/sets the Subdivide Mode, where:
- 0 = Subdivide
- 1 = Delaunay
- 2 = Adaptive
- 3 = Variable Curvature
<subdivideSpacewarpModifier>.manualUpdate Integer default: 1 -- integer; Manual_UpdateGet/Set the Update mode of the modifier:
0 - Manual
1 - Automatic
2 - Render
Subdivide Mode Properties
<subdivideSpacewarpModifier>.size Float default: 39.3701 -- animatable; world unitsGet/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.
Delaunay Mode Properties
<subdivideSpacewarpModifier>.delaunaySize Float default: 39.3701 -- animatable; worldUnits; Delaunay_SizeGet/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_CoefficientGet/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_IterationsGet/set the number of relaxation iterations to apply to the output mesh.
Adaptive Mode Properties
<subdivideSpacewarpModifier>.adaptiveEdgeLength Float default: 39.3701 -- animatable; worldUnits; Adaptive_Edge_LengthGet/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_RegularityGet/set the degree of regularity imposed upon the output mesh.
<subdivideSpacewarpModifier>.adaptiveThreshold Float default: 0.5 -- animatable; float; Adaptive_ThresholdGet/set the normal threshold value for the remesh algorithm.
Variable Curvature Mode Properties
<subdivideSpacewarpModifier>.variableCurvatureEdgeLength Float default: 39.3701 -- animatable; worldUnits; Variable_Curvature_Edge_LengthGet/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_RegularityGet/set the degree of regularity imposed on the output mesh.
<subdivideSpacewarpModifier>.variableCurvatureThreshold Float default: 0.5 -- animatable; float; Variable_Curvature_ThresholdGet/set the normal threshold for the remesh algorithm.
<subdivideSpacewarpModifier>.variableCurvatureVariableDensity Float default: 0.1 -- animatable; float; Variable_Curvature_Variable_DensityGet/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_TransitionGet/set the transition region width near boundaries or constrained edges.
<subdivideSpacewarpModifier>.variableCurvatureIterations Integer default: 1 -- animatable; integer; Variable_Curvature_IterationsGet/set the number of algorithm iterations. Use of this parameter is discouraged. Note: this parameter is not exposed in the modifier UI.
Preserve Mesh Data Properties
<subdivideSpacewarpModifier>.preserveMeshData BooleanClass default: true -- boolean; Preserve_Mesh_DataSpecifies 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_IndexGet/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_AngleSpecifies 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_AngleGet/set the angle, in degrees, above which hard edges are detected.
<subdivideSpacewarpModifier>.showAllTriangles Boolean default: true -- boolean; Show_All_TrianglesGet/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 unitsGet/Set the Subdivision Size value.
Hidden Parameters
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_RatioThe 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_QualityA flag controlling the imposition of quality checks on the output mesh.
<subdivideSpacewarpModifier>.subdivideDoFormQuads BooleanClass default: false -- boolean; Subdivide_Do_Form_QuadsA 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_TrianglesA flag indicating whether triangular faces are to be subdivide during remeshing.
<subdivideSpacewarpModifier>.subdivideMaxSteinerPoints Integer default: -1 -- integer; Subdivide_Maximum_Steiner_PointsThe 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_BucketsThe 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_RatioAn area scaling factor for computing quadrilateral face quality metrics.
<subdivideSpacewarpModifier>.subdivideRefinementType Integer default: 1 -- integer; Subdivide_Refinement_TypeThe refinement type to employ in the remesh algorithm, wher 0 = standard triangulation and 1 = Rivara.
Interface: subdivideModInterface
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 parameterPerforms 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).
Example
-- 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
