Overview
An Instance component allows you to add Visuals, Entities, and Splats along the spline.
This can create a random selection of items along a spline's length to create things such as a variety of trees along a road or a line of differently-shaped rocks.
Adding an Instance Component to a Spline
To add a Instance Component to a spline, perform the following steps:
-
Right-click on your spline and press +Add...
- Select Instance Component from the list and press Ok.
- The Instance component will now appear under your spline in the Scenario Tree.
- You are now ready to add objects or other elements to your spline.
Adding a Visual, Entity, or Splat
The instructions in the following sections detail working with specialized components you can add to your spline to produce a variety of effects.
At the most basic, however, adding objects, splats, or visual elements to a spline involves the same workflow, using the steps detailed below:
-
Right-Click the spline element you wish to add the target asset to and select +Add.
- Using the Add Blueprint panel, add the type of asset you wish to add to the spline and press Ok.
- Once you select your desired asset from the interface you chose, that asset will appear on your spline.
Instance Component Properties
Instance components possess a number of unique properties, detailed below.
Editor
- Comment: Allows you to add a comment. Visible to anyone working in the editor.
-
Display Name: A custom name you can add to this strip component for easy tracking/finding in the Scenario Tree.
- Exclude From Game: If true (ticked), the strip component will not appear in the game (it will be hidden).
- Locked: If checked, the component cannot be edited.
- Visible: If checked, the strip component is can be seen in editor.
Spline
-
Maximum Height: Can be used to make the space smaller than the bounding box. Not affected by random seed or spacing.
rarely used to tight fences or close gaps. -
Minimum Height: The initial spacing from the beginning of the line.
This affect all objects after after. Not affected by random seed or spacing.
Used to space evenly, like fences. - Maximum spacing: Maximum spacing between objects
- Minimum Spacing: Minimum spacing between objects
-
Seed: will make the spacing random. For example if min is 1 and max is 4.
the spacing can be anything in between.
Note that the seed remains the same when the spline or component is copied. -
Spacing: chose between Relative and Absolute
-
Relative - Sets a space between objects based on the size of the objects.
-
Absolute - Sets an absolute value between objects, measured in meters.
-
Relative - Sets a space between objects based on the size of the objects.
- Width: This setting has no effect on placed objects.
- Width Variation: This setting has no effect on placed objects.
Random Transformer
A Random Transformer allows you to randomly rotate the objects along a spline, giving the illusion of variance.
A spline that contains objects without a random transformer will not have any random rotation among those objects, making each of the objects along the spline appear identical.
This is often fine with fence-like object or some other line of objects that are supposed to be identical, but for more irregular, natural objects such as trees, rocks, or bushes a random transformer can be used to add variations between objects.
Adding a Random Transformer
To add a Random Transformer to a spline, perform the following steps:
- In the Object Browser, find the Random Transformer entity.
- Left-Click on Random Transformer entity and Drag it onto the Instance Component you wish to randomize.
You may now add entities to the new Instance Component you just made.
These entities will appear along your spline, each in a randomized orientation.
You can now also set the Properties of the Random Transformer to change how it appears and behaves.
Random Transformer Properties
Random transformers possess a number of unique properties.
Instancing
- Seed: will create randomness when there is min and max values set.
Maximum Rotation
- These setting allow you to set the maximum rotation on x,y,z.
Maximum Translation
- These setting allow you to set the maximum translation on x,y,z.
Minimum Rotation
- These setting allow you to set the minimum rotation on x,y,z.
Minimum Translation
- These setting allow you to set the minimum translation on x,y,z.
Randomizer
A Randomizer can be added to a spline to either allow more than one object to be set in a spline, or to sequence the same object with a variety of property values.
This can be useful when you want to mix different types of objects along a spline, either in a regular sequence or a randomized sequence.
Adding a Randomizer
A Randomizer can be added to both an Instance Component or a Random Transformer with each usage giving different effects.
To add a Randomizer to a spline, perform the following steps:
- In the Object Browser, find the Randomizer entity.
-
Left-Click on the Randomizer entity and Drag it onto either the (A) Instance Component, or the (B) Random Transformer.
A) Adding it to the Instance Component will order the objects along the spline and they will all be identically oriented.
B) Adding it to a Random Transformer within an Instance Component will apply the Random Transformer's rotation effect to each of the objects. - When the Randomizer is added, it will automatically spawn two Probability entities beneath it. If you wish, you may add more Probability entities manually from the Object Browser.
- Using the Object Browser, find and drag an object under each of the two (or more) Probability entities.
- The objects will now spawn randomly along the spline in accordance with the Probability you set with each Probability entity.
Probabilities
Probability entities control the chance one of the entities has to spawn.
Each Randomizer needs at least two Probability entities beneath it, since you need, at minimum, two options to choose between.
Additional Probability entities can be added to the Randomizer to increase the pool of possible objects it will pull from.
In the Scenario Tree, Probabilities show up as "dice" icons beneath a Randomizer.
Randomizer Properties
Randomizers only have one unique property: Seed, which controls the randomness of the probabilities.
Probabilities Properties
Probabilities only have a single unique property, labelled Probability, which controls the chance of the object from being chosen among the options.
For two items, this is most often set to 50/50, but can be set to whatever probability values you wish, as long as all probability values add up to 100%.
Sequencer
When using a Randomizer, you may wish to order the different types of objects along a spline in a regular sequence.
A Sequencer can be added to a randomized spline to either allow more than one object to be set in a spline, or to sequence the same object with a variety of property values.
Adding a Sequencer
A Sequencer can be added to both an Instance Component or a Random Transformer with each usage giving different effects.
To add a Randomizer to a spline, perform the following steps:
- In the Object Browser, find the Sequencer entity.
-
Left-Click on the Sequencer entity and Drag it onto either the (a) Instance Component OR the (b) Random Transformer of the spline you wish to randomize.
- Adding it to the Instance Component will order the objects along the spline and they will all be identically oriented.
- Adding it to a Random Transformer will apply the Random Transformer's rotation effect to each of the objects.
- Using the Object Browser, find and drag the objects you wish to add to the spline in an order.
- The objects will be ordered along the spline in accordance with the Probability you set with each Probability entity.
Note: Adding more than one visual with no sequencer will show both assets in overlapping.
Example: The example below shows a Sequencer making a pattern of trees, ordered elm - spruce - elm - spruce - elm - spruce. On the opposite side of the road, a fence has been created featuring two posts next to each other, followed by a larger gap.
In the Scenario Tree, a Sequencer will appear under either under the Instance Component itself, or a Random Transformer, as shown in the example below.
The examples below show two different versions of a randomized fence.
- The fence on the top has a rotation of 0.
- The fence on the bottom has a rotation of 180.
Both fences have a translation of -2.5 to offset them from the road.