-
Notifications
You must be signed in to change notification settings - Fork 97
Modifiers
The biggest change with V2 is the new Modifier stack. You can find it in the inspector when a Scatter
node is selected.
Scatter uses a pool of transforms to know where to create new items in your scene. The modifiers run from top to
bottom, each of them affect these transforms in a specific way. Depending on which modifiers you use in which order,
you can end up with very different results.
Each modifier also have their own parameters you can tweak by expanding their UI using the arrow on the left.
To add a new modifier to the stack, simply press the Add Modifier
button to bring up this popup:
There are 3 types of modifiers:
-
Distribute
- They initialize the transform pool and place them according to their own rules
- These modifiers always undo everything that happened earlier on the stack
so you should always start your stack with a
Distribute
modifier and only use one
-
Edit
- They take the transforms generated by the
Distribute
modifiers and process them.
- They take the transforms generated by the
-
Remove
- They remove points from the transform pool
More modifiers may be added in the future, if you can think of something useful to many people (and not highly specific to your own needs), open a proposal in the issues' tracker.
-
Distribute Inside (Random)
- The 3D curve is projected on a 2D plane (XZ). Transforms are then randomly placed inside the shape created by the 3D curve.
-
Override Global Seed
- If enabled, the global seed defined on the Scatter node itself will be ignore and a local seed will be used instead
-
Custom Seed
- If
Override Global Seed
is enabled, this seed will be used instead.
- If
-
Instance Count
- How many items do we want to scatter in this area.
-
Distribute Inside (Grid)
- Same as
Distribute Inside (Random)
except this time, points are nicely aligned along a grid. Anything outside the curve will be ignored -
X Spacing
- How much space between each transforms along the X axis
-
Z Spacing
- How much space between each transforms along the Z axis
- Same as
-
Distribute Inside (Poisson)
- Same as
Distribute Inside (Random)
except this time, points are scatted using Poisson disk sampling. Anything outside the curve will be ignored. This is a relatively slow algorithm so it might take some time for larger areas. -
Distribution Radius
- The minimum allowed distance between transforms
-
Distribution Retries
- The number of times a random transform is selected to find a valid position. After this many unsuccessful tries the transform is skipped.
- Same as
-
Distribute Along Path (Random)
- Randomly sample points along the path to create transforms along.
-
Override Global Seed
- If enabled, the global seed defined on the Scatter node itself will be ignore and a local seed will be used instead
-
Custom Seed
- If
Override Global Seed
is enabled, this seed will be used instead.
- If
-
Instance Count
- How many items do we want to scatter along the path.
-
Align to Path
- Rotate each transforms around the Y axis so their forward Z axis follow the path.
- This may or may not change later to accomodate more axes.
-
Distribute Along Path (Even)
- Place transforms at regular intervals along the path.
-
Interval
- How much space between each transforms placed along the curve.
-
Align to Path
- Rotate each transforms around the Y axis so their forward Z axis follows the path.
- This may or may not change later to accomodate more axes.
-
Distribute Along Path (Poisson)
- Place transforms around path with Poisson disk sampling.
- Same as
Distribute Inside (Poisson)
but instead of distributing inside the curve it distributes transforms around it up to a distance. -
Width
- The maximum distance a transform can be from the path.
-
Align to Path
- Rotate each transforms around the Y axis so their forward Z axis follows the path.
-
Randomize Transforms
- Apply a different random offset to each transforms' position, rotation and scale.
-
Override Global Seed
- If enabled, the global seed defined on the Scatter node itself will be ignore and a local seed will be used instead
-
Custom Seed
- If
Override Global Seed
is enabled, this seed will be used instead.
- If
-
Local Space
- The position offset will be applied in local space
-
Position
- Maximum possible offset on each axis.
-
Rotation
- Maximum possible rotation offset on each axis.
-
Scale
- Maximum possible scale offset on each axis.
-
Randomize Scale (Noise)
- Uses an Open Simplex Noise to determine how much to scale each transforms. This is useful when you want continuity in
the random scaling (as opposed to the
Randomize Tranforms
modifier that works as an infinite frequency noise). -
Override Global Seed
- If enabled, the global seed defined on the Scatter node itself will be ignore and a local seed will be used instead
-
Custom Seed
- If
Override Global Seed
is enabled, this seed will be used instead.
- If
-
Octave, Period, Persistance
- Open Simplex Noise parameters. Check out the Godot documentation for more details about each parameters.
-
Scale
- Maximum possible scale offset on each axis.
- Uses an Open Simplex Noise to determine how much to scale each transforms. This is useful when you want continuity in
the random scaling (as opposed to the
-
Randomize Rotation
- Apply a different random rotation to each transform.
-
Override Global Seed
- If enabled, the global seed defined on the Scatter node itself will be ignore and a local seed will be used instead
-
Custom Seed
- If
Override Global Seed
is enabled, this seed will be used instead.
- If
-
Local Space
- The position offset will be applied in local space
-
Rotation
- Maximum possible rotation offset on each axis.
-
Snap angle
- Force the random rotations to be a multiple of this angle.
-
Clusterize
- Apply a mask texture to the transforms.
-
Mask Scale
- How many pixels of the mask image are in a world unit.
-
Mask Offset
- Offset of the mask image in pixels.
-
Rotation
- Rotation of the mask image in degrees.
-
Remove Below
- Cutoff value of the mask image.
-
Project On Floor
- Casts a ray from the transform current position towards the floor. If it hits a collider, the transform is moved where the collision happened.
-
Ray Length
- How far the ray cast should go to find a collider
-
Ray Offset
- Sometimes, the 3D curve may pass through (or below) a collider. This parameter makes the raycast start before it's starting point to account for this.
-
Remove Points on Miss
- If the raycast didn't hit anything, the transform will be completely removed. If disabled, the transforms stays where it is.
-
Align with Floor Normal
- Rotates the transform so it's local Y axis maches the normal of the floor where the collision happened.
- `Invert Ray Direction'
- Cast a ray towards the opposite direction
-
Floor Direction
- Defaults to the Down axis. You can change this value if you want to project transforms side ways toward a wall for example.
-
Relax
- Increase the distance between close transforms. Finds the closest neighboring for each transform and moves it in the opposite direction.
- The process is repeated
Iterations
number of times. The first time each transform is moved byOffset Step
. Each iteration the step size is multiplied byConsecutive Step Multiplier
. - For scatters with many transforms this might be very slow.
-
Exclude From Path
- Find all the transforms inside the given 3D path (projected on the XZ plane) and deletes them.
-
Path Name
- Name of the path to use for the exclusion zone. This path must be a child of the
Scatter
node. - It can be a
ScatterExcludePath
or even anotherScatter
node, they both inherits from a hiddenScatterPath
class so they both work.
- Name of the path to use for the exclusion zone. This path must be a child of the
-
Exclude Along Path
- Find all the transforms close enough to the 3D path and deletes them.
-
Path Name
- Name of the path to use for the exclusion zone. This path must be a child of the
Scatter
node. - It can be a
ScatterExcludePath
or even anotherScatter
node, they both inherits from a hiddenScatterPath
class so they both work.
- Name of the path to use for the exclusion zone. This path must be a child of the
-
Width
- How far away transforms are removed.
-
Ignore Height
- Projects the 3D curve and all the transform positions on the XZ plane and perform the operations in 2D space.
-
Exclude Around Point
- Deletes all the transforms within a distance to a point.
-
Radius
- How far away transforms are removed.