subdivide - superclass: modifier; super-superclass:MAXWrapper - classID: #(283338281, 240408334)The Subdivide Modifier provides procedural means for subdividing polygons for radiosity processing.
The Subdivide Modifier 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.
subdivide...{toc}
<subdivide>.remeshType Integer default: 0 -- integer; Remesh_TypeGets/sets the Subdivide Mode, where:
<subdivide>.manualUpdate Integer default: 1 -- integer; Manual_UpdateGet/Set the Update mode of the modifier:
0 - Manual
1 - Automatic
2 - Render
<subdivide>.size Float default: variable -- animatable; world unitsGet/set the size, which is the target face length scale on the output mesh. The default (initial) value is 10% of the length of the bounding box for the largest object to which the modifier is applied.
<subdivide>.delaunaySize Float default: variable -- animatable; worldUnits; Delaunay_SizeGet/set the size, which is the target face length scale on the output mesh. The default (initial) value is 10% of the length of the bounding box for the largest object to which the modifier is applied.
<subdivide>.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.
<subdivide>.delaunayRelaxationIterations Integer default: 5 -- animatable; integer; Delaunay_Relaxation_IterationsGet/set the number of relaxation iterations to apply to the output mesh.
<subdivide>.adaptiveEdgeLength Float default: 39.3701 -- animatable; worldUnits; Adaptive_Edge_LengthGet/set the target edge length on the output mesh. The default (initial) value is 10% of the length of the bounding box for the largest object to which the modifier is applied.
<subdivide>.adaptiveRegularity Float default: 0.5 -- animatable; float; Adaptive_RegularityGet/set the degree of regularity imposed upon the output mesh.
<subdivide>.adaptiveThreshold Float default: 0.5 -- animatable; float; Adaptive_ThresholdGet/set the normal threshold value for the remesh algorithm.
<subdivide>.variableCurvatureEdgeLength Float default: 39.3701 -- animatable; worldUnits; Variable_Curvature_Edge_LengthGet/set the target edge length on the output mesh. The default (initial) value is 10% of the length of the bounding box for the largest object to which the modifier is applied.
<subdivide>.variableCurvatureRegularity Float default: 0.5 -- animatable; float; Variable_Curvature_RegularityGet/set the degree of regularity imposed on the output mesh.
<subdivide>.variableCurvatureThreshold Float default: 0.5 -- animatable; float; Variable_Curvature_ThresholdGet/set the normal threshold for the remesh algorithm.
<subdivide>.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.
<subdivide>.variableCurvatureTransition Float default: 0.0 -- animatable; worldUnits; Variable_Curvature_TransitionGet/set the transition region width near boundaries or constrained edges.
<subdivide>.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.
<subdivide>.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.
<subdivide>.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.
<subdivide>.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.
<subdivide>.preserveSharpEdgesByAngle BooleanClass default: false -- boolean; Preserve_Sharp_Edges_By_AngleGet/set the angle, in degrees, above which hard edges are detected.
<subdivide>.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.
<subdivide>.size Float default: 39.3701 -- animatable; world unitsGet/Set the Subdivision Size value.
These parameters are not visible in the Subdivision Modifier UI, and all apply to the legacy Subdivision mode.
<subdivide>.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].
<subdivide>.subdivideDoEnforceQuality BooleanClass default: true -- boolean; Subdivide_Do_Enforce_QualityA flag controlling the imposition of quality checks on the output mesh.
<subdivide>.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.
<subdivide>.subdivideDoSubdivideTriangles BooleanClass default: true -- boolean; Subdivide_Do_Subdivide_TrianglesA flag indicating whether triangular faces are to be subdivide during remeshing.
<subdivide>.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.
<subdivide>.subdivideNumBuckets Integer default: 64 -- integer; Subdivide_Number_of_BucketsThe number of "buckets" into which faces should be divided, according to quality metrics, during remeshing.
<subdivide>.subdivideQuadAreaRatio Float default: 0.75 -- float; Subdivide_Quad_Area_RatioAn area scaling factor for computing quadrilateral face quality metrics.
<subdivide>.subdivideRefinementType Integer default: 1 -- integer; Subdivide_Refinement_TypeThe 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 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).
-- 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 = subdivide remeshType:2 manualUpdate:0 -- adaptive, manual update
addModifier b subdv
subdv.UpdateSubdivision() - manually update