Houdini 20.5 Nodes Geometry nodes

Spray Paint geometry node

Spray paints random points onto a surface.

On this page
Since 14.0

Overview

This node allows users to spray paint random points onto a surface, with options for random scales and orientations. It is useful for creating points on a surface and then copying geometry onto them. For example, people in a crowd, trees on a hill, or boats on water.

Turn on the Visualize as Spheres toggle to preview the random point scales as spheres. Turn that option off and put geometry into the second input to copy that geometry onto the points, scaled and oriented as specified in the Radii and Orientation tabs.

To procedurally generate random points on a surface, instead of spray painting, use the Scatter node, instead.

Note

There must be geometry in the first input to spray onto. If there isn’t, you can add geometry after painting, and points will be generated as if it had been there before, but until then, no points will be generated.

Using Spray Paint

  1. Select the object you want the spray points onto.

  2. Click the Spray Paint tool on the Create tab.

  3. Press and drag the left mouse button to spray paint points on the surface.

You can change the spray rate, and adjust many other settings after painting in the parameter editor. You can also keep painting or remove existing painted strokes as desired.

Parameters

Target Primitives

The subset of surface primitives to spray paint onto.

Spray Rate

The average number of points per unit area to spray in each click or movement of the brush.

Relax Iterations

The number of iterations of pushing the points away from each other, like in the Point Relax node. The radii used for the relaxation of the points are generated based on the parameters in the Radii tab, not based on the size of any geometry to copy from the second input, so geometry to copy should be similar in scale to a sphere with radius 1.

Random Seed

All generated point positions depend (psuedo)randomly on this value. This should always be different from Radius Random Seed, Quaternion Random Seed, Y Axis Random Seed, and Z Axis Random Seed.

Max Points

This is an optional strict limit on the number of points to generate, to avoid fatal accidents. If the number of points that would have been generated exceeds this, a number of points less than or equal to this limit will be generated, in a roughly similar distribution.

Visualize as Spheres

When enabled, spheres will be copied to the points to help visualize the point scales, or to temporarily avoid viewing heavy geometry to be copied from the second input while painting.

Point Radius Scale

Scales the radii randomly generated based on the parameters below. This avoids the need to change all of the settings for the random distribution just to uniformly scale all radii.

Distribution of Radii

Overall type of probability distribution from which radii are generated. Set this to Constant Value to have no randomness.

Constant Value

The radii will all be Middle Radius, instead of being random.

Two Values

The radii will either be Min Radius Limit or Max Radius Limit, depending on Probability of Max.

Uniform

The radii will be between Min Radius Limit and Max Radius Limit, with equal probability for all values in that range.

Normal (Gaussian)

The radii will be drawn from the normal distribution whose mean/median is given by Middle Radius, and whose standard deviation is given by Spread of Radii, limited by Min Radius Limit and Max Radius Limit.

Exponential

The radii will be drawn from the exponential distribution whose median is given by Middle Radius, limited by Min Radius Limit and Max Radius Limit.

Log-Normal

The radii will be drawn from the log-normal distribution whose median is given by Middle Radius, and whose standard deviation is given by Spread of Radii, limited by Min Radius Limit and Max Radius Limit. This distribution is useful for generating random scales, because it tapers off toward zero, helping avoid scales that are too small.

Cauchy-Lorentz

The radii will be drawn from the Cauchy distribution whose median is given by Middle Radius, and whose scale parameter, γ, is given by Spread of Radii. This distribution has larger tails than the normal distribution, so it has more outliers, meaning that Min Radius Limit and Max Radius Limit will probably be useful for preventing problematic outliers.

Custom Ramp

The custom ramp will be sampled as the inverse cumulative distribution function (inverse CDF) of a probability distribution.

Radius Random Seed

All generated radii depend (psuedo)randomly on this value, unless Distribution of Radii is Constant Value. This should always be different from Random Seed, Quaternion Random Seed, Y Axis Random Seed, and Z Axis Random Seed.

Middle Radius

The median radius, before being limited by Min Radius Limit and Max Radius Limit, which is also before being scaled by Point Radius Scale. See the help for Distribution of Radii.

Spread of Radii

Roughly the amount that radii vary from Middle Radius on average, before being limited by Min Radius Limit and Max Radius Limit, which is also before being scaled by Point Radius Scale. See the help for Distribution of Radii.

Min Radius Limit

A lower limit on the radii that can be randomly generated.

Max Radius Limit

An upper limit on the radii that can be randomly generated.

Probability of Max

When Distribution of Radii is Two Values, this is the probability that any given point’s radius will be Max Radius Limit. Every other point will have radius Min Radius Limit, so its probability is 1 - Probability of Max.

Quaternion Attribute

When enabled, a quaternion attribute with the specified name will be created to represent orientations generated for the points.

Based on Y and Z Axes (below)

When enabled, the orientations represented by the quaternion attribute will be computed based on the parameters for generating Y and Z axis directions, which can be easier to control than basing the orientations on the parameters for directly controlling the quaternions. For example, with this enabled, the default behavior is for Y be normal to the surface and Z be a random direction perpendicular to Y.

Max Angle from Center

When enabled, all orientations will be within this angle (in degrees) of Central Orientation or the values taken from Central Orientation Attribute, if specified. If Bias Toward Center is disabled, the cone of orientations within this angle will be sampled uniformly. When both are disabled, all possible orientations are equally likely.

Bias Toward Center

When enabled and greater than zero, orientations will be smoothly biased toward Central Orientation or the values taken from Central Orientation Attribute, if specified.

Central Orientation

When Max Angle from Center or Bias Toward Center are enabled, and Central Orientation Attribute is not given, this specifies the orientation at the center of the cone or toward which orientations are biased.

Central Orientation Attribute

When Max Angle from Center or Bias Toward Center are enabled, this optionally specifies a quaternion attribute on the surface geometry that will be interpolated for each generated point, to be used in place of Central Orientation. This can be a point, vertex, primitive, or detail attribute.

Quaternion Random Seed

All generated orientations depend (psuedo)randomly on this value, unless Max Angle from Center is 0. This should always be different from Random Seed and Radius Random Seed.

Y Axis Attribute

When enabled, a vector attribute with the specified name will be created to represent the generated direction for each point that the Y axis of geometry copied to it should face.

Max Angle from Center

When enabled, all Y axis directions will be within this angle (in degrees) of Central Direction or the values taken from Central Direction Attribute, if specified. If Bias Toward Center is disabled, the cone of directions within this angle will be sampled uniformly. When both are disabled, all possible directions are equally likely.

Bias Toward Center

When enabled and greater than zero, Y axis directions will be smoothly biased toward Central Direction or the values taken from Central Direction Attribute, if specified.

Central Direction

When Max Angle from Center or Bias Toward Center are enabled, and Central Direction Attribute is not given, this specifies the direction at the center of the cone or toward which Y axis directions are biased.

Central Direction Attribute

When Max Angle from Center or Bias Toward Center are enabled, this optionally specifies a vector attribute on the surface geometry that will be interpolated for each generated point, to be used in place of Central Direction. This can be a point, vertex, primitive, or detail attribute.

Y Axis Random Seed

All generated Y axis directions depend (psuedo)randomly on this value, unless Max Angle from Center is 0. This should always be different from Random Seed, Radius Random Seed, and Z Axis Random Seed.

Z Axis Attribute

When enabled, a vector attribute with the specified name will be created to represent the generated direction for each point that the Z axis of geometry copied to it should face.

Max Angle from Center

When enabled, all Z axis directions will be within this angle (in degrees) of Central Direction or the values taken from Central Direction Attribute, if specified. If Bias Toward Center is disabled, the cone of directions within this angle will be sampled uniformly. When both are disabled, all possible directions are equally likely.

See cone angle image for Y axis above.

Bias Toward Center

When enabled and greater than zero, Z axis directions will be smoothly biased toward Central Direction or the values taken from Central Direction Attribute, if specified.

Central Direction

When Max Angle from Center or Bias Toward Center are enabled, and Central Direction Attribute is not given, this specifies the direction at the center of the cone or toward which Z axis directions are biased.

Central Direction Attribute

When Max Angle from Center or Bias Toward Center are enabled, this optionally specifies a vector attribute on the surface geometry that will be interpolated for each generated point, to be used in place of Central Direction. This can be a point, vertex, primitive, or detail attribute.

Z Axis Random Seed

All generated Z axis directions depend (psuedo)randomly on this value, unless Max Angle from Center is 0. This should always be different from Random Seed, Radius Random Seed, and Y Axis Random Seed.

Prim Num Attribute

An integer point attribute with this name will be created, containing the number of the surface primitive hit by each sprayed point. It can be used with Prim UVW Attribute and the Attribute Interpolate node to have the points stick on deforming geometry.

Prim UVW Attribute

A vector point attribute with this name will be created, containing the location within the surface primitive hit by each sprayed point, in primitive parametric coordinates. It can be used with Prim Num Attribute and the Attribute Interpolate node to have the points stick on deforming geometry.

Import Attributes from Surface

When enabled, the attributes (including groups) specified below will be transferred from the surface geometry to the sprayed points as point attributes.

Point Attributes

These point attributes (including groups) from the surface geometry will be interpolated and transferred to the sprayed points.

Vertex Attributes

These vertex attributes (including groups) from the surface geometry will be interpolated and transferred to the sprayed points as point attributes.

Primitive Attributes

These primitive attributes (including groups) from the surface geometry will be transferred to the sprayed points as point attributes.

Detail Attributes

These detail attributes from the surface geometry will be transferred to the sprayed points as point attributes.

Radius

The brush radius for the next stroke to be drawn.

Tool

Reserved for future use.

Color

When enabled, stroke colors (Cd attribute) will be added to the points, and this parameter is the color for the next stroke to be drawn. The colors for strokes already drawn can be modified under the Stroke tab.

Opacity

When enabled, stroke opacity (Alpha attribute) will be added to the points, and this parameter is the opacity for the next stroke to be drawn. The opacities for strokes already drawn can be modified under the Stroke tab.

Stroke

This tab allows changing general properties of strokes that have already been drawn.

Examples

Splurgegun Example for Spray Paint geometry node

This example shows how to pipe a metaball into a spraypaint sop to create a splurgegun that you can paint with.

See also

Geometry nodes