Subdivide : Modifier

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.

Constructor

subdivide...

{toc}

Properties

<subdivide>.remeshType     Integer    default: 0   --  integer; Remesh_Type

Gets/sets the Subdivide Mode, where:

<subdivide>.manualUpdate Integer default: 1 -- integer; Manual_Update

Get/Set the Update mode of the modifier:

0 - Manual

1 - Automatic

2 - Render

Subdivide Mode Properties

<subdivide>.size Float default: variable -- animatable; world units

Get/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.

Delaunay Mode Properties

<subdivide>.delaunaySize     Float    default: variable   --  animatable; worldUnits; Delaunay_Size

Get/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_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.

<subdivide>.delaunayRelaxationIterations     Integer    default: 5   --  animatable; integer; Delaunay_Relaxation_Iterations

Get/set the number of relaxation iterations to apply to the output mesh.

Adaptive Mode Properties

<subdivide>.adaptiveEdgeLength     Float    default: 39.3701   --  animatable; worldUnits; Adaptive_Edge_Length

Get/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_Regularity

Get/set the degree of regularity imposed upon the output mesh.

<subdivide>.adaptiveThreshold     Float    default: 0.5   --  animatable; float; Adaptive_Threshold

Get/set the normal threshold value for the remesh algorithm.

Variable Curvature Mode Properties

<subdivide>.variableCurvatureEdgeLength     Float    default: 39.3701   --  animatable; worldUnits; Variable_Curvature_Edge_Length

Get/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_Regularity

Get/set the degree of regularity imposed on the output mesh.

<subdivide>.variableCurvatureThreshold     Float    default: 0.5   --  animatable; float; Variable_Curvature_Threshold

Get/set the normal threshold for the remesh algorithm.

<subdivide>.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.

<subdivide>.variableCurvatureTransition     Float    default: 0.0   --  animatable; worldUnits; Variable_Curvature_Transition

Get/set the transition region width near boundaries or constrained edges.

<subdivide>.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.

Preserve Mesh Data Properties

<subdivide>.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.

<subdivide>.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.

<subdivide>.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.

<subdivide>.preserveSharpEdgesByAngle     BooleanClass    default: false   --  boolean; Preserve_Sharp_Edges_By_Angle

Get/set the angle, in degrees, above which hard edges are detected.

<subdivide>.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.

<subdivide>.size Float default: 39.3701 -- animatable; world units

Get/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.

<subdivide>.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].

<subdivide>.subdivideDoEnforceQuality     BooleanClass    default: true   --  boolean; Subdivide_Do_Enforce_Quality

A flag controlling the imposition of quality checks on the output mesh.

<subdivide>.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.

<subdivide>.subdivideDoSubdivideTriangles     BooleanClass    default: true   --  boolean; Subdivide_Do_Subdivide_Triangles

A flag indicating whether triangular faces are to be subdivide during remeshing.

<subdivide>.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.

<subdivide>.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.

<subdivide>.subdivideQuadAreaRatio     Float    default: 0.75   --  float; Subdivide_Quad_Area_Ratio

An area scaling factor for computing quadrilateral face quality metrics.

<subdivide>.subdivideRefinementType     Integer    default: 1   --  integer; Subdivide_Refinement_Type

The 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 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).

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 = subdivide remeshType:2 manualUpdate:0 -- adaptive, manual update
addModifier b subdv
subdv.UpdateSubdivision() - manually update