Give Page Feedback

Loading Blueprints - Non Uniform Custom Shape Type

The Non Uniform Custom Shape Type is an advanced type that functions similar to the Uniform Custom Shape Type in terms of the Loading Pattern being used. The difference between the two is that with Non Uniform Patterns, you have the ability to add unique Custom Shape Loading Patterns on a per Streamable Grid Cell basis that are loadable when the Player is standing on those Cells. This allows you to load different content for each Cell if you wish, which may be beneficial to your games performance.

For instance, imagine a game world where a specific Cell is completely blocked in one direction by a mountain or other structure, so that the Player cannot see any other Cells in that direction. Loading the Cells that cannot be seen would be a waste of resources. With a Uniform Custom Shape Blueprint, this cannot be helped, but with a Non Uniform Custom Shape Blueprint, you can create a unique loading pattern that does not include the blocked Cells.

The Default Pattern

This pattern serves as the default loading pattern for any Cells that do not have a unique loading pattern. Having a default pattern is ideal because it means you do not need to define a unique pattern for every Cell on your Streamable Grid.

Instead, you can define unique Patterns for only those Cells that truly need them, and let the rest of the Cells utilize the Default Pattern. Active Grids automatically detect which Cells have unique Patterns and use them when the player is standing in those Cells.

When you add Unique Loading Patterns, by default they will be configured to match the Default Loading Pattern. Once you add a unique Pattern, however, it is forever separated from the Default Loading Pattern. That is to say, changes the Default Loading Pattern will not effect any existing Unique Loading Patterns, only new ones!

Changing The Pattern

Non Uniform Patterns operate on a per Cell basis. Whichever Cell the Player is standing in determines the Loading Pattern that will be used. Whenever the Player moves from one Cell to another, the entire Loading Pattern of Cells associated with the Cell they were previously in are sent to the World for unloading, while the entire Loading Pattern of Cells associated with the new Cell they are in are sent to the World for loading.

Note, however, that there is usually a lot of crossover between the Cells to unload and the Cells to load (which effectively cancels them out), so the end result is that only a few old Cells are unloaded and a few new Cells loaded.

The Inner Area

Non Uniform Ring Blueprints are only able to utilize a single Inner Area Cell, which will always be the Cell that the Player is standing in. This is necessary to ensure that the correct Loading Pattern is loaded for each Cell.

This does mean that Pattern Churn is more likely to occur, so you will need to weigh the benefits of having unique per Cell Loading Patterns against the negative effects of pattern churn.

Physical Surfaces And Crossing The Inner Area Boundary

When the Blueprint is being used with Assets that interact with the Physics system, especially walkable Assets like Terrain or other ground meshes, it's important to ensure that the Player can cross the boundary of the Inner Area properly.

The best way to do this is to make sure that the Inner Area is surrounded by at least one ring of Cells that use the same LOD. This ensures that those Cells do not change LOD as the Player crosses into them.

If you do not do this, it's possible that the Player will walk into a Cell while it is transitioning between LODs, which may cause the Player to fall through the world or enter geometry that it shouldn't.

This is not a concern with Assets that do not interact with the Physics system.

Adding LODs

By default Blueprints start with a single LOD. You can add more by navigating to the Cell Pattern Data tab and pressing the Add LOD Group button.

When you add an LOD, that LOD's Ring Thickness will automatically be set to 1. To increase or decrease this value, you can use the corresponding field in the Cell Pattern Data tab, or use the Pattern Editor slider controls. Note, however, if the thickness of an LOD's Rings is set to 0, no slider will appear in the Pattern Editor. You must change the thickness to some value other than 0 for the Slider to reappear.

Each Unique Loading Pattern and the Default Loading Pattern may utilize a different number of LODs, which allows for maximum flexibility. When you first add a Unique Loading Pattern for a Cell, the unique Pattern starts out the same as the Default Loading Pattern. As such, if you are planning on using a set number of LODs for all Loading Patterns, you should add the LODs to the Default Loading Pattern first, before adding Unique Loading Patterns.

Removing LODs

An LOD can only be removed if it is the last LOD in the Blueprint and not LOD 1. This is because removing LODs that aren't the last one would result in LODs that come after being promoted, since it's not possible to have a missing LOD.

You can however set any LOD's Ring thickness to 0, which will cause no Cells to be loaded for that LOD when using this Blueprint.

If an LOD can be removed, you will see an X button next to the LOD in the Cell Pattern Color Key (found in the Cell Pattern Data Window). Press the X button to remove the LOD.

When an LOD is removed, it is only removed for the Default Loading Pattern or the Unique Loading Pattern that you are currently editing.

Cell Indexes

When editing the Default Loading Pattern, the Cell Indexes (R2 | C4, R1 | C1 for example) do not actually correspond to World Cells from a World Grouping, since the Default Loading Pattern is intended to be used universally across all Cells that do not have a unique Loading Pattern. However, you can think of the Indexes as representing the Cells that would be loaded if the Key Cell (Cell Player is standing in) were Streamable Grid Cell Row 1, Column 1, Layer 1.

When viewing the Unique Pattern Selector Page, the indexes shown represent Streamable Grid Cell indexes.

When viewing a Unique Loading Pattern, the indexes represent the exact World Cells that will be loaded for the given Cell. A white rectangle or cube (for 3D Blueprints) is shown, which represents the normal region of Cells on the Streamable Grid. Cells within the rectangle/cube are always loaded, however Cells outside of the white rectangle/cube will only be loaded if the axes they lie on are set to repeat. For example, if a Cell sits outside the left edge of the rectangle/cube (but within all other edges), it will only be loaded if the Columns are set to repeat (on whatever World the Blueprint is used with).

By default these indices represent Endless Grid Indices, however you can change them to show Streamable Grid Indices via the View Controls window. You can also hide the Cell Indexes, change their placement, or make them bigger/smaller using the View Controls window.

We do recommend using the Draw Endless Grid Indices option, as it better represents the Pattern and shows you the Cells that would be loaded regardless of the Streamable Grid size the Blueprint is used with.

This is a special window in the upper center portion of the Loading Blueprint Editor that can be used to navigate between the Default Loading Pattern, Unique Loading Patterns, and the Unique Pattern Selector Page (which is where you will add Unique Patterns). It is also intended to give you an idea of whether you are currently editing the Default Loading Pattern, a Unique Loading Pattern, or are on the Unique Pattern Selector Page, as it easy to lose track of this in the course of using the Loading Blueprint Editor.

The Pattern Selector Page

The Pattern Selector Page gives you an easy way to see which Streamable Grid Cells have unique Loading Patterns and which do not, as well as a way to add and remove unique Loading Patterns. By default, Cells with Unique Patterns are colored blue while Cells without Unique Patterns are colored red, however these default colors can be changed via the GlobalEditorSettings asset (found in the Assets/Editor Default Resources/Deep Space Labs/SAM/ScriptableAssets folder), using the Color Of Enabled Cells and Color Of Disabled Cells options.

The Unique Pattern Selector Page contains a number of Cells which depends on the Streamable Grid Rows/Columns/Layers you have configured for the Blueprint. When you change the number of Rows/Columns/Layers, the Viewable Area is automatically adjusted to show the correct number of Cells, however the maximum number of Cells it will automatically show per Axis is 8. This is intended to stop it from automatically showing a large number of Cells that might cause the editor to freeze. If you want to show more Cells than this per axis, you can manually change the Viewable Area Start and/or End values for Rows/Columns/Layers.

Normally, you would want to configure the number of Streamable Grid Rows/Columns/Layers to match the actual values of whatever Streamable Grid you plan on using this Blueprint with. This is not a requirement, however. You can configure the Blueprint to use more or less axes than the Streamable Grid it is used with. Any Cells on the Blueprint that are not on the Streamable Grid will simply be ignored, and any Cells on the Streamable Grid that are not on the Blueprint will use the Default Loading Pattern.

--Adding/Editing Unique Patterns--
To add a new unique Loading Pattern or to edit an existing unique Pattern, you simply need to left click on the Cell in the Unique Pattern Selector Page. When no unique pattern exists for that Cell, a new one is created automatically from the Default Loading Pattern. In either case (it is a new Pattern or an existing one), the Pattern is automatically opened for editing. If you return to the Unique Pattern Selector Page, you will notice that the Cell you created the new Pattern for has changed colors.

--Removing Unique Patterns--
Any unique Loading Pattern you have added can be easily removed by holding the control button and left clicking the Cell. You will notice that when you hold the control button, the outlien of the cell changes to pink (or whatever color you have configured for the Color Of Subtractive Selection option in the GlobalEditorSettings asset).

You can also removed all Unique Loading Patterns in the entire Blueprint using the Remove All Unique Patterns button, which can be found in the Main Controls Window while the Unique Pattern Selector Page is open.

In addition, if the Blueprint you are editing is 3D, you can remove all Unique Loading Patterns for the current Layer by pressing the Remove Unique Patterns on Layer X button, where X corresponds to the Layer number. For both of these options, a warning dialog is displayed, since a lot of data can be easily removed by accident when using them.

Manipulating Cells

In order to manipulate Cells on the Default Loading Pattern or a Unique Loading Pattern you must first select those Cells.

You can select a single Cell (by left clicking it) or select multiple Cells (by left clicking, holding down the left click, and dragging the mouse - release to lock in the selection). This operation will clear any previously selected Cells.

If you already have one or more Cells selected, you can add more Cells to the selection by holding the Shift button while performing those two actions. In the same vein, holding down the Control button allows you to remove Cells from a selection. Use the following colors to identify which type of operation you are performing:

New Selection: Selects new Cells so that Cells already selected are cleared.

Additive Selection: Adds the selected Cells to the Cells already selected.

Subtractive Selection: Removes the selected Cells from the Cells already selected.

Once you have released the left mouse button, the operation will be confirmed and the new Cells, added Cells, or remaining Cells will have a white outline. You can clear the Selected Cells by clicking anywhere in the Pattern Editor (not over the Controls Windows).

You can change the default White color of Cells that have been selected, or any of the operation colors described above (plus many more colors) via the GlobalEditorSettings asset, which is found in the Assets/Editor Default Resources/Deep Space Labs/SAM/ScriptableAssets folder.

Enabling Cells

Once you have selected some Cells, you can Enable them by setting them to a specific LOD. While you can do this using the Set button found in the Cell Pattern Data window and within the Cell Pattern Color Key area, it is usually much easier to use the number keys on your keyboard to do so instead.

By default, the 1-9 keys directly correspond to LODs 1-9, while the 0 key corresponds to LOD 10. You can change this default behavior by modifying the LOD Paint Offset value, which sits just below the Add LOD Group button.

The Offset value you specify is added to the number key you press (with 0 representing 10) in order to form the final LOD values that the number keys correspond to. For example, if you set the LOD Paint Offset to 10, 10 is added to each number key, so that pressing Key 1 sets the selected Cells to LOD 11, while pressing key 0 sets the Cells to LOD 20. This is very useful when working with larger LODs.

Of course, pressing a number key only works if the LOD corresponding to that key exists in the Blueprint, so make sure to add the LOD first!

Disabling Cells

You can Disable selected Cells either by using the Disable Selected Cells button or by pressing the D Key on your keyboard. By default, Disabled Cells appear red in the Pattern Editor, although you can change this via the GlobalEditorSettings asset.

You can also disable all Cells that are currently part of a specific LOD by pressing the D Button next to the LOD in the Cell Pattern Color Key. Be careful when using this option, however, as it will disable all Cells on that LOD even if currently they are not viewable.

The Viewable Area

Drawing Cells in the Pattern Editor is not a free operation. For very large patterns with 100's or even 1000's of Cells, editor performance would drop to a snail's pace if we drew every Cell. At the same time, when using a Blueprint where you can manually select Cells, we want to give you a large canvas of Cells to choose from. The Viewable Area is an imperfect solution to this problem and can be found in the View Controls Window via the Viewable Area tab.

It defines the region of Cells that are shown in the Pattern Editor and that are selectable by you and which can be manipulated. You can change its size to as large of a value as will work for your computer and you can change the region of Cells that are shown by modifying the Cell Start and End Values. The <, <<, >, and >> buttons allow you to shift the Viewable Area by a single Cell or by the entire size of the Viewable Area.

Do not worry about navigating away from already Enabled Cells. Once a Cell is Enabled, it remains Enabled even if it is not currently being shown in the Viewable Area!

To help you in identifying what region of Cells the Viewable Area corresponds to, you will notice that the first, middle, and last row/column/layer of Cells is marked. These values represent the indices of the those Cells on a theoretical Endless Grid, where the Inner Area Cell is Cell Row 1, Column 1, Layer 1.