Pricing

uScatter

MAXScript

The uScatter and uScatterEdit classes, every property they expose, and the uScatterTools functions that read, convert and edit what a field places.

Everything on the uScatter panel can be set from MAXScript: each parameter is a property, and the uScatterTools interface does what a property cannot. With a field selected, run showProperties $ in the MAXScript Listener to list its properties, and showInterface uScatterTools to list the functions. The MAXScript reference lists the names every Verstice plugin answers to. The names are frozen, so a script written today keeps working with later builds.

Its 183 properties follow in panel order, then those with no control.

  • Lengths are in system units, angles in plain degrees (not MAXScript angle values) and scales in multipliers, so 1.0 is the panel's 100 %.
  • Animatable: count, and every Float and Point3 property except preview_area, area_simplify, tint_amount and the Display rollout's.

uScatter() builds a field directly; uScatterTools.createScatter() waits for a drag in a viewport, so in quiet mode (3dsmaxbatch, or 3ds Max with no user interface) it does nothing and batch scripts use the constructor.

Without a license, uScatter runs as its free edition, and MAXScript does too: uScatter() constructs, every property can be written and every uScatterTools function works, within the free edition's limits. A write that would take a field past one, such as an append of a sixth object to sources, throws a MAXScript error and leaves the list as it was; the status line says which limit, or the debug output in quiet mode. On a field made under a license that holds more than the free edition allows, only writes that remove are taken: deleteItem, emptying a node slot, assigning an array that keeps the start of the list (s.points = for i in 1 to 30 collect s.points[i]), adding the deleted bit to a uScatter Edit's edit_flags, or an erase dab. Every other write throws.

Note

At the free edition, assigning a longer array to points or to a uScatter Edit's add_positions is refused whole, and the list is put back as it was, once uScatter has seen the list's size: after any earlier scripted write to the field, or with its panel open. A list nothing has touched since the scene loaded is left at the new size, and the field read-only, until you shorten it with deleteItem.

uScatter : GeometryClass

s = uScatter()
s.sources = #($Box001)
s.distribution_surfaces = #($Plane001)

A Surface field places its sources over the nodes in distribution_surfaces.

Note

Scale, Position jitter, Distance clip, Density falloff and Scale falloff start unticked and take effect only while ticked, so a script that sets them must set scale_on, position_jitter_on, cam_clip_on, area_fd_on or area_fs_on too. rotation_on, mirror_on, slope_on, altitude_on and camera_cull switch the same way; only rotation_on starts on.

General Rollout

<uScatter>.active Boolean default: true - Active.

<uScatter>.auto_update Boolean default: true - Auto update.

<uScatter>.type Integer default: 0 - Type: 0 Surface, 1 Spline, 2 Custom, 3 Volume.

<uScatter>.scatter_mode Integer default: 0 - Mode in Surface: 0 By count, 1 By density, 2 Grid, 3 Hex grid, 4 By spacing.

<uScatter>.volume_mode Integer default: 0 - Mode in Volume: 0 Count, 1 Per volume, 2 Grid.

<uScatter>.count Integer default: 100 range: 0 to 100,000,000 - Count.

<uScatter>.density_area Float default: 100.0 range: 0.0001 to 1,000,000,000,000 - Per area.

<uScatter>.density_volume Float default: 1000.0 range: 0.0001 to 1,000,000,000,000,000 - Per volume.

<uScatter>.grid_distance Float default: 10.0 range: 0.001 to 1,000,000 - Distance.

<uScatter>.grid_angle Float default: 0.0 range: −360 to 360 - Orientation.

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

<uScatter>.pack_factor Float default: 1.0 range: 0.1 to 8.0 - Pack factor, in By spacing. Also used by avoid_collisions.

Distribution Rollout

<uScatter>.density_map TextureMap default: undefined - Map in Density mask. The mask is on while a map is assigned.

<uScatter>.density_threshold Float default: 0.0 range: 0 to 1 - Threshold.

<uScatter>.cluster_mode Integer default: 0 - Clusters and Pattern: 0 off, 1 Cells, 2 Noise, 3 Map, 4 Stripes, 5 Rings, 6 Blocks, 7 Warped, 8 Gradient, 9 Turbulence, 10 Ridged, 11 Marble, 12 Swirl, 13 Perlin.

<uScatter>.cluster_size Float default: 500.0 range: 0.001 to 1,000,000,000 - Patch size.

<uScatter>.cluster_amount Float default: 1.0 range: 0 to 1 - Amount.

<uScatter>.cluster_angle Float default: 0.0 range: −360 to 360 - Angle.

<uScatter>.cluster_stretch Float default: 1.0 range: 0.01 to 100 - Stretch.

<uScatter>.cluster_detail Integer default: 0 range: 0 to 8 - Detail. 0 is the pattern's own default.

<uScatter>.cluster_roughness Float default: 0.5 range: 0 to 1 - Roughness, read in steps of 1/32.

<uScatter>.cluster_warp Float default: 0.0 range: 0 to 2 - Warp.

<uScatter>.cluster_jitter Float default: 1.0 range: 0 to 1 - Jitter.

<uScatter>.cluster_seed Integer default: 0 range: 0 to 999,999,999 - Seed.

<uScatter>.cluster_map TextureMap default: undefined - Map for the Map pattern.

<uScatter>.preview_area Float default: 2000.0 range: 0.01 to 1,000,000,000 - Area size in the Preview window.

<uScatter>.preview_style Integer default: 0 - Draw as in the Preview window: 0 Circles, 1 Footprints.

<uScatter>.preview_limit Integer default: 6000 range: 0 to 100,000,000 - Max instances in the Preview window. 0 is unlimited.

Objects Rollout

The list is stored as parallel arrays: entry n of each array belongs to entry n of sources. A short array reads its row default for missing rows, so a script can set sources alone; when you edit the list, keep the arrays the same length. Values that name a row count from 0.

<uScatter>.sources Array default: #() - the list. The field itself, or a uScatter that would scatter it into itself, is refused; a cycle that arises anyway is ignored, with a notice.

<uScatter>.source_weights Array row default: 1.0 - Probability.

<uScatter>.source_states Array row default: 2 - State: 0 Off, 1 Empty, 2 Object.

<uScatter>.source_offsets Array row default: [0,0,0] - Offset.

<uScatter>.source_scales Array row default: [1,1,1] - Scale, as multipliers.

<uScatter>.source_rotations Array row default: [0,0,0] - Rotation, in degrees.

<uScatter>.source_preserve Array row default: 0 - bits: 1 Keep node rotation, 2 Keep node scale, 4 Drop pivot, which changes nothing in uScatter 1.0.0 (Objects Rollout).

<uScatter>.source_styles Array row default: -1 range: −2 to 16 - Override display, Display and Style: -1 follows the field, -2 Original, anything else a display_mode value.

<uScatter>.source_cloud_points Array row default: -1 range: 1 to 100,000 - Points in Override display. Here and below, -1 follows the field.

<uScatter>.source_vertex_points Array row default: -1 range: 1 to 100,000 - Vertices.

<uScatter>.source_hull_detail Array row default: -1 range: 4 to 100,000 - Hull detail.

<uScatter>.source_wire_budget Array row default: -1 range: 1 to 10,000,000 - Wire faces.

<uScatter>.source_prim_segments Array row default: -1 range: 3 to 64 - Segments.

<uScatter>.source_voxel_detail Array row default: -1 range: 4 to 512 - Voxels.

<uScatter>.source_voxel_reduce Array row default: -1.0 range: 1 to 100 - Reduce %. Any value below 0 follows the field.

<uScatter>.source_voxel_faceted Array row default: -1 - Faceted: 0 off, 1 on.

<uScatter>.source_group Array row default: -1 - Group: the row's group row, -1 for the top level, its own index for a group row.

<uScatter>.source_group_name Array - a group row's name; ignored on other rows.

Surfaces Rollout

<uScatter>.distribution_surfaces Array default: #() - the list.

<uScatter>.surface_levels Integer default: 0 - Levels: 0 Highest, 1 Repeat, 2 Unique.

<uScatter>.slope_on Boolean default: false - Limit slope.

<uScatter>.slope_min Float default: 0.0 range: 0 to 90 - Min.

<uScatter>.slope_max Float default: 90.0 range: 0 to 90 - Max.

<uScatter>.slope_falloff Float default: 0.0 range: 0 to 90 - Falloff.

<uScatter>.altitude_on Boolean default: false - Limit altitude, here and on the Volumes rollout.

<uScatter>.altitude_mode Integer default: 0 - Measure: 0 World Z, 1 Surface.

<uScatter>.altitude_min Float default: −1,000,000.0 range: −1,000,000,000 to 1,000,000,000 - Min height.

<uScatter>.altitude_max Float default: 1,000,000.0 range: −1,000,000,000 to 1,000,000,000 - Max height.

<uScatter>.altitude_falloff Float default: 0.0 range: 0 to 1,000,000,000 - Falloff.

Splines Rollout

<uScatter>.splines Array default: #() - the list. While it is empty, spline is used.

<uScatter>.spacing_mode Integer default: 0 - Along path: 0 By count, 1 By spacing.

<uScatter>.spacing Float default: 10.0 range: 0.0001 to 1,000,000 - Spacing.

<uScatter>.jitter Float default: 0.0 range: 0 to 100 - Jitter %.

<uScatter>.side_offset Float default: 0.0 range: 0 to 1,000,000 - Side offset.

<uScatter>.follow Boolean default: true - Follow path XY.

<uScatter>.follow_xyz Boolean default: false - Follow path XYZ.

Volumes Rollout

<uScatter>.volumes Array default: #() - the list.

<uScatter>.volume_margin Float default: 0.0 range: 0 to 1,000,000 - Margin.

Limit altitude uses the altitude_* properties above. Packing is script-only: see avoid_collisions.

Instances Rollout

<uScatter>.points Array default: #() - the hand-placed instances, Point3 positions in the object's own space, made by Add new and the Instances sub-object level.

<uScatter>.point_rotations Array row default: [0,0,0] - Rotation, in degrees, one per instance.

<uScatter>.point_scales Array row default: [1,1,1] - Scale, as multipliers.

<uScatter>.point_sources Array row default: -1 - Object: -1 By probability, otherwise a row of sources.

<uScatter>.inst_order Integer default: 0 - Order: 0 Random, 1 Sequence.

<uScatter>.inst_palette Array default: #() - the palette, as row indices. Empty means every row.

Areas Rollout

The list is stored like the Objects list. Limit to objects is stored as pairs, entry n of area_limit_owner with entry n of area_limit_row; an area with no pairs allows every object.

<uScatter>.areas Array default: #() - the list.

<uScatter>.area_types Array - Type, set from the pick: 0 Spline region, 1 Paint, 2 Object.

<uScatter>.area_modes Array row default: 0 - Mode: 0 Include, 1 Exclude.

<uScatter>.area_distances Array row default: 0.0 range: 0 to 1,000,000,000 - Clearance.

<uScatter>.area_limit_on Array row default: 0 - Limit to objects, 0 or 1.

<uScatter>.area_limit_owner Array default: #() - the area row of each allowed entry.

<uScatter>.area_limit_row Array default: #() - the sources row each entry allows.

<uScatter>.area_display Integer default: 0 - Painted as: 0 Outline, 1 Point cloud.

<uScatter>.area_simplify Float default: 0.0 range: 0 to 1,000,000,000 - Detail in the Paint group. 0 is automatic.

<uScatter>.paint_loop_pts Array default: #() - the painted outlines' points, written by Paint, Stamp, Erase and Clear.

<uScatter>.paint_loop_counts Array default: #() - points per outline ring. Counter-clockwise rings are solid, clockwise rings holes.

<uScatter>.paint_loop_owner Array default: #() - the area row each ring belongs to.

<uScatter>.area_fd_on Boolean default: false - Density falloff.

<uScatter>.area_fd_min Float default: 0.0 range: 0 to 1,000,000,000 - Dist. min.

<uScatter>.area_fd_max Float default: 0.0 range: 0 to 1,000,000,000 - Dist. max. 0 falls back to area_falloff.

<uScatter>.area_falloff_density Float default: 1.0 range: 0 to 1 - End value: 1 removes every instance at the border end, 0 none.

<uScatter>.area_fd_interp Integer default: 0 - Interpolation: 0 Linear, 1 Ease in, 2 Ease in/out, 3 Threshold, 4 Custom curve.

<uScatter>.falloff_curve Array default: #() - the density curve: up to 16 [x, y, 0] points ordered by x, with x and y from 0 to 1. Empty is a straight line.

<uScatter>.area_fs_on Boolean default: false - Scale falloff.

<uScatter>.area_fs_min Float default: 0.0 range: 0 to 1,000,000,000 - Dist. min.

<uScatter>.area_fs_max Float default: 0.0 range: 0 to 1,000,000,000 - Dist. max. 0 follows the density band.

<uScatter>.area_falloff_scale Float default: 0.0 range: 0 to 1 - End value: 1 shrinks to nothing at the border end, 0 not at all.

<uScatter>.area_fs_interp Integer default: 0 range: 0 to 4 - Interpolation. 0 follows the density setting.

<uScatter>.falloff_curve_scale Array default: #() - the scale curve, up to 16 points. Empty follows the density curve.

Transform Rollout

<uScatter>.align_to_normal Boolean default: true - Normal influence.

<uScatter>.align_amount Float default: 1.0 range: −1 to 1 - the Normal influence amount. Values below 0 act as 0.

<uScatter>.lookat_node Node default: undefined - Target. undefined switches aiming off.

<uScatter>.lookat_amount Float default: 1.0 range: −1 to 1 - the Target influence amount. Values below 0 act as 0.

<uScatter>.lookat_axis Integer default: 1 - Aim axis: 0 X, 1 Y, 2 Z.

<uScatter>.lookat_horizontal Boolean default: true - Heading only.

<uScatter>.position_jitter_on Boolean default: false - Position jitter.

<uScatter>.position_jitter Point3 default: [0,0,0] - Position jitter X, Y and Z.

<uScatter>.rotation_on Boolean default: true - Rotation.

<uScatter>.rotation_min Point3 default: [0,0,0] - Min X, Y, Z, in degrees.

<uScatter>.rotation_max Point3 default: [0,0,360] - Max X, Y, Z, in degrees.

<uScatter>.rotation_map TextureMap default: undefined - Map.

<uScatter>.rotation_map_amount Float default: 0.0 range: 0 to 1 - Rot amt.

<uScatter>.scale_on Boolean default: false - Scale.

<uScatter>.scale_uniform Boolean default: true - Uniform scale.

<uScatter>.scale_min Point3 default: [1,1,1] - Min, as multipliers.

<uScatter>.scale_max Point3 default: [1,1,1] - Max, as multipliers.

<uScatter>.scale_map TextureMap default: undefined - Map.

<uScatter>.scale_map_amount Float default: 0.0 range: 0 to 1 - Scale amt.

<uScatter>.mirror_on Boolean default: false - Mirror.

<uScatter>.mirror_x Boolean default: true - X.

<uScatter>.mirror_y Boolean default: false - Y.

<uScatter>.mirror_z Boolean default: false - Z.

Camera Rollout

uScatter 1.0.0 saves these values but applies none of them (Camera Rollout).

<uScatter>.cull_camera Node default: undefined - Cull camera. undefined means the render camera.

<uScatter>.camera_cull Boolean default: false - Frustum culling.

<uScatter>.camera_cull_margin Float default: 0.0 range: 0 to 1,000,000,000 - Cull margin.

<uScatter>.cam_clip_on Boolean default: false - Distance clip.

<uScatter>.cam_clip_near Float default: 0.0 range: 0 to 1,000,000,000 - Clip nearer.

<uScatter>.cam_clip_far Float default: 0.0 range: 0 to 1,000,000,000 - Clip farther.

<uScatter>.cam_density_start Float default: 0.0 range: 0 to 1,000,000,000 - Thin from.

<uScatter>.cam_density_end Float default: 0.0 range: 0 to 1,000,000,000 - Thin to.

<uScatter>.cam_density_amount Float default: 0.0 range: 0 to 1 - Thin by.

<uScatter>.cam_scale_start Float default: 0.0 range: 0 to 1,000,000,000 - Shrink from.

<uScatter>.cam_scale_end Float default: 0.0 range: 0 to 1,000,000,000 - Shrink to.

<uScatter>.cam_scale_amount Float default: 0.0 range: 0 to 1 - Shrink by.

Display Rollout

<uScatter>.display_percent Float default: 100.0 range: 0 to 100 - Display %.

<uScatter>.display_max Integer default: 10000 range: 0 to 10,000,000 - Display max.

<uScatter>.max_display_points Integer default: 1000000 range: 1 to 50,000,000 - Max points.

<uScatter>.max_instances Integer default: 10000000 range: 0 to 2,000,000,000 - Max inst. 0 is unlimited.

<uScatter>.display_mode Integer default: 8 range: −2 to 16 - Draw as and Style, one value for both:

  • None – 3
  • Points – Vertices 6, Scatter 8, Pivot 0
  • Wire – Box 1, Simplified 13
  • Mesh – Plane 9, Box 4, Pyramid 12, Arrow 10, Sphere 14, Cylinder 15, Convex hull 7, Volume 16, Full 5
  • Original – -2

Two retired values still draw if a scene stores them: 11, a triangle, shown as Mesh › Plane, and 2, shown as Points › Pivot.

<uScatter>.cloud_points Integer default: 200 range: 1 to 100,000 - Points.

<uScatter>.cloud_seed Integer default: 0 range: 0 to 999,999,999 - Seed.

<uScatter>.vertex_points Integer default: 600 range: 1 to 100,000 - Vertices.

<uScatter>.hull_detail Integer default: 600 range: 4 to 100,000 - Hull detail.

<uScatter>.wire_budget Integer default: 800 range: 16 to 200,000 - Wire faces.

<uScatter>.prim_segments Integer default: 16 range: 3 to 64 - Segments.

<uScatter>.voxel_detail Integer default: 64 range: 2 to 256 - Voxels.

<uScatter>.voxel_reduce Float default: 25.0 range: 1 to 100 - Reduce %.

<uScatter>.voxel_faceted Boolean default: true - Faceted.

<uScatter>.point_size Float default: 5.0 range: 0 to 1,000,000 - Point size, in scene units or pixels by Size mode.

<uScatter>.point_size_mode Integer default: 2 range: 0 to 2 - Size mode: 0 World, 2 Pixels. A stored 1 is retired and draws as Pixels.

<uScatter>.point_color_mode Integer default: 0 - Colour for points and wire: 0 Object, 1 Source, 2 Material.

<uScatter>.mesh_color_mode Integer default: 2 - Colour for mesh styles, with the same values.

<uScatter>.display_darken Float default: 0.0 range: 0 to 1 - Darken.

<uScatter>.icon_size Float default: 20.0 range: 0.001 to 1,000,000 - Icon size, a diameter. The creation drag sets it.

<uScatter>.icon_always Boolean default: false - Always show.

Script-Only Properties

These have no control on the panel. Those marked Legacy, Retired or Dormant keep scenes from earlier builds opening.

<uScatter>.render_instancing_mode Integer default: 3 - how the field reaches renderers (Renderer Support), an escape hatch for a renderer that mishandles one interface:

  • 0 – No instancing interface: every renderer gets one baked mesh, limited by render_mesh_cap.
  • 1 – Autodesk's render-time instancing interface, which Arnold, V-Ray and FStorm use.
  • 2 – The particle interface, Redshift's route.
  • 3 – Both interfaces.

A scene saved by an earlier build with 1 opens as 3; 0 and 2 are kept.

<uScatter>.render_mesh_cap Integer default: 0 range: 0 to 2,000,000,000 - the most instances baked into one mesh, for renderers that take a mesh and for Convert To › Editable Mesh. 0 is unlimited. Above it the bake is refused, with a notice.

<uScatter>.convert_cap Integer default: 10000 range: 0 to 1,000,000,000 - scatterToInstances refuses fields with more instances. 0 is unlimited.

<uScatter>.max_draw_instances Integer default: 2000000 range: 1,000 to 200,000,000 - the most instances drawn in the viewport, across every style. The General stats line warns when it bites.

<uScatter>.avoid_collisions Boolean default: false - packs instances to keep their distance, using pack_factor. By spacing packs without changing it. The only way to pack a Volume field.

<uScatter>.lookat_reverse Boolean default: false - aims the Aim axis away from the target.

<uScatter>.tint_amount Float default: 0.0 range: 0 to 1 - per-instance colour variation between the two tint colours. 0 is off. uScatter applies no colour itself: above 0, render-time instancing hands each instance two custom channels, tint (its position in the range) and tintColor (the colour there), which a renderer shows only if its material reads them. The particle interface, the baked mesh and the viewport don't carry the tint.

<uScatter>.tint_color_a Color default: 0.5, 0.5, 0.5 - one end of the tint range.

<uScatter>.tint_color_b Color default: 1.0, 1.0, 1.0 - the other end.

<uScatter>.point_normals Array default: #() - an optional normal for each hand-placed instance. Add new fills in [0,0,1].

<uScatter>.area_falloff Float default: 0.0 range: 0 to 1,000,000,000 - Legacy. The single border width, read as the density band while area_fd_max is 0.

<uScatter>.area_falloff_scale_dist Float default: 0.0 range: 0 to 1,000,000,000 - Legacy. The scale border width, now area_fs_min and area_fs_max.

<uScatter>.avoid_objects Array default: #() - Legacy. The avoid list, moved into areas as Exclude Object rows when the panel opens.

<uScatter>.avoid_distance Float default: 0.0 range: 0 to 1,000,000,000 - Legacy. Becomes each moved row's Clearance.

<uScatter>.spline Node default: undefined - Legacy. A single spline, used only while splines is empty.

<uScatter>.surfaces Array default: #() - Retired. The projection list, read with distribution_surfaces and merged into it when the panel opens.

<uScatter>.distribution_surface and <uScatter>.region Node default: undefined - Dormant. Nothing reads them.

<uScatter>.area_points Integer default: 2000 range: 1 to 200,000 - Dormant. The point-cloud dot budget.

<uScatter>.paint_centers, <uScatter>.paint_radii and <uScatter>.paint_owner Array default: #() - Retired. Painted dabs from earlier builds, converted to outlines.

<uScatter>.materials Array default: #() - Retired. Per-instance material variety from earlier builds. Does nothing.

<uScatter>.graph_on, graph_json, graph_layout, graph_f, graph_i, graph_p3, graph_nodes and graph_maps - Dormant. Nothing in uScatter 1.0.0 reads them.

uScatterEdit : Modifier

addModifier $uScatter001 (uScatterEdit())

The uScatter Edit modifier goes on a uScatter or another uScatter Edit, and writes your edits into ten parallel arrays that have no control: six for edits to placements, four for added instances.

<uScatterEdit>.edit_keys Array - the placement an edit applies to, as scatterInstanceKeys reports it.

<uScatterEdit>.edit_flags Array - bits: 1 deleted, 2 has a transform, 4 has a source override.

<uScatterEdit>.edit_offsets Array - the position offset, in the uScatter's own space.

<uScatterEdit>.edit_rotations Array - the rotation offset, in degrees.

<uScatterEdit>.edit_scales Array - the scale multiplier per axis.

<uScatterEdit>.edit_source Array - the sources row to place instead; -1 keeps the field's pick.

<uScatterEdit>.add_positions Array - an added instance's world position.

<uScatterEdit>.add_rotations Array - its rotation, in degrees.

<uScatterEdit>.add_scales Array - its scale per axis.

<uScatterEdit>.add_source Array - the sources row it places.

uScatterTools Interface

uScatterTools is a global interface of 26 functions, not uScatter, which is the class. Call a function as uScatterTools.scatterInstances $uScatter001. <placements>, <params> and <layoutOrigin> are passed by reference; a literal works. Rows, placements and areas count from 0. The Create uScatter and Convert to uScatter toolbar buttons are the macroScripts uScatter_CreateScatter and uScatter_ConvertToScatter, in the uScatter category.

FunctionParametersDescription
Instances and Display
scatterInstances
<node>
Returns the rendered instances, Empty rows left out: #(count, 14, …), then per instance the world transform's four rows (12 values), the source index and the tint. Returns #() if the node is not a uScatter. Works at the free edition, on any field.
scatterAllInstances
<node>
Returns every placement, Empty rows included, in the same layout, in the order scatterInstanceKeys and scatterEditGizmo use.
scatterInstanceKeys
<node>
Returns each placement's key, the identity uScatter Edit stores edits against: the world cell in Surface and Volume, the order in Spline and Custom. Keys are 32-bit and can read negative.
scatterDisplayStats
<node>
Returns the General stats line as #(count, unit, instances); unit is 0 instances, 1 points, 2 faces. Builds the display geometry first.
scatterInUseStyles
<node>
Returns the display_mode values actually drawn, as integers, with per-row overrides and Original resolved. Honours Auto update off.
scatterPreview
<node> <areaSize:float>
Returns the Preview window's sample, #(count, 7, …), then per instance x, y, radius, angle in degrees, half width, half height and source index. areaSize 0 uses preview_area. At most preview_limit, and never above 200,000.
Creating and Converting
createScatter
-
Starts interactive creation, as the Create panel's uScatter button does, licensed or at the free edition. Does nothing in quiet mode. Returns nothing. The Create uScatter button runs it.
scatterToInstances
<node>
Creates a 3ds Max node per instance, a true instance of its source, under one dummy, as one undo entry; group sources become groups, light sources lights (Scatter to Instances). Returns the number of nodes made; 0 if the node is not a uScatter or the field is empty; -1 above convert_cap.
scatterFromSelection
<layoutOrigin:point3>
Replaces the selection with one Custom uScatter, laying the sources out in a row from layoutOrigin, as one undo entry; the Convert to uScatter button passes the point you pick. Returns the number of placements written; -1 if nothing was selected or convertible, if it failed, or if the free edition's limits refuse the selection (more than 5 unique objects or 30 objects), in which case nothing changes and materialNotes holds the refusal.
Updating
scatterUpdateNow
<node>
Presses Update now, rebuilding a field whose Auto update is off. Returns false if the node is not a uScatter.
scatterRegenStats
<node>
Returns #(rebuildCount, lastRebuildMs, bakeCount): rebuilds so far, the last rebuild's time in milliseconds, and render-mesh bakes. Changes nothing.
uScatter Edit
scatterEditStats
<node>
Returns #(layers, applied, orphaned, added, swapsRefused, placements); orphaned counts edits that match no placement. Check layers first: the rest also read 0 with no uScatter Edit.
scatterEditGizmo
<node> <op:integer> <placements:array> <value:point3>
Applies op to the placements numbered in placements (in scatterAllInstances order) through the topmost uScatter Edit, as one undo entry. Returns the number affected; -1 with no uScatter Edit. At the free edition, op 6 returns 0 once the field has 30 hand-placed instances, and on a read-only field ops 0, 1, 2 and 4 change nothing, though they still return the number of placements named.
op 0
value: the world translation
Move. Undo entry Move uScatter Instances.
op 1
value: X, Y, Z rotation in degrees
Rotate. Undo entry Rotate uScatter Instances.
op 2
value: X, Y, Z scale factors
Scale. Undo entry Scale uScatter Instances.
op 3
-
Delete. Undo entry Delete uScatter Instances.
op 4
value.x: the sources row; -1 hands it back to the field
Swap the object. Undo entry Swap uScatter instance model.
op 5
value: the brush centre, in world space; placements[1]: the radius, a whole number
Erase. Undo entry Erase uScatter Instances.
op 6
value: the world position; placements[1]: its sources row
Add an instance (no panel control). Undo entry Add uScatter Instance.
op 7
-
Prune edits that match no placement, now. Undo entry Clean uScatter edits.
Areas and Painting
scatterSelectArea
<node> <row:integer>
Selects an Areas row as a click does, with its highlight and stack branch. Returns 1 if it took.
scatterAreaOutline
<node> <areaRow:integer> <dotStep:float>
Returns one area's outline: the loop count, each loop's point count and x, y, z per point, and last the point-cloud dot count. dotStep spaces the Point cloud dots.
scatterAreaDots
<node> <areaRow:integer> <params:array>
Returns one area's point-cloud dots, #(count, x, y, z, …), clipped to the rectangle in params, #(dotStep, minX, minY, maxX, maxY).
scatterPaintDab
<node> <areaRow:integer> <params:array>
Paints one dab on a painted area; params is #(x, y, z, radius, erase), and erase 1 removes. One undo entry, unless inside a stroke or an undo on block. Returns 1 if it ran, 0 if the node is not a uScatter, params is too short, or the field is read-only at the free edition and the dab paints rather than erases.
scatterPaintStroke
<node> <begin:integer>
Brackets dabs as one stroke: 1 opens it, 0 commits it as one undo entry, 2 cancels it. The field is not re-scattered while a stroke is open.
scatterAreaDrawCalls
<node> <areaRow:integer>
Returns one area's overlay draw cost: #(polylineCalls, stripVerts, rings, points, drawsUnselected).
scatterAreaBranches
<node>
Returns the spline area rows offered as modifier-stack branches: #(nSelected, nAll), then 12 transform values.
Diagnostics
materialNotes
-
Returns uScatter's latest 256 notices as an array of strings. Notices are not shown on screen: read a refused conversion or a field clipped at Max inst. here.
scatterDeps
<node>
Returns one string listing every dependent of the field and its parameter block, as ClassName{a,b} sclass:N; entries.
meshFingerprint
<node>
Returns the geometry fingerprint every Verstice plugin shares, a float array, for comparing two meshes.
renderInstancingProbe
<node>
Reads Autodesk's render-time instancing interface as a renderer does: an 18-value header (ok, sources, targets, number of transforms, valid forever, channels, node transform), then 14 values per target. Works on any object that publishes it.
instancingCallStats
<node>
Returns eight counters: the instancing mode, whether each interface is published, and how often a renderer called each function.
selfCheck
-
Returns "" when uScatter's startup checks pass, otherwise what failed.

Example Scripts

Build a Field over a Plane

-- Assumes a plane named Plane001 and four boxes Box001 to Box004.
s = uScatter()
s.type = 0                                   -- Surface
s.sources = #($Box001, $Box002, $Box003, $Box004)
s.source_weights = #(1.0, 2.0, 1.0, 0.5)     -- one probability per row
s.distribution_surfaces = #($Plane001)
s.scatter_mode = 0                           -- By count
s.count = 500
s.seed = 7

-- Scale starts unticked: set its gate too.
s.scale_on = true
s.scale_min = [0.8, 0.8, 0.8]                -- multipliers: 0.8 is 80 %
s.scale_max = [1.2, 1.2, 1.2]

d = uScatterTools.scatterInstances s
format "% instances\n" (d[1] as integer)

Read the Placed Instances

s = $uScatter001
d = uScatterTools.scatterInstances s
n = d[1] as integer
stride = d[2] as integer                     -- 14
for i = 0 to n - 1 do
(
    b = 3 + i * stride                       -- first value of instance i
    pos = [d[b + 9], d[b + 10], d[b + 11]]   -- fourth row: the position
    src = d[b + 12] as integer               -- source index
    format "% at %, source %\n" (i + 1) pos src
)

Convert a Field to Scene Objects

s = $uScatter001
s.convert_cap = 50000                        -- 0 is unlimited
n = uScatterTools.scatterToInstances s
if n == -1 then
    for note in uScatterTools.materialNotes() do format "%\n" note
else
    format "% nodes created\n" n

Freeze a Heavy Field, Then Rebuild It Once

s = $uScatter001
s.auto_update = false
s.count = 200000
s.seed = 42
uScatterTools.scatterUpdateNow s             -- one rebuild, still frozen