Houdini 20.0 Nodes Geometry nodes

Scatter and Align geometry node

Scatters points across a surface with randomized scale and orientation attributes for use with Copy to Points.

On this page
Since 18.0

Overview

This is a higher-level node that uses the Scatter node to create points on an input surface, and then adds useful attributes to create variation when you copy or instance onto the points with the Copy to Points node.

This node supports the Houdini workflow of scattering points on a surface and then copying or instancing objects onto the points, to create large numbers of objects, such as a forest or rocky landscape. Attributes on the points allow variation of how to scale and orient the copies/instances.

Visualizing the results

The best way to use this node is to set up the copying/instancing network (for example, using Copy to Points) so you can see the objects copied onto the points in the viewer. Then you can select this node and tweak the parameters based on how they affect the placement and variation of the copies/instances.

Some parameters, such as Coverage, only make sense when you can see how they affect the copies/instances, not the points.

Modeling instanced objects

Whereas the basic Scatter node is just about creating points, this higher-level node is about distributing points and creating attributes on them as sources for copying/instancing. For example, this node has options for spacing points based on the sizes of the objects to copy/instance, and automatically creating attributes that vary the instances based on rules and/or randomness.

Houdini’s copying/instancing workflows are based on using the pscale (point scale) attribute to control the size of each instance. Since this is a scale, it works best if you model the objects to copy/instance at 1 unit scale, at least along the axis you don’t want to overlap when scattering.

For example, if you are scattering trees, it is best to model each tree so the “radius” of the tree (the maximum distance from the center of the truck to the end of the longest branch) is one world unit. Then the copy node can scale the tree smaller or larger using pscale.

If you have a model created at a different scale, you can make it 1 unit scale with the Match Size node.

Tag attribute

This node creates a string attribute named tag on the points. This lets you name the points generated by one node, and use that name in later Scatter and Align nodes (or other nodes) to refer to that subset of points.

This lets you, for example, tag the points created by this node as rocks, and then in a subsequent Scatter and Align node, create points tagged pebbles that scatter around existing rocks points.

To specify points with a certain tag in a Group field, use the @tag=name group syntax. In the example above, you would set the Point group parameter in the second Scatter and Align node to the following:

@tag=rocks

Tips and notes

  • To vary the geometry that will be copied to the points, you can use the Attribute From Pieces node after this node to assign different “pieces” to points randomly or according to various rules.

  • Be careful making big increases to parameters that control the number of points. With certain interactions between parameters, the absolute number of points can spike suddenly, and the node will then take a long time to cook. You can press ⎋ Esc to cancel cooking the node if it takes too long to create the points. (See also the Emergency Limit parameter.)

  • This node has a Mode that scatters the points around “seed” constraint points from the second input. It also has a separate option in both the “scatter on surface” and “scatter around points” modes to specify a set of points from the second input that can attract or repel scattered points. The pscale attribute on the constraint points controls their individual attraction/repulsion force. See the Avoid Constraint Points option on the Point Generation tab.

  • This node can transfer (interpolated) attribute values from the underlying surface onto the scattered points. This is a very powerful feature. It lets you paint attribute values on the surface and transfer them to the copies/instances.

  • In Scatter Points Around Constraint Points mode, the node clusters the new points around the existing constraint points, but doesn’t automatically avoid any instance geometry you might put on the constraint points. Use the Remove overlapping points and Avoid constraint points parameters on the Point Generation tab to have the scatter points stay a certain distance from the constraint points so the geometry doesn’t overlap. This is useful, for example, when scattering pebbles around existing rocks.

    Scattering around constraint points without avoid constraint points or remove overlapping points.
    Scattering around constraint points with avoid constraint points but without remove overlapping points.
    Scattering around constraint points with avoid constraint points and remove overlapping points.

Inputs

Scatter Surface

The surface to scatter points on, or an existing point cloud to add orientations and scales.

Constraint Points

A point cloud that can be used to specify which areas on the surface geometry that geometry should be scattered around.

Parameters

Mode

Controls whether this node scatters new points across the entire surface, scatters around existing points, or simply adds instancing attributes to existing points. Different mode show or hide different parameters in the rest of the interface.

Scatter Points on Geometry Surface

Create points based on the shape of the surface in the first input.

Add Attributes to Existing Point Cloud

Don’t create points, just add attributes to existing points in the second input.

Scatter Points Around Constraint Points

Create points around existing points in the second input. This is useful, for example, to scatter rocks, pine cones, etc. around the trunks of trees.

Group

The surface primitives in the first input to scatter points on. Leave this blank to scatter across all surfaces. To select points by the tag attribute, use the @tag=name group syntax.

Point Group

When Mode is “Add Attributes to Existing Point Cloud”, this specifies which points in the second input to put attributes on. Leave this blank to put attributes on all points. To select points by the tag attribute, use the @tag=name group syntax.

Tag Name

The value to set the tag string attribute to on the points. This lets you, for example, tag the points created by this node as rocks, and then in a subsequent Scatter and Align node, create points tagged pebbles that scatter around existing points tagged rocks. The default is $OS (the name of this node).

This node always creates a tag string attribute, even if you leave this parameter blank.

Global Seed

The seed for all random numbers generated by this node. The same seed value will always generate the same random numbers. Changing the seed value will generate different numbers. If you want different random numbers in every frame, use $F (the frame number) as the seed.

Point Group

When Mode is “Scatter points around constraint points”, this specifies which points in the second input to scatter around. To select points by the tag attribute, use the @tag=name group syntax.

Scatter Radius Scale

When Mode is “Scatter points around constraint points”, multiply this scaling factor by the pscale attribute on the constraint points (if the attribute exists) to scale the “area of influence” around the constraint points.

Coverage

This specifies a fraction of the surface to be covered by the instanced geometry (based on the pscale radius of the points). For example, 0.1 tries to cover 10% of the surface, 0.5 tries to cover half the surface, 1.0 tries to cover the entire surface. This parameter really only makes sense if you can see how it affects copied/instanced geometry on the points. Otherwise its relationship to point placement can be very hard to understand.

Coverage set to 1.0
Coverage set to 0.5

This is a constraint the node will attempt to follow, not an exact measurement. More relaxation iterations can give more exact coverage, but it can never be perfectly accurate. For example, since it’s based on a bounding radius (pscale), it can’t fit the pieces together to completely cover the surface without overlap.

Coverage Attribute

When you set the pop-up menu next to Coverage to “Scale by Attribute”, this is the name of an attribute on the surface to use to scale the Coverage value across the surface.

Point Count Method

How the node decides how many points to scatter.

By Size

Assigns a random size to each point, based on the given minimum and maximum radius of the objects that will be copied onto the points, and spaces the points such that the objects will not overlap.

For example, if you are scattering pine trees, and you have different tree sizes you will copy onto the points, you would specify the radius of the smallest tree and the radius of the biggest tree, and the node would try to space the points so the trees would not overlap when copied onto the points.

By Density

Generates a base density across the surface. You can then scale that density per-primitive using a primitive attribute.

This is very useful for painting density onto the surface using Attribute Paint, or controlling density based on some other factor (for example elevation).

By Point Spacing

Derives the number of points to generate from the desired spacing between points.

Number of Points

Generates a specific number of points.

Total Points

When Point Count Method is Number of Points, this is the total number of points to generate on the surface. In this case, the density controls the distribution of these points, but the number of points does not change.

Scale

These parameters are visible when Point Count Method is “By Size”.

Min Radius

The smallest radius of the objects you will copy/instance onto the points.

Max Radius

The largest radius of the objects you will copy/instance onto the points.

Uniform Scale

A value to scale all point sizes by.

Density

These parameters are visible when Point Count Method is “By Density”.

Density Scale

Controls the base density of points across the surface. You can then scale this number per-primitive using a primitive attribute on the surface.

Use Density Attribute

Turn on the checkbox next to Density Attribute to scale the density by an attribute on the surface.

Density Attribute

The name of an attribute to use to scale density across different parts of the surface.

Spacing

These parameters are visible when Point Count Method is “By Spacing”.

Spacing

The desired space between each point. The node will set the density such that after relaxing points, they will not be within this distance. If a point has a pscale attribute (representing the radius of the object that will be copied/instanced onto the point), this value is multiplied by the attribute value.

Scale Mode

Set the popup menu to “Scale by Attribute” to scale the spacing using an attribute on the surface.

Spacing Attribute

The name of an attribute to use to scale spacing across different parts of the surface.

Use Minimum Spacing

Turn on the checkbox next to Minimum spacing to enforce a minimum distance between points.

Minimum Spacing

A minimum allowed distance between points when calculating spacing. Any points that would be closer than this are spaced out to this distance. It’s a good idea to set this to an acceptable value when using spacing.

This can help guard against accidentally setting the other parameters to values that would result in a tiny spacing and a huge spike in point density. (See also the Emergency Limit parameter.)

Orientation

The parameters on this tab control attributes on the points that specify how to scale and orient the objects that will be copied/instanced onto the points, such as with Copy to Points.

The best way to use these parameters is to set up your copying/instancing network to copy the objects onto the points, then select this node and tweak the parameters, so you can see how they affect the copied/instanced objects.

Alignment

By default, Houdini expects instance geometry to be modeled so that the “up” direction (for example, from the root of a tree to the top) is along the +Y axis, and the “forward” direction (for example, from the back of a car to the front) is along the +Z axis. You can modify this using the parameters in the “Alignment” group below.

Normal Direction

The axis of the instanced objects to map onto the surface normal direction. The default is “Y” (so instance geometry modeled with “up” along +Y will “stick up” from the surface).

X

Maps the initial X direction to the oriented normals.

Y

Maps the initial Y direction to the oriented normals.

Z

Maps the initial Z direction to the oriented normals.

Custom

Maps the direction specified by the Custom Normal Vector to the oriented normals.

Custom Normal Vector

When Normal Direction is Custom, the node will map this custom vector to the surface normal at each point.

Forward Direction

The axis of the instanced objects to map onto the Target Forward Vector below. This controls how the instanced geometry rotates around the surface normal direction.

X

Aligns the X direction with the Target Forward Vector.

Y

Aligns the Y direction with the Target Forward Vector.

Z

Aligns the Z direction with the Target Forward Vector.

Custom

Aligns the custom vector specified by Custom Forward Vector with the Target Forward Vector.

Custom Forward Direction

When Forward Direction is Custom, this is the direction to align with the Target Forward Vector.

Target Forward Vector

This is the direction that the Forward Direction will be pointed in after mapping the Normal Direction to the surface normals.

No Target

Does not align the Forward Direction with any given direction.

X

Align the Forward Direction with the X direction.

Y

Align the Forward Direction with the Y direction.

Z

Align the Forward Direction with the Z direction.

Custom

Align the Forward Direction with the custom direction specified by the Custom Forward Vector.

Attribute

Align the Forward Direction on each point individually with the direction specified by the point attribute Target Forward Attribute.

Custom Forward Vector

When Target Forward Vector is Custom, this defines the direction that the Forward Direction is aligned with.

Target Forward Attribute

When Target Forward Vector is Attribute, this is the name of a vector attribute on the surface that controls the forward direction at each point.

Blend Normals

When the checkbox next to Blend Normals With is on, the node will blend the “up” direction of the instances by a certain amount away from the surface normal direction toward the Blend Target direction.

Blend Normals With

Blends the “up” direction of the instances away from the surface normal direction toward this direction.

For example, if all instances are pointing “up” away from the surface, and you set this to “Z” and the Amount to 1.0, the instances will point tangent to the surface instead of away from the surface.

X

Blends normals toward the X direction.

Y

Blends normals toward the Y direction.

Z

Blends normals toward the Z direction.

Custom

Blends normals toward the custom direction specified by the Custom Target.

Attribute

Blends normals toward the direction specified on each point by the Blend Target Attribute.

Custom Target

When Blend Target is Custom, this is the direction to blend the point normals toward.

Blend Target Attribute

When Blend Target is Attribute, this is the name of an attribute containing the direction vector to blend the point normals toward.

Amount

The amount to blend the point normal direction with the target direction. 0.0 just uses the normals. 1.0 just uses the target direction. Values in between blend between the point normals and the target direction.

Scale Blend by Attribute

Whether to scale the blending Amount by an attribute on the input geometry.

Blend Attribute

The name of an attribute on the surface to use to scale the blending Amount for each point.

Rotation
All instances with “up” direction pointing along surface normal.
Randomly rotated away from default up direction by up to 30 degrees.

Max Random Cone Angle

Rotates each instance away from the default “up” direction by a certain amount, up to this maximum number of degrees. This creates variation in the orientation of the instances.

Scale Cone by Attribute

If you set the popup menu next to Max Random Cone Angle to Scale by attribute, you can scale the maximum random angle change using an attribute on the surface.

Cone Angle Attribute

When the popup menu next to Max Random Cone Angle is set to Scale by attribute, this is the name of an attribute on the surface to use to scale the Max Random Cone Angle.

Rotation Around Normal

The following parameters control how the node rotates the instances around the “up” direction.

All instances with “forward” direction pointing the same way.
Randomly rotated around the “up” pivot, from 0 to 360 degrees.

Min Angle

The minimum angle to be generated randomly.

Max Angle

The maximum angle to be generated randomly.

Round Rotation Around Normal

Whether to round the sampled random angle to the closest integer multiple of Round to Multiple Of.

Round to Multiple Of

The value to round the sampled random angle to the closest integer multiple of. For example, if you are instancing buildings, you can rotate them but keep them aligned by only allowing them to rotate 90 degrees at a time.

Offset Angle

This is the offset angle to rotate each point around its normal vector after the random part of the rotation has been determined.

Scale Offset Angle by Attribute

Whether to scale the Offset Angle on each point by an attribute.

Offset Angle Attribute

An attribute specifying the factor to scale the Offset Angle by on each point.

Remap Using Distribution Ramp

Whether to use a ramp to define the inverse CDF of the probability distribution that random angles are sampled from.

Rotation Distribution Ramp

A ramp defining the inverse CDF of the probability distribution that random angles are sampled from between the Min Random Angle and the Max Random Angle.

Point Generation

This tab is not available when Mode is Add Attributes to Existing Point Cloud.

Noise

These parameters are visible when Mode is Scatter Points Around Constraint Points.

Add Scatter Noise

Whether to add noise to the scattered point positions before influencing points to be near the constraint points.

Roughness

When Add scatter noise is on, this controls the influence falloff for each successive noise layer.

Amplitude

When Add scatter noise is on, this is the maximum displacement added to the points by the noise.

Element Size

When Add scatter noise is on, this is the base feature size of the generated noise.

Relaxation

The node scatters the new points, then iteratively moves the points to satisfy spacing and other constraints. This iterative process is called relaxation.

Relax Iterations

The number of relax iterations to apply to the points. More iterations are slower but can give better positioning of the points.

Remove Overlapping

Whether to remove points that are too close to one another to preserve spacing constraints.

Scattering around constraint points with avoid constraint points but without remove overlapping points.
Scattering around constraint points with avoid constraint points and remove overlapping points.

Overlap Tolerance

The minimum amount of overlap allowed, as a fraction of the radius required for a point to be removed.

Avoid Constraint Points

When this is on, you can specify additional constraint points from the second input in the Constraint Point Group below. The scattered points will be pulled toward or pushed away from these constraint points during relaxation, based on each constraint point’s pscale attribute.

Scattering around constraint points without avoid constraint points or remove overlapping points.
Scattering around constraint points with avoid constraint points and remove overlapping points.

Constraint Point Group

When Avoid constraint points is on, this is the group of points in the second input that repel or attract the scattered points. The pscale attribute on each constraint point controls how strongly the point repels the scattered points (if pscale is positive), or attracts them (if pscale is negative). Leave this blank to use all existing points in the second input. To select points by the tag attribute, use the @tag=name group syntax.

Radius Scale

Scales the pscale attribute on the points in the Constraint Point Group above.

Use Emergency Limit

Turn on the checkbox next to Emergency Limit to prevent the node from creating more than a certain maximum number of points.

Emergency Limit

The maximum number of points this node is allowed to generate. If you accidentally set some combination of parameters that causes a huge spike in point density, this can prevent the node from cooking for an extremely long time, or running out of memory. This is especially useful in batch processing where a human is not available to press ⎋ Esc to cancel an over-long cook.

Attributes

Use Prim Num Attribute

Turn this checkbox on to create an attribute on the scattered points containing the primitive number of the corresponding primitive (polygon face) on the surface.

Prim Num Attribute

The name of an attribute to create on the scattered points containing the primitive number of the corresponding primitive (polygon face) on the surface.

Use Prim UVW Attribute

Turn this checkbox on to create an attribute on the scattered points containing the corresponding UVW coordinates on the surface.

Prim UVW Attribute

The name of an attribute to create on the scattered points containing the corresponding UVW coordinates on the surface.

Output Radius Attribute

Turn this checkbox on to create an attribute on the scattered points containing the radius of the point (this will affect the object size when you copy/instance onto the points).

Radius Attribute

The name of an attribute to create on the scattered points containing the point radius (this will affect the object size when you copy/instance onto the points). This is on by default with the name pscale (this is Houdini’s standard instancing attribute for point scale).

Output Orient Attribute

Turn this checkbox on to create an attribute on the scattered points containing the orientation matrix of the point (this will affect the object orientation when you copy/instance onto the points).

Orient Attribute

The name of an attribute to create on the scattered points containing the orientation matrix of the point (this will affect the object orientation when you copy/instance onto the points). This is on by default with the name orient (this is one of Houdini’s standard instancing attributes for orientation).

Surface Point Attributes

A space-separated list of point attributes to copy from the surface onto the scattered points. For example, if the surface has point colors, you can specify Cd to transfer the surface color onto the scattered points. The default is *, meaning transfer all point attributes.

Surface Vertex Attributes

A space-separated list of vertex attributes to copy from the surface onto the scattered points. The default is *, meaning transfer all vertex attributes.

Surface Primitive Attributes

A space-separated list of primitive (polygon face) attributes to copy from the surface onto the scattered points. The default is empty, meaning transfer no primitive attributes.

Surface Detail Attributes

A space-separated list of detail (whole geometry) attributes to copy from the surface onto the scattered points. The default is empty, meaning transfer no detail attributes.

Match Groups

When enabled, groups matching the Surface Point Attributes, Surface Vertex Attributes, and Surface Primitive Attributes patterns will be copied from the surface onto the scattered points.

Examples

ScatterAlignBasic Example for Scatter and Align geometry node

This example shows how to scatter points on a grid with random scaling and rotations, and then scatter smaller points around the initial points.

See also

Geometry nodes