The Spawner is one of the most powerful tools in Gaia: It places resources such as Textures, Trees, Terrain Details (Grass) and Game Objects on your terrain with intelligent placement rules. This article describes the spawner in detail.


1. Spawner Basics


One of the most time consuming tasks when creating a terrain can be to determine the positioning of Resources on the terrain. There are a few tools in the Terrain Inspector that allow you to hand-place textures and trees etc., but doing so for an entire terrain can take multiple hours. As soon as you wish to make fundamental changes on the terrain - such as moving a mountain elsewhere for gameplay reasons - you need to spend hours again adjusting placements of textures and other resources again to accommodate for that change.


The Spawner solves this by letting you define Spawn Rules for your Resource placement. A Spawn Rule does contain settings for the resource itself (e.g. which texture to spawn), but also settings for where to place that texture on the terrain. By following the settings defined in the spawn rules the spawner can perform resource placement in a fully automated fashion, from adding the resource prototype to the terrain to the placement of the individual objects. Once a spawner has been set up, it can be run as many times as you like and can also be used again in different scenes / different projects.

To operate the spawner, you would need to perform at least these steps:



  1. Position the Spawner over the terrain using the transform component or the position Gizmo in the scene view (this step is only relevant when you want to spawn in a limited area on the terrain)
  2. Set the Spawner Range so that it matches the desired area where you want to spawn. (Again only relevant when spawning in a limited area)
  3. Make sure you have some spawn rules set up in the spawner
  4. Spawn the resources from the spawn rules by either selecting "Spawn Local" to (To spawn the resource in the designated area you created in Step 1+2) or "Spawn World" (To spawn the resources everywhere, including multiple terrains)


This is a bit oversimplified since there are a lot of settings and features for the individual spawn rules that will all be detailed further down below, but the core principles of operating the spawner are that simple, set where to spawn by positioning the spawner, set what to spawn via the spawn rules, then click one of the two buttons at the bottom.


The following Chapters will go more into detail explaining the individual settings and features of the spawner.


2. Spawn Settings



On top of the spawner you can find general settings for the spawner that will influence all of the spawn rules. These settings are:

NameThe name of the spawner. This is also the name of the object in the scene view. You can give any name, but it is recommended to reference the purpose of the spawner / what kind of resources it spawns.
RangeThe range of the spawner when spawned in "Local" mode. The range is interpreted as an extent on all axes from the transform position of the spawner. E.g. a range of 512 results the spawner spawning in a cubed area of 1024 x 1024 x 1024. You can see the spawn range in the scene view as a box if Gizmos are enabled.
Sea LevelA scene-wide setting that determines the Y-position of the water plane in the scene. This is a fairly important setting because the position of the water plane has a high impact on the overall look of the terrain and spawner settings can be dependent on the sea level as well. When you change the sea level here, it will be changed in all other tools as well automatically.
Global Spawn DensityAnother scene wide setting that determines the density for all (!) objects spawned by all spawners. The higher the value is, the closer objects will be spawned together and more objects will be created, which usually looks better but also impacts performance more.
Spawn ModeYou can determine whether you want to "Replace" the existing resources on the terrain "Add" to the existing resources or "Remove" from the existing resources. In majority of the cases you can leave this on "Replace" and as you spawn the spawner will simply clear all of the resources and spawn them again. This allows you to experiment with the spawn settings until you get the results you want. Only in rare cases you would want the spawner to "Add" to create additional spawns on top of the existing ones, or to "Remove" which would not spawn but instead take away resources from the terrain.
Random SeedSome elements of the spawn process are determined by a random chance. (E.g. a 60% chance that a chicken coop will appear next to a house) The random generator uses a so-called seed value from which these choices are derived. Per Default Gaia creates a different seed value for each spawn, meaning the spawn result will be different each time the spawner is run. You can choose to uncheck the "Generate" Checkbox and enter any (Integer) number as a seed value yourself - as long as other parameters of the terrain do not change, the spawn result will then always be the same.


General Mask Stack


Below the general settings you can find a section for Mask Settings that will be applied to all spawn rules below. Masks are a way to determine placement of the resources on the terrain. Masking is a complex topic that has its own article in the knowledge base: Using Masks In Gaia
Please note that this is the mask stack of the spawner itself, while each spawn rule can have a mask stack of their own:


The stack in the general spawner settings will be applied to all the rules below, while each rule has a mask stack of their own. If there are both masks in the general mask stack and in the rule mask stack, the masks will give a combined result:


In the example above, there is a height mask in the general settings and a slope mask on the spawn rule for the snow. The end result is that the snow will only appear on high, sloped areas on the terrain (as indicated by the purple visualization).

You need to consider if you want to put a mask into the stack of the individual rule, or in the general mask stack of the spawner itself. E.g. if you set up a height mask to spawn only above 100 meters, none of the spawn rules below will bear any results below 100 meters anymore, which can be good or bad depending on what you want to achieve with the spawner.
From a different perspective, if you find putting yourself the same mask settings in multiple rules, you could consider putting this mask in the general mask stack of the spawner itself.


"Fit To" Buttons


At the bottom of the general Spawner Settings you will find two Buttons: "Fit To Terrain" will adjust the spawner to be aligned with the current terrain it is hovering over, "Fit To World" will align it to all terrains to the scene (as long as the combined size of the terrains does not exceed the maximum range of the spawner)
Note that these buttons and the positioning of the spawner are only relevant when you want to execute the spawn in a restricted area, if you want to spawn across the entire scene, the position / range is being ignored and the spawn will take place on all terrains in the scene anyways.


3. Spawn Rules



The spawn rules are where the "what you want to spawn and where you want to spawn it" is defined. The spawn rules are presented in a list, where each entry is its own unfoldable panel. The controls for the list header are as follows:


Fold / Unfold the entire spawn Rule list. This only influences whether the full list of spawn rules is being shown on the spawner UI, but has no functional influence for the spawn result.
Activates / Deactivates all Spawn Rules at once. Deactivated Spawn Rules will not spawn when the spawner runs.
Just the title of the list, you can click on it to fold / unfold the list for convenience.
The "Visualize All" button. As soon as you have visualizations enabled on the spawn rules, you can switch them on and off together with this button. Helpful when running visualizations for multiple rules while also wanting to be able to see the terrain inbetween.
Deletes all spawn rules in this spawner.


The controls for each Spawn Rule Panel are similar, but the functionalities rather refer to the rule itself than the entire list of rules. The controls for each spawn rule panel are as follows:


  Fold / Unfold the Spawn Rule. This only influences whether all the Spawn Rule Settings are being shown on the spawner UI, but has no functional influence for the spawn result
Activates / Deactivates the Spawn Rule. Deactivated Spawn Rules will not spawn when the spawner runs. Deactivated Spawn Rules will be displayed in a lighter color on the UI, and the controls will be inactive to indicate the rule is inactive at this point.
Just the name of the spawn rule, you can click on it to fold / unfold the rule panel for convenience. The number in brackets indicates how many instances of that resource have been spawned on the terrain.
The name for the spawn rule is being set by Gaia automatically according to the resource that is being spawned, but you can change the name inside the spawn rule panel.
Move Spawn Rule up / down in the list. This is mostly for convenience and creating order, however note that the order of the spawn rule will also influence in which order the respective prototypes will be put on the terrain. This can potentially influence connected systems, e.g. if a terrain shader is dependent on a certain texture order on the terrain, you might create an issue by shifting the order of the textures around by re-arranging the rules.
Duplicates the spawn rule. Note that this will also create a duplicate of the resource settings used in this rule.
Copy the Spawn Rule settings from this rule into clipboard.
Paste the Spawn Rule settings from the clipboard into this rule.
Visualization and Visualization Color: The eye button enables a preview within the current range of the spawner that shows you where the resource in the spawn rule will be spawned on the terrain according to the current settings. Without any restricting settings, the resource will be spawned across the entire terrain, but with the help of masks you can restrict the spawning to areas where you want the resource to actually appear. Here is how a typical visualization looks like:


You can leave the visualization enabled while you are changing the settings and masks to see how it influences the spawn result. With the color selection field you can change the color of the visualization area. Note that it is possible to enable up to 5 visualizations at the same time.
The visualization does only take the current state of the terrain into account - if a previous spawn rule changes the terrain in such way that it would influence the spawn result, the visualization will not be aware of this in advance.
Activates the inline help for all the spawn rule settings. Use this if you are unsure what a certain setting inside the spawn rule panel does.
Deletes the single spawn rule from the list.


3.1 Resource Settings


As mentioned before, each Spawn Rule is responsible for spawning a certain resource on the terrain. To determine what type of resource the rule spawns, and what the parameters for this resource are, are set in the Resource Settings foldout within the spawn rule. This foldout can be found right under the name for the spawn rule:


3.1.1 Resource Types


Inside the resource settings, there is a Resource Type selection that decides which kind of resource you want to edit. The Resource Type distinguishes between the various object types that you can place on an unity terrain. Most of these types are not an invention by Gaia, but are rather a specific terrain feature offered by Unity for the terrain object. E.g. when you spawn a tree with Gaia, Gaia will take the tree prefab and add it in such way as if you would have placed the tree manually using the Terrain Tree system. This ensures that other assets that work with Unity terrains work on terrains created with Gaia as well.

The types that you can currently spawn with a Gaia Spawner are:


TypeDescriptionUnity Manual
Terrain TextureThe graphic that is displayed on the surface on the terrain. You can paint multiple textures on top of each other to create the illusion of different surfaces on the terrain.Terrain Layers
Terrain Detail (Grass)Small billboard sprites or meshes used to create the impression of grass or likewise vegetation on the terrain.Grass and other Details
Terrain TreesGameObjects that represent the trees on the terrain.Trees
Game ObjectsThis type is not limited to the terrain itself, but can literally be any Unity object you can imagine. Usually this would be decorative objects that would not fall in the categories above like Houses, Rocks, etc. but you could also use the Gaia spawner to place Particle Systems or Enemy Spawners on your terrain. Any Prefab will behave as if you put it on the terrain manually.GameObjects

Prefabs
Spawn ExtensionsThis is not a native Unity type, but rather a system that allows you to execute your own snippet of Code on every position where the spawner would spawn. Instead of placing an object you can perform your own action in this location, or set up a more complex object with information about its surroundings.
N/A
Light and Reflection ProbesLight and Reflection Probes can be important tools to properly lighten your scene. Placing probes manually across the terrain can be very time consuming. Gaia assists you with probe placement in two ways: You can spawn Probes in a grid-like pattern from the Gaia Manager or the Lighting Settings object, or you can spawn them from the spawner like you would spawn regular Game Objects. Light Probes

Reflection Probes


For each of these resource types, you can start to add individual resource entries in the spawner from the "Selected Resources" dropdown. For example, if you have already maintained two resource entries for two Rock model Game Object Resources, your "Selected Resources" dropdown would look like this:



When you select "Add New GameObject..." it will create another GameObject Resource entry for you that you can edit:


One Resource entry can be re-used by different spawn rules in the spawner - this is useful if you e.g. want to spawn the same texture using two different mask setups.


Depending on the selected type, you can enter all the settings that will control the appearance of your resource on the terrain.


Please Note: The amount of settings for resources might seem overwhelming at first, but the resource will usually spawn fine with just the default settings. So for adding a new tree for example it is enough to enter the tree prefab, and then only tune resource settings as you need them, e.g adjust the spawning size.

After selecting your resource for your spawn rule ("What to Spawn") you can set resource specific spawning settings ("How to Spawn") which will then be executed within the area defined by the Masks of the Spawner and the Spawn Rule ("Where to Spawn")

Since both the settings for the resource and their spawning setting change between the selected resource type, the following section will describe the resource setup and spawning settings for the available resource types.


3.1 Spawning Resources


3.1.1 Terrain Textures


Resource Settings

Please Note: The terrain texture settings are mostly identical with the settings that you will find on the Unity Terrain Layer. When a terrain texture resource is spawned on the terrain, a Terrain Layer with those exact settings will be created on the terrain. It is recommended to read the documentation on the Terrain Layer in the unity manual as well, because there is  interesting information on how the terrain engine handles certain aspects of these settings.


Resource NameThe name of the resource. You can freely enter a name here to identify the resource. If you do not enter a name, the name will be taken from the texture that you assign in the "Texture" field below.
TextureThe main diffuse / albedo texture you want to use for this texture resource.
Normal mapThe normal map you want to use for this texture resource.
Mask MapAn optional texture that contains additional information about the surface in its color channels. Please see the Terrain Layer documentation for more information.
Size XThe scaling of the texture along the X axis.
Size YThe scaling of the texture along the Y axis.
Offset XAn offset for the texture drawing on the X axis. Increasing this value will shift the texture around on the X axis.
Offset YAn offset for the texture drawing on the Y axis. Increasing this value will shift the texture around on the Y axis.
Normal ScaleStrength of the Normal map texture effect when a normal map is supplied.
Channel RemappingAllows you to fine tune the effect of the Mask Map texture per channel (if a mask map texture is supplied and if it has an effect in the current terrain shader)
SpecularColor of the specular reflection highlights on the terrain.
MetallicThe overall metallic value for this terrain layer.
SmoothnessThe overall smoothness value for this terrain layer.


Please Note: If this texture has already been spawned / added on the terrain, you need to click the "Refresh on Terrain" Button to update the Terrain Layer with the newest values so the changes become visible on the terrain.

Spawning Settings


Textures do not posses any spawning settings. Since textures are "painted" on the terrain, the texture, as it is set up in the resource settings, will simply appear in the areas selected by the mask settings of the spawn rule and the spawner. Here is an example of the visualization of a grass texture spawn rule, and the final texturing result. The area highlighted in blue becomes the area where the grass texture is placed during the spawning.


Please Note: Spawning the Textures works like painting with colors on a canvas. This means that:

  • Texture spawning order can influence the spawn result: If you spawn a cliff texture on mountain tops and then a grass texture that goes everywhere on the terrain, the cliff texture will not be visible anymore, since it was overridden by the grass texture. You would need to spawn the grass texture first and the cliff texture on top of it instead. You can reorder the spawn rules with the up and down buttons to change the order of execution.
  • You do not need to remove / erase textures from the terrain - to start over with texturing, simply spawn over the existing textures. We often receive support requests from users that ask how they can "erase textures to start again" so they can get the original checkerboard "empty" terrain back.
    This is possible to a certain degree by removing the terrain layer prototypes from the terrain, but as soon as you start adding terrain layers to your terrain, unity will display the entire terrain in that texture anyways.
    Instead, ask yourself "which texture would be the default texture on my terrain?" Usually that would be a basic ground texture like sand, grass, gravel, etc. Take this texture as your first texture in your spawner, and set it up to not use any masks at all so it will be spawned everywhere on the terrain.
    This texture will then act as your "foundation" on the canvas where all other textures are placed upon. This approach also has the advantage that your "foundation" will reset any previous texture spawning so you will always start with a clean slate when spawning.

3.1.2 Terrain Details (Grass)


Resource Settings


Please Note: The terrain detail settings are mostly identical with the settings that you will find on the Unity Terrain Detail Prototypes. When a terrain detail resource is spawned on the terrain, a Terrain Detail prototype with those exact settings will be created on the terrain. It is recommended to read the documentation on the Terrain Layer in the unity manual as well, because there is interesting information on how the terrain engine handles certain aspects of these settings.

Terrain Details can be displayed in multiple ways:


  • As a texture, that is rendered with a simple Billboard shader
  • As a texture, that is rendered using the unity grass shader
  • As a mesh, that is rendered using the unity Vertex Lit shader
  • As a mesh, that is rendered using the unity Grass shader

You can use these modes for your terrain details that you set up in Gaia as well, by chosing the appropiate combination of settings, (e.g. supplying a mesh and then selecting Render Mode = Vertex Lit if you are going for that combination)

The density of the terrain details is controlled by multiple factors:

  • The Terrain Detail resolution setting in the terrain inspector / when creating a terrain from the Gaia Manager: This setting controls how many "terrain detail pixels" or cells are available to place terrain details on the terrain. The more cells are available, the denser the possible placement for terrain details. Cranking this setting up alone will not produce more details, they need to be spawned while using the higher resolution setting as well.
  • The "Detail Density" setting in the terrain Inspector: Controls how many terrain details Unity will render. It is important to know that even though you might have a lot of terrain details spawned, those might not be visible due to this setting.
  • The "Global Spawn Density" setting on top of the Spawner. Since this setting controls the overall spawn density of Gaia, it will also reduce the amount of terrain details being spawned if this setting is being lowered.
  • The "Detail Density" setting in the spawn rule - Controls the density per individual grass resource that you spawn

You do not need to worry about these settings immediately, but you should be aware that these exist when you want to fine tune grass placement or optimize performance.



Terrain Details are not supported in HDRP - The HDR Pipeline does not support the terrain detail system yet. You would need to create your own HDRP grass shader or look for HDRP compatible grass rendering tech on the asset store.


Resource NameThe name of the resource. You can freely enter a name here to identify the resource. If you do not enter a name, the name will be taken from the Texture / Grass Prefab field below.
Render ModeThe render mode you want to use for this terrain detail resource. You can choose between:
  • Grass billboard (textures only): Displays a texture that is always rotated towards the camera orientation. Can be used to display very dense grass, on patchy grass the rotation effect looks outdated.
  • Vertex Lit (meshes only): Displays a mesh using a very simple vertex lit shader.
  • Grass (meshes & textures): Displays a mesh or a texture using Unity's grass shader.
Grass PrefabAssign a prefab with a mesh on it to use this as a terrain detail. Note that this needs to be a very simple prefab with a single mesh and no Level of Details (LODs), otherwise it will not render properly on the terrain. The terrain detail should render the exact same way on the terrain when created by Gaia as if you would have added it manually to the terrain - if a terrain detail does not render when added manually, it will also not render when placed with Gaia.

If you do need to render a terrain detail with multiple LODs you can consider setting it up as a terrain tree or a game object instead.
Spawn ScaleThe Spawn Scale is set fixed to "Random", since the Terrain Detail System only allows for randomly sized instances. There is a perlin noise pattern that controls the chosen min max values, see "Noise Spread" below.
Width Min MaxThe minimum and maximum width of the terrain detail instances on the terrain. 
Height Min MaxThe minimum and maximum height of the terrain detail instances on the terrain. 
Noise SpreadBoth min max height values and dry and healthy colors are chosen by a perlin noise pattern. The noise spread controls the size for the noise pattern. With a value from 0-1 you will see rather large & even areas of the same size and color, while above 1 the choice for color & size will look completely random.

Example with blue and red as dry & healthy color:

Noise Spread 0.1:


Noise Spread 1.0:

Healthy ColorA color tint that is representing the more "healthy" areas of the grass distribution. The exact pattern for the tint is influenced by perlin noise, see "Noise Spread" above. 
Dry ColorA color tint that is representing the more "dry" areas of the grass distribution. The exact pattern for the tint is influenced by perlin noise, see "Noise Spread" above. 


Please Note: If this terrain detail has already been spawned / added on the terrain, you need to click the "Refresh on Terrain" Button to update the Terrain Detail Prototype with the newest values so the changes become visible on the terrain.

Spawning Settings


Terrain Details have the following settings that influence how the Grass Resource is being spawned:

Detail Density:How dense this terrain detail resource should be spawned. The number value determines how many terrain detail items should be placed in one of the vegetation cells (or terrain detail resolution pixels) on the terrain. Note that there are multiple factors influencing the terrain detail density, you can find more information about this further above the resource settings table.
Min Fitness %The minimum fitness value taken from the mask stack / visualization that the resource needs to reach before it spawns.
Fade Out Fitness %If you set this value higher than the Min Fitness %, Gaia will start fading out the terrain detail spawn by intentionally leaving terrain detail cells empty. This creates a "patchy" look towards the border of the spawn area.

An Example, this grass resource spawns in a circle with a distance mask. Without the Fade Out Fitness Setting it creates a relative harsh border at the end of the distance mask:


With the Fade Out Fitness % setting being higher than the Min Fitness %, the border becomes less obvoius and gets a more natural "patchy" look:


3.1.3 Terrain Trees 


Resource Settings

Please Note: The terrain tree prefab that you provide here will be the one that will be added as a tree prototype when you spawn the tree on the terrain. The prototype will also inherit the bend factor from the resource settings, the other resource settings are unique to Gaia.

Tree prefabs can only use simple colliders (which will be merged into a single collider with the terrain during runtime) and cannot have scripts or other complex components stored on them. This is a limitation of the Unity terrain system and is often an issue when trying to create interactive trees. You need either to employ workarounds to make trees interactive with these restrictions in place, or spawn trees as Game Objects instead.

Tree Resources have an unique "Switch To Stand-In Button" available that lets you quickly exchange the tree model with a striking red stand-in model - this is to identify the tree you are editing on the terrain, but also to determine where instances of this tree have been spawned in a densely populated forest. Here is an example, without the stand-in feature it would have been difficult to identify the exact spawn locations of the spruce tree model inside the forest:


Resource NameThe name of the resource. You can freely enter a name here to identify the resource. If you do not enter a name, the name will be taken from the Desktop Prefab field below.
Desktop PrefabThe tree prefab you want to use for this terrain tree resource. You can choose pretty much any Game Object to display it as a tree.
However tree prefabs can only use simple colliders (which will be merged into a single collider with the terrain during runtime) and cannot have scripts or other complex components stored on them. This is a limitation of the Unity terrain system and is often an issue when trying to create interactive trees. You need either to employ workarounds to make trees interactive with these restrictions in place, or spawn trees as Game Objects instead.
The terrain tree should render the exact same way on the terrain when created by Gaia as if you would have added it manually to the terrain - if a tree does not render correctly when added manually, it will also not render when placed with Gaia.
Bend FactorControls how much the tree will bend in the wind, granted the tree / its shader does support this setting. The unity tree creator trees uses this setting, but there are various other tree assets available on the unity asset store that might use their own system for tree wind bending.
Spawn ScaleThe Spawn Scale is set fixed to "Random", since the Terrain Detail System only allows for randomly sized instances. There is a perlin noise pattern that controls the chosen min max values, see "Noise Spread" below.
Healthy ColorThis is a setting used by Unity Tree Creator Trees in earlier versions of unity. It is being kept for legacy reasons, but will be removed in the future.
Dry ColorThis is a setting used by Unity Tree Creator Trees in earlier versions of unity. It is being kept for legacy reasons, but will be removed in the future.
Scale
Spawn ScaleHere you can select between multiple scaling modes while spawning which will influence the size of your spawned trees. Depending on the selected Spawn Scale Mode, the available scaling settings will change.

Fixed - The trees will be spawned with fixed width and height settings.
WidthThe fixed width to spawn with.
HeightThe fixed height to spawn with.
Fitness - The trees will be spawned according to the fitness of the area. The stronger the fitness is, the larger the tree will be. You can see the "fitness" by activating the visualization for this spawn rule with the eye icon button. Note that the tree spawn rule also has a "Minimum Fitness" setting, that determines the minimum required fitness an area needs to have before a tree spawns at all.
Width Min MaxSets the width range for the fitness scaling. The minimum width will be chosen at 0% fitness, the maximum width at 100%.
Height Min MaxSets the height range for the fitness scaling. The minimum width will be chosen at 0% fitness, the maximum height at 100%.
Random - The trees will be sized randomly between the min and max settings. Gaia will keep the scaling proportionate, a tree with a high scaling for width will have a high scaling for height as well.
Width Min MaxSets the width range for the random scaling. A value will be randomly chosen between the available min-max range.
Height Min MaxSets the height range for the random scaling. The value will be chosen in relation to the random result from the width min max slider above to keep the tree proportions.
Fitness Randomized - The scaling works based on fitness, but there is a bit of randomization applied to the end result to make the scaling less uniform and more natural. Gaia will keep the random component proportionate between width and height to not distort your trees.
Width Min MaxSets the width range for the scaling. The minimum width will be chosen at 0% fitness, the maximum width at 100%.
Width Random %The random percentage that is applied to the width scaling. Let's say the width value after fitness is 4.0, and the Width Random % is 50 % - the final width scaling then can be anything between 2.0 and 6.0
Height Min MaxSets the height range for the scaling. The minimum height will be chosen at 0% fitness, the maximum width at 100%.
Height Random %The random percentage that is applied to the height scaling. Let's say the height value after fitness is 4.0, and the Height Random % is 50 % - the final height scaling then can be anything between 2.0 and 6.0.



Please Note: If this terrain tree has already been spawned / added on the terrain, you need to click the "Refresh on Terrain" Button to update the Terrain Tree Prototype with the newest values so the changes become visible on the terrain.


Spawning Settings


Terrain Trees have the following settings that influence how the Tree Resource is being spawned:

Location IncrementControls how close the trees are being placed together. While spawning, the spawner travels across the terrain starting at one corner of the terrain, then incrementing the X and Z coordinates to the next spawn location. The higher the location increment is, the larger the "Gaps" will be between the trees.
The minimum location increment value will be used in areas with perfect fitness, the maximum increment will be used in areas with 0 fitness. In this way trees will grow closer together in areas with good fitness. The trees in this example are from the same spawn rule, on the left there is higher fitness, which results in closer tree placement due to the location increment values:

If you want the distance to always be the same, you can choose the same value for minimum and maximum.

Jitter %The Jitter adds randomization to the tree positioning. The % refers to the minimum location increment value. 50% Jitter means that up to half of the min location increment can be added to the X and Z position of the tree on the terrain. Example:

Trees placed with 0 % Jitter:

Trees placed with 15% Jitter:

Trees placed with 50% Jitter:
Min Fitness %Defines how much fitness the masked area must posses before trees can be spawned. Example:

Visualized Area:

Tree Spawns at Min Fitness = 25%:

Tree Spawns at Min Fitness = 75%:


3.1.4 Game Objects


Resource Settings


 

Please Note: Unlike the other resources, Game Object resources do not have a prototype representation on the terrain object. This is because Game Objects are just that - they will be created as regular part of your scene and are not directly dependent of the terrain object at all. If you are having any object that does not fit in the Texture / Terrain Detail / Tree categories, you can still spawn it as a Game Object.


Editing a Game Object resource is also special in so far as you can add multiple prefabs for one spawn rule all with individual resource settings each.


This might seem overly complicated first, but makes sense when you spawn more complex objects like houses or other Points
Of Interest - there you can spawn an entire group of Game Objects to build a larger connected structure. For more details on spawning POIs, please see this article.

You can add and remove prefab instances with the respective buttons in the list of prefabs. There is also a drag and drop box in the advanced settings panel that allows you to drag a selection of Game Objects onto the spawner. The prefabs dragged & dropped in this fashion will then be set up in the resource settings with the positioning and scaling kept intact - this is useful for creating more complex Game Object spawn rules consisting of many objects.

Prefab
Resource NameThe name of the resource. You can freely enter a name here to identify the resource. If you do not enter a name, the name will be taken from the Desktop Prefab field below.
Desktop PrefabThe prefab you want to spawn for this Game Object spawn rule. In principle you can assign any prefab in here, and it will be created on the terrain as if you added it to the scene manually.
Min InstancesThe minimum amount of instances you want to create when this prefab spawns. Creating multiple instances per spawn can be useful for spawns like rock piles. If min and max are different, the amount will be chosen randomly between min and max.
Max InstancesThe maximum amount of instances you want to create when this prefab spawns. Creating multiple instances per spawn can be useful for spawns like rock piles. If min and max are different, the amount will be chosen randomly between min and max.
Probability Rate %The chance that this prefab will spawn at all. This does not make much sense if you have only one prefab per rule, but if you have multiple prefabs in this spawn rule you can use this to create variations between the spawns, e.g. you can create a house spawn where the house has a 20% chance of also having a chicken coop next to it, a 50% chance of a mailbox in front of it, etc.
Offset
Spawn Offset XOffset on the X axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider.
Spawn Offset YOffset on the Y axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider. Please also see the "Y-Offset to Slope" setting.
Spawn Offset ZOffset on the Z axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider.
Y-Offset to SlopeIf this box is checked, the Y-Offset will be applied in the direction of the terrain slope, instead of straight upwards. Usually you want this to be checked for any object that is "lying" on the terrain, e.g. rocks, dead trees, debris, etc. You would leave it unchecked for objects that are rooted / anchored to the terrain such as trees, fence posts, etc.
Rotation
Rotation Offset XRotation on the X axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider.
Rotation Offset YRotation on the Y axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider.
Rotation Offset ZRotation on the Z axis for each instance. The value will be chosen at random between the minimum and the maximum of the slider.
Rotate to SlopeAdditionally rotates the instance so that is aligned with the slope of the terrain. Usually you want this to be checked for any object that is "lying" on the terrain, e.g. rocks, dead trees, debris, etc. You would leave it unchecked for objects that are rooted / anchored to the terrain such as trees, fence posts, etc. 
Scale
Spawn ScaleHere you can select between multiple scaling modes while spawning which will influence the size of your spawned trees. Depending on the selected Spawn Scale Mode, the available scaling settings will change.

For all the Scale Modes you can decide whether you want to use a "common scale", where you enter a single value for all scale axes of the object at the same time, or if you want to edit the scaling for each axis individually.



Fixed - The game object will be spawned with a fixed scale.
Fixed ScaleThe fixed scale to spawn the object with.
Fitness - The game object will be spawned according to the fitness of the area. The stronger the fitness is, the larger the game object will be. You can see the "fitness" by activating the visualization for this spawn rule with the eye icon button. Note that the game object spawn rule also has a "Minimum Fitness" setting, that determines the minimum required fitness an area needs to have before a game object spawns at all.
Minimum ScaleSets the minimum range for the fitness scaling. The minimum will be chosen at 0% fitness, the maximum at 100%.
Maximum ScaleSets the maximum range for the fitness scaling. The minimum will be chosen at 0% fitness, the maximum at 100%.
Random - The game object will be sized randomly between the min and max settings. When not activating the "common scale" option, each axis will be scaled individually, which can lead to distorted object spawns if the range between min and max is large enough.
Minimum ScaleSets the minimum range for the random scaling.
Maximum ScaleSets the maximum range for the random scaling
Fitness Randomized - The scaling works based on fitness, but there is a bit of randomization applied to the end result to make the scaling less uniform and more natural. When not activating the "common scale" option, each axis will be scaled individually, which can lead to distorted object spawns if the range between min and max is large enough.
Minimum ScaleSets the minimum range for the fitness scaling. The minimum will be chosen at 0% fitness, the maximum at 100%.
Maximum ScaleSets the maximum range for the fitness scaling. The minimum will be chosen at 0% fitness, the maximum at 100%
Random %The random percentage that is applied to the scaling. Let's say the value after fitness is 4.0, and the Random % is 50 % - the final  scaling then can be anything between 2.0 and 6.0.

Scale By DistanceAllows you to additionally influence scaling according to how far the instance was offset (See "Offset" above) from the spawn point. The curve represents the distance from the spawn point with 0 distance being on the left side and the maximum possible offset being on the right side of the curve. Some Examples:

No Distance Scaling
Linear Falloff from the center to the edges
Curve Falloff from the center to the edges


Spawning Settings



Game Objects have the following settings that influence how the Game Object Resource is being spawned:


Spawning
Location IncrementControls how close the game objects are being placed together. While spawning, the spawner travels across the terrain starting at one corner of the terrain, then incrementing the X and Z coordinates to the next spawn location. The higher the location increment is, the larger the "Gaps" will be between the game objects.
The minimum location increment value will be used in areas with perfect fitness, the maximum increment will be used in areas with 0 fitness. In this way game objects will be placed closer together in areas with good fitness. The cubes in this example are from the same spawn rule, on the left there is higher fitness, which results in closer placement due to the location increment values:
If you want the distance to always be the same, you can choose the same value for minimum and maximum.

Jitter %The Jitter adds randomization to the game object positioning. The % refers to the minimum location increment value. 50% Jitter means that up to half of the min location increment can be added to the X and Z position of the game object on the terrain. Example:

Cubes placed with 0 % Jitter:

Cubes placed with 50% Jitter:

Cubes placed with 75% Jitter:
Min Fitness %Defines how much fitness the masked area must posses before the Game Object can be spawned. Note that this setting can become important if you have a larger Object that occupies a large area on the terrain. Gaia will calculate the average fitness below the Bounds Area of the object to determine if the average fitness in this area is high enough to still warrant a spawn.

Example:

Visualized Area:

Cube Spawns at Min Fitness = 25%:

Cube Spawns at Min Fitness = 75%:
Min Max RotationThe minimum and maximum rotation for this spawned object as a whole, including all instances. The difference between this setting and the rotation settings inside the resource configuration is that this will rotate all instances together as one single entity. Imagine you set up a house with a chicken coop and a fence, each with their own fixed rotation setting as an instance. This setting will then allow you to rotate the entire house construct consisting of 3 objects as a whole.
Scale MultiplierSimilar to the rotation, this allows you to scale up or down all instances that are spawned by this rule as a whole.
Bounds Check
Bounds Radius The radius the complete spawned object with all instances will occupy. This radius is used for checking if the spawn area is suitable for an object of this size and checking for collisions with previous results of this spawn rule. See the next two settings for more info.
Bounds Check Quality %Gaia will calculate an average fitness value for the area occupied by the bounds radius to determine if a certain location is a good place to spawn an object.

Imagine a large object (white cube) and a relative complex spawning mask, like so:

The cube is touching an area with good fitness with its lower left corner, but this position would probably still be a bad location for a spawn overall since the rest of the cube would be placed in an area with 0 fitness.

To prevent issues with placement like this, Gaia will calculate the average fitness below the object (the size being represented by the bounds radius) to determine how good the location would be for a spawn.

The "Bounds Check Quality %" determines how thoroughly Gaia checks the area inside the bounds radius: At 100% it will probe more points inside the bounds radius to calculate the average, which leads to more accurate results at the cost of higher spawn times.
Self Collision CheckIf this value is activated, Gaia will check during spawning if the object would collide with any other objects that were created while executing this spawn rule. If this value is not checked, you would need to set the location increment large enough to prevent self-collisions.

Note that this setting will only prevent collisions of objects of the same spawn rule while it is executing - it will not check for collisions with objects from other spawn rules. To prevent those, you would need to use a collision mask.
Scene Hierarchy
Spawner Target ModeDecides the parent of the spawned object in the scene hierarchy. Since creating Game Objects means they need to appear somewhere in the scene hierarchy, you can decide here where these objects should be put down. You can choose between two options:

  • Terrain - The objects will be childs of the respective terrain object they have been spawned on. You have the option of entering a name for the general object container. Per Default Gaia will collect all spawned Game Object in an object "Gaia Game Object Spawns" that is a child of the terrain.
  • Single Transform - Lets you enter a single transform where you want the Game Objects to be placed under. This can be any transform from the scene hierarchy.


Generally it is a good idea to leave the terrain option - in this way, all Game Objects are children of the terrain in the scene hierarchy and will be moved and deleted together with the parent terrain.

Terrain Spawn Target NameName of the object you want to group the game object spawns under when the "Terrain" target mode is selected (see above)
Spawn TargetReference to a transform under which you want to group the game object spawns under when the "Single Transform" target mode is selected (see above)
Visible in Scene HierarchyWhether you want the Game Objects to be visible in the scene hierarchy or not. Gaia can hide the spawned objects in the scene hierarchy for you. The objects in question will still be visible in the scene view, but you won't be able to select them by clicking on them in the scene view, and unity will not draw any Gizmos (like collider shapes) for them anymore. You can find out more about the hiding feature in this article.

In general you can leave this box checked, unless you find yourself accidentally selecting spawned objects in the scene view all the time, or you do not want to see colliders etc. of the objects being displayed when selecting the terrain.



Spawn Extensions

 

Please Note:  Spawn Extensions utilize the same settings as Game Objects - the difference between the two types is that instead of a Game Object being created in the scene, a function on the spawn extension script is being called. Instead of regular prefabs you maintain Spawn Extension prefabs where the Prefab needs to have a script on them that implements the ISpawnExtension interface.
Other than that, the settings for Spawn Extension function the same way as for Game Objects above - if you are interested how one of the settings works, please look up the section on Game Objects above.


Probe



The Probe Resource Type allows you to spawn Light and Reflection Probes in similar fashion like you would spawn a Game Object. Note there is also a way to spawn the Probes from the light baking tab in the Gaia Manager without using a spawner.


Besides the name, the available settings are vastly different between spawning Light and Reflection Probes. Reflection Probes have a couple of options that control the baking behavior, while Light Probes do not require any additional setting at all since the main purpose of the light probe is to collect lighting information at a given position during the light baking process.


The options for the Reflection Probes are:

Probe ModeWhat kind of probes should be spawned? 
  • Baked Probes will only be calculated once
  • Realtime Probes will be re-calculated periodically to display current reflections
  •  Custom Probes allow you to set your own reflection cubemap that was generated by other means
Refresh ModeAt which time the probe should be refreshed for realtime mode:
  • On Awake: Probe will be calculated on scene start
  • Every Frame: Probe will be updated constantly (expensive!)
  • Via Scripting: Probe will be updated from a script
  • Probe Manager: Probe will be updated via Gaia's Probe Manager System
Probe ResolutionThe resolution at which the cube maps of the probes will be rendered at. Higher equals a better reflection image quality, but worse for performance, especially when using realtime probes.
Compression The compression method used for the cubemap image of the probe
Render DistanceThe distance for the probe capture. Anything beyond this distance will not be part of the probe image.
Shadow DistanceThe distance at which shadows are being rendered when doing the probe capture.
Culling MaskWhich layers should be considered for rendering the probe capture.


Please Note: Most of these settings are not Gaia exclusive, but are rather the same settings you would find on a manually placed reflection probe. You can find out more about these probe settings in the Unity manual about Reflection Probes.