Model Editor Reference

The model editor can be used to modify some simple properties of a model. It does not let you edit the actual geometric data or animations, but it does let you modify some engine-specific properties such as animation segments and convex decomposition.

Below is a screenshot of the model editor:

The viewport has the same movement controls as the scene editor:

LMB + Move Up/DownMove camera forward/backward
LMB + Move Left/RightTurn camera left/right
RMB + MoveTurn camera
LMB + RMB + MovePan camera

To open a model in the editor, all you need to do is make sure the file exists in the game's data directory - the editor will automatically pick it up and list it in the asset explorer.

The engine will transparently convert the source model to it's own native format. This native model will have the same name and path as the source model, except that it will have the ".gtmodel" extension. For example, a source model called "default.dae" (a COLLADA file) will have an associated native model in the same directory called "default.dae.gtmodel". You will rarely need to concern yourself with .gtmodel files because the engine will handle everything in the background, but it is still important to know how properties are saved.

When changing properties in the model editor, you are actually editing the native .gtmodel file. The engine will maintain these properties even after modifying the source file. If the .gtmodel file is deleted, the properties will need to be re-set. Think of the .gtmodel file as metadata.

The right-side panel contains the properties that can be modified.

Meshes

A model is made up of a number of meshes. Each mesh is just a piece of geometry with a material and skinning information. Meshes are listed in the Meshes group box. To set the material of a mesh, just click the mesh in the mesh list and drag-and-drop a material file into the "Material" text box.

Every material has a set of publicly visible variables (uniform variables) that can be changed at any point. A model can define a set of default values that differ from those defined by the material itself. These will be displayed underneath the "Material" text box when a mesh is selected from the mesh list. What this system allows is for a game to have a small set of generic materials, with developers only needing to update some basic variables without having to dig into the material editor for every single model.

Bones

The bones of the model are listed in a tree-view under the Bones group box. Selecting a bone does not currently do anything, but it's planned for the future to actually show the bones in the viewport. The main purpose of this for the time being is to allow developers to easily see the name of bones so they can do things like attach a scene node to a bone, etc.

The Bones group box will only be shown if the model contains bones.

Animations

You can give a name to a range of animation key frames. Use the Animation Segments panel to create or delete these. Animation segments will be used when playing an animation from within the scripting or C++ environment. When an animation segment is played, use the playback controls at the bottom to stop playback.

The Animation Segments group box will only be shown if the model has an animation track.

The bottom panel with the playback controls is a work-in-progress animation timeline. Ignore this for now.

Convex Decomposition

The engine can do a convex decomposition (thanks to HACD) of the model. To do this, use the Convex Decomposition group box. Be aware that this can take a long time, so don't be alarmed if the editor seems to freeze for a long time.