Pricing

uKit

MAXScript

The uOptimize, uVoxelize, uPush and uOffset modifier classes and every property they expose, including the settings with no rollout control.

Everything on the rollouts of the four uKit modifiers, and a few settings with no control, can be driven from MAXScript. Add a modifier with addModifier, for example addModifier $ (uVoxelize voxels:64), find it as $.modifiers[#uVoxelize], and list its properties with showProperties. uKit has no tools interface and no functions. MAXScript lists the names every Verstice plugin answers to.

  • Drop-down lists are integers, counted from 0 in the order the list shows them: method = 2 is Classic (along normal).
  • Script-only properties have no rollout control and are not animatable.

uOptimize : Modifier

addModifier $ (uOptimize())

Superclass modifier, classID #(0x1e94d7c6, 0x63b2f80a). The controls are on the uOptimize Rollout and the Preserve Rollout.

uOptimize Rollout

<uOptimize>.mode Integer default: 0 range: 0 to 3 - Reduce by: 0 Face %, 1 Vertex %, 2 Face count, 3 Vertex count.

<uOptimize>.target_percent Float default: 50.0 range: 0 to 100 - Keep %. Animatable.

<uOptimize>.target_count Integer default: 1000 range: 1 to 100,000,000 - Keep faces or Keep verts. A value below 1 counts as 1.

<uOptimize>.feature_aware Boolean default: true - Feature aware.

Note

The ranges limit the spinners. Whatever a script sets, uOptimize clamps what it reads when it evaluates, so target_percent values of -10, 0 and 150 still give a valid mesh.

Preserve Rollout

<uOptimize>.keep_borders Boolean default: true - Open borders.

<uOptimize>.keep_material_ids Boolean default: true - Material IDs.

<uOptimize>.keep_uvs Boolean default: true - UV seams.

<uOptimize>.keep_smoothing_groups Boolean default: false - Smoothing groups.

<uOptimize>.keep_crease_edges Boolean default: false - Protect creases.

<uOptimize>.crease_angle Float default: 45.0 range: 0 to 180 - Crease angle, in plain degrees, not a MAXScript angle.

Script-Only Properties

Changing any of these makes uOptimize recompute its collapse order, as a Preserve option does.

<uOptimize>.max_error Float default: 0.0 range: 0 to 1,000,000,000,000 - A ceiling on the cost of one collapse, measured with the mesh's longest bounding-box side scaled to 1; 0 means none. Once every remaining collapse costs more, the reduction stops with Stopped short - limited by the error ceiling.

<uOptimize>.uniformity Float default: 0.01 range: 0 to 0.1 - Trades some accuracy for better-shaped triangles and evenly reduced flat regions. 0 turns it off.

<uOptimize>.constraint_strength Float default: 300.0 range: 0 to 1,000,000 - How hard the Preserve options hold their curves. A calibration, not a preference: to release a curve, turn its option off.

<uOptimize>.quad_strength Float default: 0.0 range: 0 to 100 - Keeps quads through the reduction, so the result converts back to Editable Poly with more quads. 0 is off, identical to never setting it; 10 is the recommended on value. A quad is two triangles sharing a hidden edge, so a mesh with no hidden edges has none to keep.

Note

Use 0 or 10 and nothing in between. quad_strength is not a dial: values below about 3 come out worse than 0, and the effect levels off around 10.

uVoxelize : Modifier

addModifier $ (uVoxelize())

Superclass modifier, classID #(0x74c31e5b, 0x2f68a9d4). The control is on the uVoxelize Modifier page.

uVoxelize Rollout

<uVoxelize>.voxels Integer default: 32 range: 2 to 256 - Voxels.

Note

The range limits the spinner. Whatever a script sets, uVoxelize clamps voxels into 2 to 256 when it evaluates, so script values of 0, 1, 4000 and -5 still give a shell.

Script-Only Properties

<uVoxelize>.relax_passes Integer default: 2 range: 0 to 8 - Smoothing passes over the fitted surface: more passes smooth a lumpy shell, and 0 shows it raw. Values outside 0 to 8 are clamped when uVoxelize evaluates, and past a handful nothing visible changes. Each vertex stays inside its own cell, so the passes can't shrink the surface, fold it through itself or add detail: 0 to 8 leaves the face count unchanged and doesn't grow the bounding box.

uPush : Modifier

addModifier $ (uPush())

Superclass modifier, classID #(0x2d7c48f1, 0x619ba03e). The controls are on the uPush Modifier page.

uPush Rollout

<uPush>.value Float default: 0.0 range: −1,000,000 to 1,000,000 - Push value, in scene units. Animatable.

<uPush>.method Integer default: 0 range: 0 to 2 - Method: 0 Corrected (offset), 1 True offset (exact), 2 Classic (along normal).

<uPush>.weld_seams Boolean default: true - Weld seams.

Script-Only Properties

<uPush>.max_scale Float default: 8.0 range: 1 to 1,000 - Caps how far a vertex moves at a sharp corner, as a multiple of value: Corrected (offset) caps its correction factor, True offset (exact) the length of the move, and Classic (along normal) is never capped. Values below 1 count as 1, where Corrected (offset) matches Classic (along normal). Changing it doesn't redo uPush's preparation. Raise it when a blade or wedge tip must reach the exact offset; lower it when sharp corners should fall short rather than spike.

uOffset : Modifier

addModifier $ (uOffset())

Superclass modifier, classID #(0x6b36de57, 0x2d683723). Works on splines and any shape that converts to one. The controls are on the uOffset Modifier page.

uOffset Rollout

<uOffset>.amount Float default: 0.0 range: −1,000,000 to 1,000,000 - Amount, in scene units. Animatable.

<uOffset>.elevation Float default: 0.0 range: −1,000,000 to 1,000,000 - Elevation, in scene units. Animatable.

<uOffset>.copies Integer default: 1 range: 1 to 1,000 - Copies.

<uOffset>.open_mode Integer default: 0 range: 0 to 1 - Open splines: 0 Single side, 1 Outline (both sides).

<uOffset>.keep_original Boolean default: false - Keep original.

Script-Only Properties

Changing either makes uOffset build the offset again.

<uOffset>.steps Integer default: −2 range: −2 to 100 - How finely curves become straight segments. -2 uses the shape's own Interpolation settings, Adaptive and Optimize included; -1 forces adaptive interpolation whatever the shape's Adaptive setting; 0 and above override them with that many steps per segment.

<uOffset>.weld_eps Float default: 1e-9 range: 0 to 0.001 - How close two points must be to weld, as a fraction of the spline's bounding-box diagonal. 0 means 1e-9.

Example Scripts

uOptimize

Keep a quarter of the faces and pin smoothing-group boundaries:

addModifier $ (uOptimize mode:0 target_percent:25.0)
$.modifiers[#uOptimize].keep_smoothing_groups = true

Animate from no reduction to half over 100 frames:

m = $.modifiers[#uOptimize]
m.mode = 0
with animate on (
    at time 0 m.target_percent = 100.0
    at time 100 m.target_percent = 50.0
)

Keep quads, then turn it off; a copy converted to Editable Poly shows more quads with it on:

$.modifiers[#uOptimize].quad_strength = 10.0   -- on
$.modifiers[#uOptimize].quad_strength = 0.0    -- off

uVoxelize

A finer shell, smoothed more:

addModifier $ (uVoxelize voxels:64)
$.modifiers[#uVoxelize].relax_passes = 4

A shell reduced to 2,000 faces:

addModifier $ (uVoxelize voxels:64)
addModifier $ (uOptimize mode:2 target_count:2000)

uPush

Push a 10-unit box out by 1; it measures 12 × 12 × 12:

b = box width:10 length:10 height:10
m = uPush()
m.value = 1.0
m.method = 0
addModifier b m

Switch to Classic (along normal); the box measures about 11.155:

b.modifiers[#uPush].method = 2

An Editable Poly stays poly after collapsing:

p = box width:10 length:10 height:10
convertToPoly p
m = uPush()
m.value = 1.0
addModifier p m
collapseStack p
classOf p -- Editable_Poly

Let sharp corners travel further:

$.modifiers[#uPush].max_scale = 20.0

uOffset

Three offsets of a circle, 5 units apart, at heights 2, 4 and 6:

s = circle radius:50
m = uOffset()
m.amount = 5.0
m.copies = 3
m.elevation = 2.0
addModifier s m

A closed outline 10 units wide around a kept centreline:

m = uOffset()
m.amount = 5.0
m.open_mode = 1
m.keep_original = true
addModifier $ m

Force 12 steps per segment, then return to the shape's own settings:

$.modifiers[#uOffset].steps = 12
$.modifiers[#uOffset].steps = -2