Give Page Feedback

Getting Started Tutorial - World Setup

Here we highlight some of the most common settings you may want/need to change on the World component before running loading your scene for the first time. Please remember, for a detailed breakdown of the World take a look at the World Chapter.

World Chapter

Section Instructions

24) If you'd like an endless world, enable the Use Endless ... options for the axes you wish to be endless (General Settings Sub-Section).

25) Determine if you want to use a Fixed or Floating Origin based World, then configure the World Origin and World Origin Cell (Origin Settings Sub-Section).

26) If using a Floating Origin based World, explore and configure additional floating origin related settings (Origin Settings Sub-Section).

27) If using Terrain, navigate to the Groupings tab, then click on the # Grouping Name tab that corresponds with your Terrain, and then finally the Grouping Overrides tab. Enable Override Default World Activation Settings as well as Override Default World Deactivation Settings, make sure the Auto Activate/Deactivate Chunks When Adding/Removing Cells options are enabled, then set the Max Chunk Activations/Deactivations Per Frame values to 1.

This ensures only one Terrain game object is activated/deactivated per frame, which is usually a good idea. Any other Groupings you add will use the Default Activation/Deactivation settings, which are configured to activate/deactivate up to 10 objects per frame by default (feel free to change this), unless overwridden on a per Grouping or per LOD Group basis (Overridable Settings Sub-Section).

28) Assign the Streamable Grid you created in Step 3 to the Streamable Grid field found in the Groupings/1 Grouping Name/General Settings tab (Groupings Sub-Section).

General Settings

Return To Section Instructions

The Endless World Settings allow you to make one or more of the World's Axes endless. An endless axis will repeat in both the positive and negative direction, which simulates the effect of a spherical world.

You can find more detailed information in the Endless Or Fixed Section within the Worlds Chapter.

Endless Worlds

Origin Settings

Return To Section Instructions

The Origin Position is the location in the scene where the Origin Cell is placed. By default, the Origin Position of the World is taken from the Transform Position of the World Game Object. You can adjust the Transform Position to change this Origin Position, or you can disable the Use this Game Object's Position as World Origin Position option and specify an Origin Position manually.

Changing World Origin Position GIF

A value of (0,0,0) can usually be used, however in some situations you may wish to offset the Origin Position in the negative direction to make the Origin Cell or World centered over (0,0,0).

For example, when using a smaller Fixed World (i.e., a non-floating origin based World), in order to center the X Axis of the World over X = 0 when the Origin Column is set to 1, you can offset the X Origin Position by 1/2 the width of the World on the X Axis (i.e., the total width of all columns for any Streamable Grids being used by the World). So if your Streamable Grid has a total width of 1000, 1/2 of that value would be 500, which means you would set the X Origin Position to -500. Do the same for the other used Axes and the World will be centered perfectly over 0,0,0 (again, assuming all Origin Cell Indices are set to 1 - see below).

The Origin Cell is the World Cell from the Base Grouping whose position is fixed at the Origin Position. Usually it will equate to a Streamable Grid Cell, but this is not a requirement. Though manually inputting an Endless Grid Cell value is uncommon, such values can and do get used at runtime during automatic World re-centering (see Cell On Streamable Grid vs Cell On Endless Grid for more info on the difference between these two types of Cell Indices). All other World Cells (for all World Groupings) are placed relative to this Origin Cell. Changing the Origin Cell effectively moves the game environment, creating a floating origin system.

Changing World Origin Position GIF

For large worlds that will use a floating origin, you should set this value to the Streamable Grid Cell on your Base Grouping that you want your Player to start in. For smaller fixed worlds (i.e., that do not use a floating origin), you can use whatever value you wish (though using 1,1,1 or the mid Cell on your Base Streamable Grid is more common), however you will need to adjust your Origin Position to ensure the layout of your World is as you wish.

For Origin Change Strategy determines how Origin Cell changes (which effectively keep the World close to the Origin Position) are carried out. By default this option is set to Shift World and should only be changed to Duplicate World for testing purposes (as using a World Shifter is much more efficient).

Allow Active Grid Re-Centering is automatically enabled by default, and permits Active Grids synced to this World to monitor their Player's position in order to track if their Players cross one of the Reset Boundaries, which are constructed using the Re-Centering Boundary Distances From Origin values. If their Player does cross one of those boundaries, the Active Grid automatically triggers an Origin Cell Change on the World.

For a more detailed look at the Origin Settings and using a World with a floating origin, you can take a look at the Origin And Relativity Section within the Worlds Chapter.

World Origin In Detail

Additionally, the Geting Started Tutorial video has some visual elements that may make understanding these concepts a bit easier. Feel free to check out the portion from the video concerning these concepts using the button below:

Understanding Origin Settings

--Sample Scene Directions--
Using an Origin Position of 0,0,0 is ideal for this scene, as the terrain group is 2x2 and using 0,0,0 will allow the terrain group to fill the scene equally in every direction. As such, you can leave the Use this Game Object's Position as World Origin Position setting enabled.

You may have noticed, however, that the WorldAssets game object is actually placed at -1024 (x), 0 (y), -1024 (z) within the scene and not 0,0,0. Because of this, the first terrain in the group (Terrain1) is also at -1024, 0, -1024.

Since the Origin Cell is loaded at the Origin Position (and all other Cells loaded around it), this current setup would result in Terrain1 loading in at 0,0,0 rather than -1024,0,-1024. For a Floating Origin based World, this would not necessarily be problematic, but for a Fixed World it would cause the World to appear at a different position at runtime than it is at in the Editor.

To fix this, change the Origin Row and Column to 2.

The scene is configured as a Floating Origin based game world currently, although the Origin Cell will only be changed if the Player travels 7500 units from 0,0,0. One way to disable this and make it a fixed World is to disable the Allow Active Grid Re-Centering setting, which will effectively eliminate automatic re-centering (though you can still trigger re-centering manual through API calls).

Overridable Settings

Return To Section Instructions

At this time it should not be necessary to adjust any of the Overridable Settings (found in the tab of the same name), however in the future you most likely will wish to adjust one or more of these settings, so it's important to understand how overridable settings work in the context of the World component.

You can find more detailed information in the Overridable Settings Section within the Worlds Chapter.

Or if you enjoy visual aids, you can take a look at this helpful PDF to learn more:

Overridable Settings Overview

Groupings

Return To Section Instructions

The World contains a single World Grouping by default which serves as the Base Grouping. You can add more, but for now a single Grouping should suffice.

Each Grouping corresponds to a single Streamable Grid asset and is intended to represent a different aspect of your World (forests could be on one Grouping, Terrain on another, buildings on a third, and so on).

At this time, you should assign the Streamable Grid asset you created earlier to the Grouping (For the Sample Scene, use the Terrains Grid), to the Streamable Grid field, which can be found in the General Settings Window of World Grouping 1 Settings.

If you add more Groupings later, remember these two things:

1) Sub Groupings must always be compatible with the Base Grouping (axes type and total grid size).

Grouping Compatibility GIF

2) Groupings are loaded in order (Base Grouping, then Grouping 2, Grouping 3, and so on) and unloaded in reverse order. This allows you support dependencies between Groupings.

Grouping Load/Unload Order GIF

This allows you support dependencies between Groupings. For instance, in the GIF below the terrain might be on Grouping 1 and the Boulder on Grouping 2. Because Grouping 1 Cells are always loaded before Grouping 2 Cells and Grouping 2 Cells are unloaded before Grouping 1 Cells, we can guarantee that the boulder will never fall through the World!

Grouping Dependencies GIF

More information can be found in the World Groupings Section within the Worlds Chapter.

World Groupings

--Upgrade Note--
In the Terrain Slicing & Dynamic Loading Kit, there was not great way to separate Assets into discreet groups. This resulted in many users just placing everything as children of there base terrain.

While you are free to continue with this strategy, we implore you to consider splitting Assets up into separate World Groupings. Besides granting more performant loading (in a majority of cases), you also gain access to unique per Grouping settings, Cell Visual Transition Controllers (if you wish), World Grouping Listeners, and more. You can use the World Designer Tool to transfer these assets from the Terrain to separate Asset Chunks that can be used by the World Groupings.

Learn More About This World Designer Use

--Sample Scene Directions--
As stated in the scene notes, we encourage you to use four Groupings for this scene. Currently the World only has a single Grouping, which will be used for the Terrains. Go ahead and add three additional Groupings using the Add World Grouping button.

You should have already created four Streamable Grids to be used with these Groupings. If you haven't already, assign the Terrains Grid to Grouping 1, and then assign the Large Structures Grid to Grouping 2, the Plants Grid to Grouping 3, and the Small Objects Grid to Grouping 4.

When you assign each Streamable Grid, the Grouping's Name should automatically be set to the name of the Streamable Grid. If this does not happen, or if you wish to change the name, you can adjust the World Grouping Name as you wish.

One additional adjustment is needed to the Base Grouping (Grouping 1). Currently, the World is configured (via the Overridable Settings tab) to activate and deactivate up to 10 Asset Chunks in a single frame. While this should work well for Groupings 2-4, it could be problematic for Grouping 1, as activating Terrain can be a heavy operation.

To fix this, select Grouping 1 and then click on the Grouping Overrides sub-tab. Enable both the Override Default World Activation Settings and Override Default World Deactivation Settings, then change both Max Chunk Activations Per Frame and Max Chunk Deactivations Per Frame to 1. This will ensure that no more than 1 Terrain is activated or deactivated in a single frame.

Save the scene before proceeding.