Setting Gaia up to use your own assets is general pretty easy.
Gaia treats you assets as 'Resources' that can be 'spawned; into your environment.
The types of resources that Gaia understands are:
- Terrain Textures
- Terrain Details (Grass)
- Terrain Trees
- Individual Prefabs
- Collections of Prefabs that will be laid out in the pattern you specify (POI - Points of Interest)
In order for Gaia to know about the asset it needs to be described in a Gaia Resources file. The resources file contains information about the prefabs physical attributes, and also information about how and where it can be spawned (Spawn Criteria).
You can learn more about resources by reading the Gaia documentation, and by watching this video tutorial :
The fastest way to set your resources file up is to duplicate the default resources file and update it with new resources, however you can also create them from scratch:
- Select and duplicate (Ctrl + D) your GaiaResources file (you will find it in the Gaia / Data directory).
- Rename your new resources file to something meaningful e.g. MarsResources
- Open up the Gaia Manager window and select your new resources file (this will ensure that it is used for all future operations).
- Select Create Terrain & Show Stamper - this will create a new terrain and pre-populate it with those resources.
- Update the textures, grasses and trees in the new terrain and configure them however you want.
- Update these back into your new resources file by selecting it and clicking 'Get Resources From Terrain'.
- Create a new scene and making sure that your new resources file is selected, create a new terrain as in step 4.
- All new terrains created with the new resources file will retain the new settings.
To set up prefab based resources (Game Object Prototypes):
- Following on from the example above, delete the old ones by setting the Size of your Game Object Prototypes list to zero in your resources file.
- To add an individual prefab (or speedtree), drag and drop it onto the "Drop Game Objects / Prefabs here box.
- To layout and add groups of prefabs (such as villages, graveyards etc):
- Create a plane and set its height to -0.01 (y) value
- Layout your prefabs on this plane in the pattern you like
- Select the prefabs as a group and drag and drop them as in step 2
- Check this video for an example : http://www.procedural-worlds.com/gaia/tutorials/spawners-gameobject-poi/
- Make sure you set your instance Y offsets so that they are embedded or raised from the ground as Gaia will sample the ground for every instance spawned to ensure that it is placed at the right height.
- Also make sure that Rotate To Slope is checked appropriately - if not selected then the instance will be spawned pointing straight up (eg. trees, houses), however if it is selected then the instance will be spawned so that it conforms to the slope.
To determine where resources can be spawned in your terrain Gaia uses "Spawn Criteria". These criteria are assessed at the point where the spawn is being considered to determine if it is a 'fit' location for spawning. The idea is that each resource can determine where it is most likely to be found.
You can use your visualiser to visually see this and modify it : http://www.procedural-worlds.com/gaia/tutorials/resources-visualiser-and-fitness/
NOTE : In Unity 2017.x Unity broke how the curves are used, so while you now need to select the resource in the visualiser, you can only change it in the resource file itself. In Gaia 2 I will redo how this works.
To learn more about resources and how to use Gaia :