Give Page Feedback

Getting Started Tutorial - LOD Groups

A Streamable Grid represents a collection of Streamable Cells, however the Asset Chunks associated with those Cells need not be tied to a single Asset Chunk Group. Enter LOD Groups.

LOD stands for Level of Detail. You may be familiar with Unity's built in LOD system, where you have a single Game Object with an LOD Group component, and 2 or more child Game Objects representing the same 'object' at different quality levels.

SAM's LOD system is an alternative approach for introducing different quality assets representing the same objects, and can either be used as a replacement of Unity's LOD system or as a compliment to it.

For a full breakdown of our LOD System as well as how it differs from Unity's built in system, take a look at the Introduction To LODs Section from the Streamable Grids Chapter!

Section Instructions

11) Identify your first Asset Chunk Group (Asset Chunk Groups Sub-Section).

12) Set the Group Name for LOD Group 1 (Asset Chunk Group Naming Sub-Section).

13) Determine if a Naming Convention asset is needed. To do this you will likely need to read the Sections indicated in the Asset Chunk Group Naming Sub-Section.

14) Configure additional LOD Group 1 Settings (Additional Settings Sub-Section).

15) Determine if Multi-Chunking is needed and if it is, enable it (Multi-Chunking Sub-Section).

Asset Chunk Groups

Return To Section Instructions

An Asset Chunk Group is simply a group of related Asset Chunks (which will usually be in the form of prefabs or scenes) in which all assets follow the same naming convention (using a common Group Name and referencing the Streamable Grid Cell each Chunk is associated with). If you have sliced a Terrain using the Terra Slicer tool, the resulting slices would be considered an Asset Chunk Group.

Valid & Invalid Asset Chunk Groups JPG

A Streamable Grid can utilize 1 or more Asset Chunk Groups, with each Group represented by a different LOD Group. For now, however, it is only necessary to configure a single LOD Group.

If you already have an Asset Chunk Group created (from Terra Slicer or a third party asset such as Gaia), then you are ready to proceed!

If you do not have such a group created already, don't fear! The World Designer tool can aid you in building up a group of Asset Chunks that you can use (but more on this later). For now, you should follow this tutorial and think in terms of the eventual assets that you will create.

--Sample Scene Directions--
The terrains are currently very close to being able to serve as an Asset Chunk Group, however we have purposely configured their names to not be able to function as an Asset Chunk Group. While you could just change their names and make them into prefabs to make them into an Asset Chunk Group, we will instead be using the World Designer Tool (in the Scene Conversion Tutorial) to package them into Asset Chunks in order to form the Asset Chunk Group.

The other assets (Large Structures, Plants, and Small Objects) need more work to make them into Asset Chunk Groups, however that work will be performed by the World Designer Tool as well (in the Scene Conversion Tutorial).

--MicroVerse Directions--
If we were to convert the terrains in the 2x2 Demo Scene to prefabs or individual scenes, the group would almost be in Asset Chunk Group format. Unfortunately, however, MicroVerse relies on a coordinate based system for terrain naming that is incompatible with SAM. Don't be alarmed! We will be converting these terrains, as well as the MicroVerse Hierarchy (minus the terrain) to a SAM compatible Asset Chunk Group in the Scene Conversion Tutorial. For now, proceed with this tutorial without worry.

Asset Chunk Group Naming

Return To Section Instructions

At this time, please navigate to the LOD Groups tab on your Streamable Grid and ensure LOD Group 1 is selected and that its Primary Settings sub-tab is open.

Every Asset Chunk within the same LOD Group needs to follow the same format with their naming in order to be successfully loaded by the Streamable Assets Manager.

This requirement allows us to reduce memory by eliminating the need to store every Asset Chunks name, as we can instead use some programming logic to build the names of the Asset Chunks at runtime.

The Group Name field is the common name that all Asset Chunks in the Group share. For instance, if you have prefabs or scenes which are named Slice_1_1, Slice_2_2, etc. Slice would be the Group Name. Please enter this Group name in the Group Name field now.

Keep in mind that the Group Name field must be unique for EVERY LOD Group used by SAM (across all Streamable Grids). To accomplish this effectively, we recommend using a name that is unique to the asset types and Zone/region the asset chunk group is meant to represent (DO use names from your game lore if available and applicable!). Including LOD1, LOD2, etc. in the name is also recommended if using multiple LOD Groups on a single Streamable Grid, however note that if your asset chunk group already exists and does not include this, you shouldn't include it.

Group Name Examples JPG

Note that if you don't currently have an Asset Chunk Group for this LOD Group and plan on using the World Designer Tool to create it later (as will be done with the Sample Scene and MicroVerse Demo Scene, you can use any Group Name you wish (though again, use a name that you associate with the type of assets that will be used by the LOD Group, as well as the Zone/region the assets will be used with. If you think you will need multiple LOD Groups for the Streamable Grid, consider adding LOD1 to the name or something similar to denote the LOD number).

In order to programatically construct the Asset Chunk names at runtime, the Naming Convention is used.

Naming Convention Field

If your names are in the default format (common when using Terra Slicer), or you are going to use the World Designer Tool to create the Asset Chunk Group later, you can leave this field blank. The default format is GroupName_Row#_Column# (for 2D Groups) or GroupName_Layer#_Row#_Column# (for 3D Groups).

If your Assets are not in this default format, you will need to use a custom Naming Convention asset. More information can be found in the LOD Group Naming within the Streamable Grids Chapter and the Naming Convention Section within the Scriptable Assets Chapter.

--Sample Scene Directions--
Since we do not have any Asset Chunks created yet, the we have some flexibility what Group Name to use. Even though we don't have a dedicated Zone for the sample scene, we can use Demo in the name to remember that these assets are associated with the sample scene demo. We should also include a name that references the type of content (Terrain, Plants, etc.), for a final Group Name like Demo_Plants or Demo_Terrain

--MicroVerse Directions--
If using your own scene, think about the zone your terrains/ground meshes will be used with. If the Zone has a specific name in your lore, use that in combination with a content identifier (Terrain, GroundMeshes, MVHierarchy, etc.). For example, if the terrain will be used in the Starting Island zone, you can use Starting Island Terrain as the Group Name for the terrains, and Starting Island MV Hierarchy as the Group Name for the MicroVerse hierarchy.

If using the 2x2 Demo Scene, feel free to use 2x2Demo or MVDemo in the Group Names, as well as a content type identifer.

--A Note On Addressables--
If using Addressables, Windows has a hard limit on the length of file names that comes into play when generating the Asset Bundles. For this reason, we recommend using as short of a Group Name as you can get a way with while still being descriptive enough to differentiate the Asset Chunk Group from other Asset Chunk Groups.

Additional Settings

Return To Section Instructions

The LOD Group contains some additional settings that you should take a look at now. Hover over the Settings Labels that have an asterisk (*) in their names to see more information about each of these settings. For now, we recommend using the following settings:

1) Chunk Type - Either Unity Terrain or Non Terrain Game Object (depending on whether your Asset Chunks are Unity Terrain).

2) Use Single Chunk Set For All Cells - Disabled

3) Use Positional Data (if toggle is shown) - Enabled

4) Visual State Of Stored Assets When Active - Visible

5) Root State - Deactivated

6) Chunk Offsets - Leave all at 0.

Unsure What These Settings Are?

--Sample Scene Directions--
For the Sample Scene, the Terrains Grid should use a Chunk Type of Unity Terrain and the other Grids the Non Terrain Game Object Chunk Type. All other settings can remain as is.

--MicroVerse Directions--
Use the Unity Terrain Chunk Type for the terrain LOD Group, unless you are using a custom scene in which your terrains are not made up of Unity Terrains, in which you should use the Non Terrain Game Object type. For the MicroVerse hierarchy LOD Group, use the Non Terrain Game Object Chunk Type. All other settings can remain as is.

Multi-Chunking

Return To Section Instructions

Multi-Chunking is a powerful technique that allows you to spread the game objects of a Cell across multiple Asset Chunks, which allows for more performant loading by reducing the number of assets that need to be loaded in a single load operation (it can also help with limiting the amount of game objects that are activated/deactivated in a single frame when using SAM's auto activation/deactivation functionality).

Multi-Chunking is configured on a per LOD Group basis, since different quality versions of assets may require differing numbers of Asset Chunks.

For now, it's unlikely that you need to use this powerful feature with your starting LOD Group, however if you feel that I'm wrong or just wish to learn more about this awesome feature, take a look at the Multi Chunking Section from the Streamable Grids Chapter.

Yes, Tell Me More!

--Sample Scene Directions--
Multi-Chunking cannot be used with Terrain. For the other assets, it's up to you, however at this time I would recommend keeping Multi-Chunking disabled to make things easier.

--MicroVerse Directions--
Since Multi-Chunking cannot be used with Terrain, you will not see the option to enable Multi-Chunking. While it can be enabled for the MicroVerse Hierarchy, doing so would not work right since the hierarchy is intended to exist under a single root object.

Congrats!

Wow, you've just setup your first Streamable Grid, one of the most important assets in the Streamable Assets Manager. Awesome! Are you ready to start using that Grid in an actual Game World? Then let's go!