Model Import
Bring your own models (glTF or FBX) into a mod as creatures, props and weapons - the import options, what the importer does with your file, using imported models, reimporting, and the limits.
Model Import (Characters & Animation section) brings new models into the mod: creatures, props, weapons, anything
made in Blender, Maya, 3ds Max or downloaded from Mixamo. A model is imported into assets/models/ and, once
cooked, becomes an archive named @<mod>/<name> that creatures and maps can use. Archive names are in lower
case, the mod's name too: mods/LJF/assets/models/ljf.glb is @ljf/ljf. In the game under the model shows it.
To bind a model made for another skeleton (or none) to one of the game's skeletons, use Rigging. To replace a disc model in place, use the Model Replacer.
Importing
- Press Import glTF or FBX... and pick the file.
- The import options dialog reads it first and says what's in it, then asks how to bring it in.
- Press Import. The model shows in the viewport as the importer converts it, with its clips and any warnings.
- Open Mod > Cook & Package and Cook the mod.
A .gltf's buffers and images come along with it. An FBX, or a glTF whose options change it, is written as a .glb.
Per imported model:
- Reimport... brings the same file in again with the options it had (after you changed it in Blender, say). Reimport with new file... takes a newer export under the same name and options.
- Set texture... puts an image inside a model that has none; Replace texture... swaps it (a
.gltfwhose texture is a.pngbeside it can instead have that image edited in place). - Paint cloth... opens it in the Cloth Painter (a cape, a skirt).
- Delete... sends it to the mod's trash.
The options used are kept beside the mod's sources (assets/sources/import/<name>.toml) for Reimport.
Import options
Model Import, Rigging, Retarget Studio and the Race Builder ask before bringing in a file, the way Unreal's and Unity's FBX importers do. The dialog first shows what's in the file (vertices and triangles, bones, clips, texture size, the importer's warnings), then only the options that apply. Every option has a tooltip.
| Section | Options |
|---|---|
| What to import | Skeleton (off: a static prop), Animations (off: the skeleton in its bind pose), Materials and textures (off: white until a texture is set) |
| Rig | The target game skeleton (Rigging, Retarget Studio), and the Race Builder's part, rig mode and placement |
| Animations | The file's clips in a table: tick the ones to bring in, rename any; a prefix for all; the frame rate they're sampled at |
| Transform | Scale (×1, ×0.01, ×100) or Scale to a height (a hero is 75 units); the file's up axis (Y, or Z for files exported without conversion); facing (in 90° steps); feet on the ground; centred. The footer says how tall it will stand. |
| Mesh | Normals: the file's, recomputed smooth or faceted; flip faces for inside-out models |
| Textures | Largest texture size. For images: largest size, flip vertically, keep the alpha as shading |
| Name | The asset's name in the mod, and its archive (@<mod>/<name>) |
| Advanced | Most bones, atlas size |
Preset applies a built-in set (Default, Character, Character hero-sized, Static prop, Animations only, Z-up file,
Low-memory textures) or one of yours: Save as preset... names the current settings (right-click a preset to delete
it). Presets and the last settings of each kind of import are kept in data/RTNDEVKIT_import.toml.
What the importer does with your file
| In the file | In the game |
|---|---|
| Metres, +Y up, facing +Z (glTF's convention) | Game units (41.7 to a metre: a 1.8 m hero stands 75), +Z up, facing -Y. Turned and scaled for you. |
| Every node with a mesh | One mesh. Rigid parts of a skinned model are bound to the root bone. |
| Materials | One texture per model: each material's base colour texture (or its colour as a solid). Several materials are packed into one atlas (up to 2048 wide). Metallic and roughness aren't read: the Model Replacer sets the shine. |
| Texture alpha | Not transparency: the game reads texture alpha as a darkening mask, so imported art gets none (unless you keep it as shading). |
| The skin | At most 256 joints. Joint scale is dropped: the game's skeletons are rigid. |
| Animations | One clip each, sampled at 60 frames a second, named in lower case (Blender's `Armature |
FBX is read as Y-up metres whatever its own axes and units (a Maya file in centimetres comes in the right size), with every animation stack as a clip.
The texture is read through the UV set its material names (TEXCOORD_1 too), with its texture transform. A model
that would show black or one flat colour gets a warning naming why: no UVs, UVs all at one point, a black colour
factor, a black texture, or a WebP or Basis image (export PNG or JPEG instead).
Limits: triangles only; the first skin a mesh uses; one texture per model (no normal or emissive maps); no morph targets; no attachment points on imported bodies yet.
Using an imported model
As a creature. In the Creature Editor, pick it in the Model tab (every imported model of every mod is listed). A model from another mod makes that mod a requirement.
# gamedata/monsters.toml
[kind.frost-drake]
class = "Kobold" # behaviour, attacks and sounds come from the class
display_name = "Frost Drake"
archive = "@mymod/drake" # assets/models/drake.glb: its mesh, texture and clips
scale = 1.2
health = 180
The game plays its clips by name as it does the disc's: an idle from idlea, idle1 or idle; movement from run,
walk, fly, forward, march or move; attacks from the class's names (attack1, attack2...). Name your
clips that way, or add them with the Animation Editor. A missing attack clip means the creature
stands while it strikes.
As a prop. Every imported model is in the Level Editor's Props palette as
<name> (<mod>). A clip named after the model (crate for crate.glb) is its idle, crate0 to crate9 its states
(for doors and levers).
Folders. assets/models/<folder>/<name>.glb becomes @<mod>/<folder>/<name>.
Tip The Content Browser's Mod tab lists the mod's imported models; double-clicking one opens it where it's wanted (here, in Rigging, or the Model Replacer).
