Give Page Feedback

Scene Conversion Tutorial - Steps 11 To 15

--Sample Scene Directions--
Steps 11-17 will need to be carried out for each of the four World Groupings! We recommend starting with the Terrains, then processing the Large Structures, followed by the Plants, and finally the Small Objects.

You may have already done this, but if not, you should set the Grouping To Edit (via the Editing Controls Tab) to the one associated with the Streamable Grid you created during this tutorial (or alternatively, the one created during the Getting Started Tutorial).

Grouping To Edit

12) Identify LOD Groups

Identify the Cell Color Key area of the Editing Controls Tab (you may need to expand the World Designer Tool window vertically to make it more visible).

Cell Color Key

For each LOD Group you have defined on your Streamable Grid, you will see a matching area in the Key (Loaded LOD 1, Loaded LOD 2, etc.).

Operation Buttons

If you see a button that says Cannot Edit: Why? it means the LOD Group is either misconfigured or incompatible with the World Designer Tool. To see why, you can click this button, which will print the details to the Console Log.

Otherwise, you will see five small buttons next to each LOD, which are:

L*: Use this to Load the Asset Chunks for the LOD, for all selected Streamable Cells.

U*: Use this to unload any Asset Chunks (only for the LOD), for all selected Streamable Cells.

A*: Assigns game objects in the scene to the LOD Group (selected Cells do not matter).

T*: Transfers all child objects belonging to Asset Chunks for the LOD Group (and only selected Cells) to a target World Grouping and LOD Group.

E*: Evaluates Asset Chunks belonging to this LOD Group (and selected Cells).

This tutorial is only focused on the Assignment Operation. If you are interested in any of the other operations, please take a look at the World Designer Tool Chapter, which has information on Loading & Unloading Streamable Assets, Transfer Operations, and Evaluation Operations

13) Set Max Children/Chunk

You will see this option underneath the Operation Buttons, but only if an LOD Group is using Multi-Chunking.

Max Children Per Chunk Option

This field tells the Tool the maximum number of child objects to place under each Asset Chunk for the LOD Group, whenever an Evaluation Operation is run (note, in addition to manually triggering Evaluation Operations using the E* button, this operation is automatically performed during Assignment, Transfer, and Destroy Operations!).

When using Multi-Chunking, this field is very important, as it will ultimately determine how many Asset Chunks will be created for each Streamable Cell. The number of Asset Chunks you use should always be balanced. While the single frame performance cost of activating/deactivating and loading/unloading Asset Chunks can be reduced by using more Asset Chunks, more Asset Chunks can lead to more game objects being in the scene (which can increase RAM usage and CPU processing in some cases), longer Advanced Operation completion times, and longer Player Builds.

To start, we recommend aiming for a value that will result in 1-5 Asset Chunks being created per Streamable Cell, though it is normal for some parts of the game world to be denser, which might lead to more Asset Chunks for some Cells.

--Sample Scene Directions--
We have not enabled Multi-Chunking for any of the Streamable Grids created, so you will not see this setting for any of the Groupings.

14) Create Asset Creators

Asset Creators handle the automatic creation of Asset Chunks. SAM includes a Default Asset Creator class that will work for a majority of users, however you are also free to create custom Asset Creators if needed.

Each Default Asset Creator asset can only output Assets to a single folder, so typically you will create a unique Asset Creator for every LOD Group, at least if you want to keep things more organized (you are also free to use a single Asset Creator and just output everything to one folder).

Regardless of whether you create one Asset Creator or multiple Asset Creators, you must assign each LOD Group an Asset Creator. While this can be tedious, allowing each LOD Group to have its own unique Asset Creator offers the maximum flexibility possible. Once assigned, these Asset Creators are saved and should never need to be re-assigned (unless you destroy the Asset Creator asset or change the World Designer Data used by the World).

Asset Creator Option

To create a Default Asset Creator, right click the folder where you want it to be placed and choose Create -> Deep Space Labs -> SAM -> Default Asset Creator.

Always remember that the type of assets the Creator creates should match the Chunk Streamer in use by each LOD Group. For instance, if an LOD Group is using a Prefab Chunk Streamer, the Asset Creator for the LOD Group should generate prefabs at the very least. The generated assets also need to be loadable by this Chunk Streamer. For instance, if a Prefab Chunk Streamer is expecting prefabs to be in a folder called Resources/VegetationPrefabs, your Asset Creator should be configured to generate the prefab assets in that folder.

If you need additional help configuring your Default Asset Creator, please take a look at the Default Asset Creator Section within the Scriptable Assets Chapter.

We suggest giving each Asset Creator asset a unique name, to help differentiate it with other Asset Creators. After configuring the Asset Creator(s) assign it/them to the LOD Groups you plan on assigning game objects to.

--Sample Scene Directions--
To make things simpler, we suggest creating just a single Default Asset Creator for use with all four Groupings. Since the Sample Scene is configured to use a Chunk Streamer, you can configure this Asset Creator's Asset Creation Mode to use either the Prefabs_And_Scenes (with Primary Assets set to Scenes) option or the Only_Scenes option (we recommend the latter option for simplicities sake).

Whichever option you choose, be sure to set the Save Folder's (the easiest way is to click the folder on the left half of the Project Hierarchy and then use the Copy Selected Folder button), and be sure to leave the Add To Build Settings option enabled.

After creating the Default Asset Creator, assign it to each Grouping's Asset Creator field.

15) Understand the Scene Conversion Process

The Scene Conversion process uses the Assignment Operation (A* button) to assign game objects in the scene to Asset Chunks belonging to a particular LOD Group on a particular Streamable Grid, according to which Streamable Cells those objects fall in (based on their world position).

The Streamable Grid the objects are assigned to always belongs to the current Grouping To Edit, while the LOD Group is always the one who's A* button was pressed.

During each Assignment Operation, Asset Chunks may be automatically created by assigned Asset Creators and destroyed by the Asset Manager associated with the LOD Group's Chunk Streamer. Additionally, during the operation the Grouping's underlying Streamable Grid asset may be modified to enable and disable Cells, or to change the number of Chunks used by a Cell.

Developers working in a team based workflow that uses a version control system should keep this in mind, as they may need to check out any Streamable Grid assets that may be modified during the Assignment Operation.