Skip to content

Building Levels

Matthew LaRocca edited this page Sep 4, 2022 · 12 revisions

Levels are loaded as GLTF files with a specific structure. This instructs the pipeline how to process the level file.

A level is a collection of individual scenes or "chunks" of static data that may be loaded and unloaded individually. These chunks are defined by the scene's object hierarchy. Naturally a level must contain at least one chunk.

Simple level example

This text will reference a simple level built in blender to illustrate basic features of the level pipeline.
image

Setup in Blender

The level itself is represented by the root GLTF node and does not serve any particular purpose. Every child of the root node is treated as an individual scene and will result in a separate asset.

Consider the following hierarchy:
image

The processing of this level would result in 4 individual scenes:

  • Atrium
  • Firewall
  • Hallway
  • LavaPit

Individual Scene Definition

Each individual scene is defined by a collection of "category" nodes describing its contents which must be named in a particular way. Note for the category name, the node only needs to begin with the specified text. For example: Scene and Scene.001 will both be treated the same. This is get around the limitation of nodes not being able to share the same name.

Category name Description Required
Scene Contains all nodes which represent objects in the world. Yes
Colliders Contains custom collision meshes No

Consider an expanded view of the hierarchy above:
image

In examining the image we can see that each chunk contains a Scene node and some contain optional collider nodes.

Clone this wiki locally