TurnToPoint - superclass: modifier; super-superclass:MAXWrapper - classID: #(97207648L, 2125481096L)The Turn to Point modifier (shown in the modifier list as Turn to Point, in the Points category) converts the object below it in the stack into a point object. You can make one point per vertex, fill the object's volume with a regular grid of points, or scatter points over its surface by total count or by density. It can also jitter the points, write an orientation channel, write up to three color channels sampled from maps, and add the new points to a named selection.
Supported inputs are meshes, polys, patches, shapes/splines, Particle Flow and legacy particle systems, and Gaussian Splat objects. Particles and Gaussian Splats are converted point-for-point: the conversion type is ignored and only positions are kept. Point objects pass through unchanged. Unsupported objects (lights, cameras, and so on) are also left unchanged, and the rollup shows an error indicator instead of a point count.
Available in 3ds Max 2027.2 and higher. In 3ds Max 2027.3, surface scattering was changed to weight faces by area (see .samplingVersion).
TurnToPoint...<TurnToPoint>.conversionType Integer default: 0 -- integerGets/sets how points are generated from the input object:
spacing between them, kept only where the grid points lie inside the closed mesh. The result is capped at maxPoints.count points scattered over the surface.density points per square densityUnits. The result is capped at maxPoints.A fifth option, Surface (Poisson Cartesian), is not available in 3ds Max 2027, so the valid range is 0 to 3. Out-of-range values are treated as 0.
<TurnToPoint>.spacing Float default: 5.0 -- animatable; worldUnitsGets/sets the distance between grid points, in world units, when conversionType is 1 (Fill Volume). Range: 0.001 to 9999999.9.
<TurnToPoint>.count Integer default: 100 -- animatable; integerGets/sets the total number of points to scatter when conversionType is 2 (Surface (Count)). Range: 0 to 99999999.
<TurnToPoint>.density Float default: 1.0 -- animatable; floatGets/sets the number of points per square densityUnits of surface area when conversionType is 3 (Surface (Density)). Range: 0.0 to 99999999.9.
<TurnToPoint>.densityUnits Integer default: 4 -- integerGets/sets the area unit that density is measured in:
The UI drop-down lists these in a different order (Millimeters, Centimeters, Inches, Feet, Meters, Kilometers, Miles). The values above are the ones stored in the parameter.
<TurnToPoint>.maxPoints Integer default: 100000 -- animatable; integerGets/sets the maximum number of points the modifier will produce. It applies when conversionType is 1 (Fill Volume) or 3 (Surface (Density)). If Fill Volume produces more points than this, the result is reduced to maxPoints in a pseudo-random order controlled by seed. Range: 1 to 999999999.
<TurnToPoint>.samplingVersion Integer default: 1 -- integerGets/sets which algorithm the surface scatter modes use to choose the face each point lands on. This property has no UI. Available in 3ds Max 2027.3 and higher. In 3ds Max 2027.2, the surface scatter modes always use the Bucket Uniform algorithm.
Set it to 1 to deliberately move an older modifier onto the improved algorithm. Values other than 0 are treated as 1.
<TurnToPoint>.useJitter BooleanClass default: false -- booleanSpecifies whether to apply a random positional offset (jitter) to each generated point.
<TurnToPoint>.jitterX Float default: 1.0 -- animatable; floatGets/sets the jitter range along X. Each point is offset by a random amount between -jitterX/2 and +jitterX/2. When jitterLock is true, this value is used for all three axes. Range: 0.0 to 9999999.9.
<TurnToPoint>.jitterY Float default: 1.0 -- animatable; floatGets/sets the jitter range along Y when jitterLock is false. Range: 0.0 to 9999999.9.
<TurnToPoint>.jitterZ Float default: 1.0 -- animatable; floatGets/sets the jitter range along Z when jitterLock is false. Range: 0.0 to 9999999.9.
<TurnToPoint>.jitterLock BooleanClass default: true -- booleanSpecifies whether jitterY and jitterZ are locked to jitterX, so that one value controls jitter on all three axes.
<TurnToPoint>.constrainToVolume BooleanClass default: false -- booleanWhen conversionType is 1 (Fill Volume) and useJitter is true, specifies whether jitter is applied before the inside/outside test. When true, the test runs on the jittered positions, so every point stays inside the volume. When false, jitter is applied after the test, so points near the boundary can move outside it.
<TurnToPoint>.seed Integer default: 12345 -- integerGets/sets the random seed used for jitter, surface scattering and maxPoints reduction. Range: 0 to 9999999. The rollup's re-randomize button sets this from the system clock.
<TurnToPoint>.createOrientation BooleanClass default: false -- booleanSpecifies whether to write a per-point orientation vector into the standard Autodesk 3dsmax InstanceNormal channel. The vector is the vertex normal in Vertices to Points mode, the surface normal in the surface scatter modes, and the curve tangent for shapes converted per vertex. The channel is set to transform with the geometry.
<TurnToPoint>.colorFromSurface BooleanClass default: false -- booleanSpecifies whether to sample color channels from maps on the surface. This only takes effect when conversionType is 2 or 3 (a surface scatter mode). Each of the three channel slots below is written only when both its channel name and its map are set.
<TurnToPoint>.colorChannelName UndefinedClass default: undefined -- stringGets/sets the name of the first color channel to write. The full channel name is Autodesk 3dsmax <name>. If the name matches a standard channel name other than the standard color channel, (User) is appended so the standard channel is not overwritten.
<TurnToPoint>.colorMapChannel Integer default: 1 -- integerGets/sets the UV map channel used to sample colorChannelMap for the first color channel. Range: 1 to 99.
<TurnToPoint>.colorChannelMap UndefinedClass default: undefined -- texturemapGets/sets the map sampled at each scattered point to fill the first color channel.
<TurnToPoint>.colorChannelName2 UndefinedClass default: undefined -- string
<TurnToPoint>.colorMapChannel2 Integer default: 1 -- integer
<TurnToPoint>.colorChannelMap2 UndefinedClass default: undefined -- texturemapThe channel name, UV map channel (1 to 99) and map for the second color channel. They work the same way as the first set.
<TurnToPoint>.colorChannelName3 UndefinedClass default: undefined -- string
<TurnToPoint>.colorMapChannel3 Integer default: 1 -- integer
<TurnToPoint>.colorChannelMap3 UndefinedClass default: undefined -- texturemapThe channel name, UV map channel (1 to 99) and map for the third color channel. They work the same way as the first set.
<TurnToPoint>.createNamedSel BooleanClass default: false -- booleanSpecifies whether to add every generated point to the named selection given by NamedSel.
<TurnToPoint>.NamedSel UndefinedClass default: undefined -- stringGets/sets the name of the named selection to create when createNamedSel is true. It is stored as the channel Autodesk 3dsmax-NSel <name>, with every generated point selected. Nothing is created if the resulting channel name is invalid.
<TurnToPoint>.pointSize Float default: 5.0 -- floatGets/sets the display point size applied to the point object this modifier outputs. Range: 0.0 to 999.9.
<TurnToPoint>.minSpacing Float default: 5.0 -- animatable; worldUnits
<TurnToPoint>.maxSpacing Float default: 5.0 -- animatable; worldUnitsGet/set the minimum and maximum spacing for the Surface (Poisson Cartesian) scatter mode. Range: 0.01 to 9999999.9. That mode is not available in 3ds Max 2027, so these values have no effect.
-- Scatter 5000 points over the surface of a teapot, with orientations
t = Teapot radius:20
m = TurnToPoint()
addModifier t m
m.conversionType = 2 -- Surface (Count)
m.count = 5000
m.createOrientation = true
m.useJitter = true
m.jitterX = 0.5
-- Check the result with a temporary Edit Point modifier
em = EditPointMod()
addModifier t em
classof t
count = 0
em.GetPointCount t &count
count
names = #()
em.GetAllChannelNames t &names
names
deleteModifier t emOUTPUT:
Editable_Point -- the teapot now evaluates to a point object
5000
#("Autodesk 3dsmax Selection", "3dsMax Point Positions", "Autodesk 3dsmax InstanceNormal")The orientations written by .createOrientation are stored in the Autodesk 3dsmax InstanceNormal channel. The classof t call evaluates the modifier stack so that the Edit Point modifier has point data to read.