Pricing

uTiles

MAXScript

The uTiles and uTilesModifier classes, every property they expose, and the uTilesTools functions that report what each build produced.

Everything on the uTiles panel can be driven from MAXScript. The object and the modifier are separate classes, uTiles and uTilesModifier, kept distinct so that uTiles() always builds the object. With a floor selected, run showProperties $ in the MAXScript Listener to list its properties, and showInterface uTilesTools to list the inspection functions. The MAXScript reference lists the names every Verstice plugin answers to.

The object has 103 properties and the modifier 100. The 98 they share are listed once, in panel order; Object only marks the object's five extras.

  • Drop-down lists are integers, counted from 0 in the order the list shows them: pattern = 2 is Herringbone.
  • Nothing is animatable, from script or from the panel.
  • Ranges are the parameters' own, the ones the panel's spinners keep to, so keep script values inside them too.

Without a license, MAXScript meets the same free-edition limits as the panel (License Rollout). uTiles() and uTilesModifier() construct, every property can be read, and a property can be set on a floor within the limits. target_surfaces refuses a second surface, or one that isn't flat; on a floor past the limits, such as one made under a license, every property set and uTilesTools.loadPreset are refused. A refused set leaves the value as it was, and the reason goes to the status line and the 3ds Max log, or only to the debug output in quiet mode. uTilesTools.freeCounts says where a floor stands.

uTiles : GeometryClass

f = uTiles()
f.target_surfaces = #($Plane001)

The object tiles the nodes in target_surfaces. Until one is set it builds nothing and shows only its viewport mark.

General Rollout

<uTiles>.frame_scale Float default: 100.0 range: 1 to 10,000 - Scale.

<uTiles>.pattern_angle Float default: 0.0 range: −180 to 180 - Direction.

<uTiles>.frame_offset_x Float default: 0.0 range: −1,000,000 to 1,000,000 - Offset X.

<uTiles>.frame_offset_y Float default: 0.0 range: −1,000,000 to 1,000,000 - Offset Y.

<uTiles>.seed Integer default: 12345 range: 0 to 999,999,999 - Seed.

<uTiles>.update_mode Integer default: 0 range: 0 to 1 - Update: 0 Always, 1 Manual. A Manual floor is rebuilt by uTilesTools.updateTiles.

<uTiles>.icon_size Float default: 20.0 range: 0.001 to 1,000,000 - Icon size. Object only.

<uTiles>.icon_always Boolean default: false - Always show. Object only.

Surface Rollout

<uTiles>.target_surfaces Array default: #() - the surface list, Pick and Remove. Object only. An array of nodes: #($Plane001, $Plane002). A node that depends on the floor itself is refused; a shape is filled from its closed splines while shape_fill is on, and lights and helpers are skipped. At the free edition it takes one flat surface: in an array assignment, each surface past the limit is stored as undefined, and the refusal is said once per slot.

<uTiles>.mode Integer default: 0 range: 0 to 1 - Mode: 0 Planar, 1 UV-space.

<uTiles>.weld_angle Float default: 5.0 range: 0 to 90 - Weld angle.

<uTiles>.grain_direction Point3 default: [1, 0, 0] - Grain direction.

<uTiles>.uv_channel Integer default: 1 range: 1 to 99 - UV channel.

<uTiles>.uv_ignore_scale Boolean default: false - Ignore UV scale.

<uTiles>.real_world_size Boolean default: true - Real-world size.

<uTiles>.face_filter Integer default: 0 range: 0 to 4 - Limit to: 0 All faces, 1 Floors, 2 Walls, 3 Ceilings, 4 Custom angles.

<uTiles>.face_angle_min Float default: 0.0 range: 0 to 180 - min.

<uTiles>.face_angle_max Float default: 180.0 range: 0 to 180 - max.

Pattern Rollout

<uTiles>.pattern Integer default: 0 range: 0 to 9 - Pattern: 0 Running bond, 1 Stack, 2 Herringbone, 3 Chevron, 4 Basketweave, 5 Parquet, 6 Windmill, 7 Double basket, 8 Versailles, 9 Hexagon.

<uTiles>.plank_length Float default: 40.0 range: 0.001 to 1,000,000 - Length.

<uTiles>.length_variation Float default: 0.0 range: 0 to 1 - Length var.

<uTiles>.length_spread Float default: 0.5 range: 0 to 1 - Spread in the Length group.

<uTiles>.gap_length Float default: 0.2 range: 0 to 1,000,000 - Gap in the Length group.

<uTiles>.plank_width Float default: 8.0 range: 0.001 to 1,000,000 - Width.

<uTiles>.width_variation Float default: 0.0 range: 0 to 1 - Width var.

<uTiles>.width_spread Float default: 0.5 range: 0 to 1 - Spread in the Width group.

<uTiles>.gap_width Float default: 0.2 range: 0 to 1,000,000 - Gap in the Width group.

<uTiles>.offset_from Float default: 0.5 range: 0 to 1 - Offset, left field.

<uTiles>.offset_to Float default: 0.5 range: 0 to 1 - Offset, right field.

<uTiles>.herringbone_planks Integer default: 1 range: 1 to 16 - Parallel.

<uTiles>.chevron_angle Float default: 45.0 range: 15 to 75 - Chevron.

<uTiles>.basket_planks Integer default: 0 range: 0 to 16 - Per block.

<uTiles>.parquet_planks Integer default: 1 range: 1 to 16 - Per arm.

Geometry Rollout

<uTiles>.thickness Float default: 0.0 range: 0 to 1,000,000 - Thickness.

<uTiles>.gen_backface Boolean default: true - Generate back face.

<uTiles>.chamfer_weld Float default: 0.0 range: 0 to 1,000,000 - Weld.

<uTiles>.chamfer_on Boolean default: true - the Chamfer checkbox.

<uTiles>.chamfer_amount Float default: 0.0 range: 0 to 1,000,000 - the Chamfer amount.

<uTiles>.chamfer_height Float default: 0.0 range: 0 to 1,000,000 - Height in the Chamfer box. 0 follows chamfer_amount.

<uTiles>.chamfer_segments Integer default: 1 range: 1 to 64 - Segments in the Chamfer box.

<uTiles>.chamfer_tension Float default: 0.5 range: 0 to 1 - Profile.

<uTiles>.chamfer_top Boolean default: true - Chamfer top.

<uTiles>.chamfer_bottom Boolean default: false - Chamfer bottom.

<uTiles>.chamfer_cuts Boolean default: true - Chamfer cut edges.

<uTiles>.chamfer_sides Boolean default: false - Chamfer sides.

<uTiles>.chamfer_corner_exact Boolean default: false - Exact corner setback.

<uTiles>.round_cut_corners Boolean default: false - Round cut corners.

<uTiles>.chamfer_side_amount Float default: 0.0 range: 0 to 1,000,000 - Side radius.

<uTiles>.inset_on Boolean default: true - the Inset checkbox.

<uTiles>.chamfer_inset_amount Float default: 0.0 range: 0 to 1,000,000 - the Inset amount.

<uTiles>.chamfer_inset_segments Integer default: 0 range: 0 to 64 - Segments in the Inset box.

<uTiles>.chamfer_inset_offset Float default: 0.0 range: −1,000,000 to 1,000,000 - Offset in the Inset box.

Jitter Rollout

<uTiles>.height_jitter Float default: 0.0 range: 0 to 1,000,000 - Height.

<uTiles>.tilt_jitter Float default: 0.0 range: 0 to 85 - Tilt.

<uTiles>.rotation_jitter_x Float default: 0.0 range: 0 to 85 - Rotate X.

<uTiles>.rotation_jitter_y Float default: 0.0 range: 0 to 85 - Rotate Y.

<uTiles>.rotation_jitter Float default: 0.0 range: 0 to 45 - Rotate Z.

<uTiles>.rotation_centre Float default: 0.0 range: −45 to 45 - Centre Z.

<uTiles>.rotation_spread Float default: 0.5 range: 0 to 1 - Spread Z.

<uTiles>.rotate_90_random Boolean default: false - Random 90 turns.

<uTiles>.offset_jitter_x Float default: 0.0 range: 0 to 1,000,000 - Along in the Offset box.

<uTiles>.offset_centre_x Float default: 0.0 range: −1,000,000 to 1,000,000 - Centre under Along.

<uTiles>.offset_spread_x Float default: 0.5 range: 0 to 1 - Spread under Along.

<uTiles>.offset_jitter_y Float default: 0.0 range: 0 to 1,000,000 - Across in the Offset box.

<uTiles>.offset_centre_y Float default: 0.0 range: −1,000,000 to 1,000,000 - Centre under Across.

<uTiles>.offset_spread_y Float default: 0.5 range: 0 to 1 - Spread under Across.

<uTiles>.scale_jitter_length Float default: 0.0 range: 0 to 0.95 - Length in the Scale box.

<uTiles>.scale_spread_length Float default: 0.5 range: 0 to 1 - Spread under Length.

<uTiles>.scale_jitter_width Float default: 0.0 range: 0 to 0.95 - Width in the Scale box.

<uTiles>.scale_spread_width Float default: 0.5 range: 0 to 1 - Spread under Width.

<uTiles>.jitter_contain Boolean default: false - Keep boards apart.

<uTiles>.jitter_overlap Float default: 0.0 range: 0 to 1,000,000 - Overlap.

Mapping Rollout

<uTiles>.uv_mapping Integer default: 0 range: 0 to 2 - UV map: 0 From source, 1 Real-world, 2 Per-plank.

<uTiles>.uv_source_channel Integer default: 1 range: 1 to 99 - Src channel.

<uTiles>.texture_size Float default: 100.0 range: 0.001 to 1,000,000 - Tex size.

<uTiles>.uv_align Integer default: 1 range: 0 to 1 - U along: 0 Frame, 1 Board.

<uTiles>.uv_tile_u Float default: 1.0 range: −1,000 to 1,000 - Tiling U.

<uTiles>.uv_tile_v Float default: 1.0 range: −1,000 to 1,000 - Tiling V.

<uTiles>.uv_offset_u_on Boolean default: true - Random offset U (along).

<uTiles>.uv_offset_u_min Float default: 0.0 range: −1,000 to 1,000 - its Min, in texture tiles.

<uTiles>.uv_offset_u_max Float default: 1.0 range: −1,000 to 1,000 - its Max.

<uTiles>.uv_offset_u_step Float default: 0.0 range: 0 to 1,000 - its Step; 0 is any value.

<uTiles>.uv_offset_v_on Boolean default: true - Random offset V (across).

<uTiles>.uv_offset_v_min Float default: 0.0 range: −1,000 to 1,000 - its Min.

<uTiles>.uv_offset_v_max Float default: 1.0 range: −1,000 to 1,000 - its Max.

<uTiles>.uv_offset_v_step Float default: 0.0 range: 0 to 1,000 - its Step.

<uTiles>.uv_rotate_on Boolean default: true - Random rotation.

<uTiles>.uv_rotate_min Float default: 0.0 range: −3,600 to 3,600 - its Min, in degrees.

<uTiles>.uv_rotate_max Float default: 360.0 range: −3,600 to 3,600 - its Max.

<uTiles>.uv_rotate_step Float default: 90.0 range: 0 to 360 - its Step; 0 is any angle.

A constant offset or turn is a range whose _min and _max are equal. The properties these replaced, uv_offset_random, uv_offset_axes, uv_offset_amount, uv_offset_u, uv_offset_v, uv_rotate_90 and uv_rotate, are still on the object so that older scenes and presets convert when they open, but setting them changes nothing.

<uTiles>.uv_flip_u Boolean default: true - U (along) in Random flip.

<uTiles>.uv_flip_v Boolean default: false - V (across) in Random flip.

<uTiles>.side_uv_mode Integer default: 0 range: 0 to 1 - Side map: 0 World scale, 1 Per board.

<uTiles>.side_texture_size Float default: 0.0 range: 0 to 1,000,000 - Side tex.

<uTiles>.uv_out_channel Integer default: 1 range: 1 to 99 - Out channel.

Material Rollout

<uTiles>.matid_count Integer default: 8 range: 1 to 1,000 - Mat IDs.

<uTiles>.random_channel Integer default: 3 range: 0 to 99 - Random ch. 0, 1 and the uv_out_channel value are refused without a message.

<uTiles>.seed_mode Integer default: 1 range: 0 to 1 - Seed by: 0 Emission, 1 Position.

Script-Only and Deprecated Properties

These ten have no row on the panel.

<uTiles>.target_surface Node default: undefined - Object only. The legacy single surface. Read only when target_surfaces has no live entry; loading a scene copies it into target_surfaces when that list is empty.

<uTiles>.flat_preview Boolean default: false - Object only. With no surface, builds a flat grid of boards instead of nothing. Kept for uTiles' own chamfer tests.

<uTiles>.area_width Float default: 100.0 range: 0.001 to 1,000,000 - the flat preview's size along the object's local X, used only while flat_preview is on and no surface resolves.

<uTiles>.area_length Float default: 100.0 range: 0.001 to 1,000,000 - the flat preview's size along local Y.

<uTiles>.bevel Float default: 0.0 range: 0 to 1,000,000 - a legacy straight taper of the top face of solid boards. It works only while there is no chamfer and thickness is above 0, and is scaled by the unwrap's density in UV-space.

<uTiles>.gap Float default: 0.2 range: 0 to 1,000,000 - Deprecated. Loading an older scene copies it into gap_length and gap_width; setting it changes nothing.

<uTiles>.bond_offset Float default: 0.5 range: 0 to 1 - Deprecated. Loading an older scene copies it into offset_from and offset_to; setting it changes nothing.

<uTiles>.uv_flip Boolean default: true - Deprecated. Loading an older scene copies it into uv_flip_u; setting it changes nothing.

<uTiles>.chamfer_pole_union Boolean default: false - an experimental chamfer option; on the test shapes it was measured on, it changes nothing yet.

<uTiles>.shape_fill Boolean default: true - fills a shape, picked into target_surfaces or under the modifier, as a flat floor from its closed splines. Off, the object skips a shape and the modifier tiles 3ds Max's own mesh of it. Floors saved before uTiles 1.1.0 load with it off where it would change them, so they build what they built: every uTiles Modifier, and an object with a shape in its list. Set it to true to switch one over.

area_width and area_length exist on the modifier too, but only the object uses them.

uTilesModifier : Modifier

addModifier $Box001 (uTilesModifier())

The modifier tiles the mesh that reaches it in the stack. It shares every property of uTiles : GeometryClass except the five marked Object only, and adds two of its own on the Surface rollout:

<uTilesModifier>.scene_units Boolean default: false - Scene units.

<uTilesModifier>.include_source Boolean default: false - Include source mesh.

Interface: uTilesTools

uTilesTools is a global interface for inspecting floors. It is named uTilesTools, not uTiles, because uTiles is the object's class. Call a function as uTilesTools.tileStats $.

FunctionParametersDescription
Statistics
tileStats
<node>
Returns the counters from the floor's last build, without rebuilding it: an array of 23 numbers (below), or #() if the node has no uTiles. Works on the object, or on a node with a uTiles Modifier anywhere in its stack.
tileBoards
<node>
Regenerates the floor and returns one row per board (below), or #(). Object only: on the modifier it always returns #(). Needs a license, or at the free edition a floor within its limits; otherwise it returns #().
tileBuildCount
<node>
Returns how many times the floor has finished building its mesh, or -1 if the node is not a uTiles object. Object only: a node tiled by the uTiles Modifier also returns -1.
Creation
createTiles
-
Switches to the Create panel and starts interactive creation, with or without a license. Does nothing when 3ds Max runs without its interface. The Create uTiles toolbar button calls it. Returns nothing.
Update and Presets
updateTiles
<node>
Rebuilds a floor whose update_mode is Manual, as the Update button does; harmless on an Always floor. Works on the object, or on a node with a uTiles Modifier in its stack. Returns true when the node has a floor, else false.
savePreset
<node> <file>
Saves the floor's look to a preset file, as Save preset… does. Returns true, or false when the node has no floor or the file can't be written.
loadPreset
<node> <file>
Sets the floor's look from a preset file as one undo step, as Load preset… does. Returns how many settings it applied, or -1 when the node has no floor, the file can't be opened or isn't a uTiles preset, or the floor is read-only at the free edition.
Free Edition
freeCounts
<node>
Returns #(surfaces, flatSurfaces, within, atFree): the floor's surface and flat-surface counts, as the License rollout shows them; 1 if both are within the free edition's limits, else 0; and 1 if uTiles is at its free edition now, else 0. Returns #() if the node has no uTiles. It reports, and decides nothing.
Diagnostics
meshFingerprint
<node>
Returns 18 numbers for any node's mesh: vertex and face counts, the channel-1 map vertex count, eight hash values, the surface area, and the bounding box's minimum and maximum corners; #() if the node has no mesh. Compare two to tell whether two builds produced the same mesh.
materialNotes
-
Returns uTiles' recent notices as an array of strings. uTiles posts none, so it is always empty.
selfCheck
-
Runs uTiles' class-ID and object/modifier parameter checks and returns "" when healthy. An installed uTiles always returns "", because a failing check stops it loading.
Development
quadChamfer
<node> <params>
Runs 3ds Max's own quad chamfer over a copy of the node's render mesh. Returns its 18-number mesh fingerprint, or #().
chamferDiff
<node> #(amount, segments, beta, coplanarDeg)
Runs 3ds Max's chamfer and uTiles' own on the node's mesh and compares them, polygon by polygon. The defaults are 1, 1, 0.5 and 20. Returns 12 numbers, the last a status: 0 compared, 1 3ds Max declined, 2 uTiles declined.
chamferOurs
<node> #(amount, segments, beta, coplanarDeg)
Applies uTiles' chamfer to a copy of the node's mesh and adds it to the scene as a node named chamferOurs, faceted and without UVs. Returns the new node, or undefined.

uTilesTools.tileStats Values

Indices count from 1. Values 1–3 and 5 are what the Material rollout's readout shows.

IndexValue
1
Boards built
2
Vertices
3
Faces
4
Regions: flat regions tiled in Planar mode, or tiling passes in UV-space
5
1 if a board limit cut the build short (⚠ truncated in the readout), else 0
6
1 if the last build is valid, else 0
7
Unpaired seams: 0 on a healthy build
8
Time to evaluate and merge the surfaces, in milliseconds
9
Time to split the surface into regions, or read its unwrap
10
Time to prepare each region
11
Time to lay the pattern
12
Time to cut, merge and chamfer the boards
13
Time to write the mesh, including 14
14
Time to fill the 3ds Max mesh, including 15
15
Time to build normals
16
Total build time
17
Boards whose chamfer was built exactly
18
Boards where the exact chamfer fell back to the simpler one; expect 0
19
Chamfer levels that repeated the one before
20
Chamfer cap levels dropped because they turned inside out
21
Boards on a draped floor whose folds share one chamfer
22
Draped fold boards that fell back to chamfering piece by piece
23
Split-UV fold pairs reclassified: 0 on any unwrap that tiles cleanly

uTilesTools.tileBoards Values

The array holds the board count and the row length (10), then one row per board. Pieces of a board cut at a region edge count as one board.

ColumnValue
1
Material ID, counted from 0
2–4
The board's centre: X, Y, Z in world space
5
Top-face area
6–7
The board's two random numbers: the red and green of the random channel
8–10
The board's cell in the pattern's lattice

Example Scripts

Build a herringbone floor on a Plane:

f = uTiles()
f.target_surfaces = #($Plane001)
f.pattern = 2            -- Herringbone
f.plank_length = 60.0
f.plank_width = 10.0
f.thickness = 2.0
f.chamfer_amount = 0.3
f.grain_direction = [0, 1, 0]

Count the boards on the selected floor, and check whether it was cut short:

f = selection[1]
s = uTilesTools.tileStats f
if s.count > 0 do
(
    format "% boards, % faces\n" s[1] s[3]
    if s[5] == 1 do format "The floor hit a board limit and is incomplete.\n"
)

Lay a floor inside a closed spline, such as a room outline with a column's spline attached inside it as a hole:

f = uTiles()
f.target_surfaces = #($RoomOutline)
f.pattern = 2            -- Herringbone
f.herringbone_planks = 2 -- a double herringbone

Copy the selected floor's look to every other floor in the scene through a preset:

src = selection[1]
dir = (getDir #plugcfg) + "\\uTiles presets"
makeDir dir
file = dir + "\\shared.ini"
if uTilesTools.savePreset src file do
    for n in objects where n != src and (uTilesTools.tileStats n).count > 0 do
        uTilesTools.loadPreset n file

Hold a heavy floor while a script changes it, then rebuild it once:

f = selection[1]
f.update_mode = 1        -- Manual
f.plank_length = 80.0
f.thickness = 2.0
uTilesTools.updateTiles f

List each board's material ID and centre, for a selected uTiles object:

d = uTilesTools.tileBoards selection[1]
if d.count > 0 do
(
    n = d[1] as integer
    stride = d[2] as integer
    for i = 0 to n - 1 do
    (
        row = 2 + i * stride
        format "board %: ID % at [%, %, %]\n" (i + 1) d[row + 1] d[row + 2] d[row + 3] d[row + 4]
    )
)