Each World Grouping serves as the in game representation of a single Streamable Grid asset, with some additional settings needed to bring the Streamable Asset Chunks from the Streamable Grid into the game world.
Generally speaking, each Grouping will represent an Asset Chunk Group of related assets. You may have a Grouping that brings forest assets into the game, and another that brings smaller detail objects like rocks and plants.
Groupings (and the Streamable Grids they represent) can be organized in whichever way you wish, though typically it's best to organize them so that similarly sized assets are part of the same Streamable Grid and Grouping.
For example, it does not make much sense to place a large mountain asset in the same grouping as small rock assets. The mountain would need to be shown at a much farther distance than the rocks, but if you place them in the same grouping, whenever the mountain asset is needed, the rock assets would be loaded along with it, which is highly inefficient.
Some of the most common reasons for putting assets together on the same Streamable Grid/Grouping include:
1) The Assets are of a similar size and thus would need to be shown at around the same distance to the player.
2) The Assets are transitioned visually in the same way (and thus can use the same Cell Visual Transition Controller, of which only 1 can be assigned for each Grouping).
3) The Assets require the same World Grouping Listeners. Listeners are assigned on a per Grouping basis, so it's important that all assets on the same grouping can be used by any assigned Listeners.
4) The Assets use the same number of LODs. All World Cells on a grouping must be capable of loading the same LODs. If you have assets that have 2 LODs and other assets that have more or less, for example, they will need to be represented by different Streamable Grids and World Groupings.
5) The Assets use the same Extra Data (found on Streamable Grids).
6) Other settings found on the World work for each Asset.
First and foremost, however, is that all Asset Chunks must be associated with the same Streamable Grid in order to be a part of the same World Grouping, since a World Grouping can only be linked to a single Streamable Grid!
Two types of World Groupings exist within the Streamable Assets Manager:
1) The Base Grouping (Grouping 1) which serves as the foundation of your World.
2) Sub Groupings (Groupings 2+), which supplement the World with all the things that bring it to life.
The Base Grouping you choose will limit which Sub Groupings you can use, as all Sub Groupings must be compatible with the Base Grouping. The following restrictions should give you an idea of how this works:
1) If the Base World Grouping's Streamable Grid has an Axes Type of Three Dimensional, then all Sub World Groupings must also use Streamable Grid's with an Axes Type of Three Dimensional.
2) If the Base World Grouping's Streamable Grid has an Axes Type of Two Dimensional Using XY Axes, then all Sub World Groupings must also use Streamable Grid's with an Axes Type of Two Dimensional Using XY Axes.
3) If the Base World Grouping's Streamable Grid has an Axes Type of Two Dimensional Using XZ Axes, then all Sub World Groupings can either use a Streamable Grid with an Axes Type of Two Dimensional Using XZ Axes or Three Dimensional.
4) The size of each Sub World Grouping's Streamable Grid must match the size of the Base World Groupings Streamable Grid. That is to say, the total width (added width of all Columns) and the total length (added length of all Rows) of each Streamable Grid must be equal.
5) The total height (added height of all Layers) must only be equal when both the Sub World Grouping and Base World Grouping are using Streamable Grids with the 3D Axes Type.
--Special Note--
The width/length/height of individual Columns/Rows/Layers do not need to be the same between a Base Grouping and Sub Grouping. It is only the total width, length, and (sometimes) height that have to be equal!
While Sub Groupings are unrelated to each other, you may wish to factor in the load and unload order of Groupings when choosing the order of Sub Groupings.
When loading World Cells, World Cells are always loaded on the Base Grouping first, followed by Grouping 2, Grouping 3, and so on. When unloading World Cells, the last Grouping is unloaded first, followed by the next one below it, and so on until finally the Base Grouping is unloaded.
This allows you to layer your World Groupings so that if a World Grouping B has a dependency on World Grouping A, you can place World Grouping A before B so that it loads first, and so that B is unloaded before A.
For example, perhaps World Grouping A contains table assets, while Grouping B contains food, plates, and other items that will be placed on the tables. If the assets from B are affected by physics, the table would need to be placed before adding them to the scene (so that they do not fall), and they would need to be removed from the scene before removing the tables. This can be achieved by simply making Grouping A come before Grouping B in the World's Grouping List.
You can change the order of the World Groupings at any time using the Move World Grouping Left and Move World Grouping Right buttons, found within the Groupings Window on the World Inspector.
You can also easily remove any World Grouping but the Base Grouping, using the Remove World Grouping X button. If you wish to remove the Base Grouping, you will need to ensure there are at least two Groupings on the World and then change the order of the Groupings so that the Grouping you wish to remove is no longer the Base Grouping. This restriction is in place to ensure that there is always at least one Grouping on the World.
There are two types of optional Components that can be assigned to World Groupings:
1) The Cell Visual Transition Controller - You can assign 1 of these to each World Grouping. This component allows you to control exactly how the Asset Chunks that belong to World Cells are transitioned into the scene, out of the scene, and from one LOD to another.
For example, you could modify the transparency over time or adjust the position of the Asset Chunks. While there are a few default Controllers included with SAM, it is highly likely you will wish to create a custom Controller for custom effects. Use the button below to learn more.
2) World Grouping Listeners - You can assign 1 or more of these to hook into the Grouping in order to respond to different World Cell related events. Listeners are a powerful tool that allow you to implement a host of advanced functionality. You can learn more about them using the button below.