editor: tile paint and collision strokes are one undo step, no collision option for tiles (visual-only model copy in the build), freed gl buffers and stale pick ids, export level as gltf/glb with textures and vertex colours

This commit is contained in:
MineTec committed 2026-11-07 11:57:22 +01:00
1 parent 59531a60b8
commit 2f22a56cec
30 files changed
+1737 -27

No files matched your search

+11 -1
View File
@@ -267,6 +267,8 @@ used in the level** hides unused ones. Click a model to make it the current one,
Painting onto a tile at the same height **swaps its model** instead of stacking a second tile.
New tiles copy the vertex colours of an existing tile with the same model.
One drag is one undo step: **Ctrl+Z** brings back all tiles a stroke painted over, erased or swapped.
> **Tip:** Prefer swapping, moving or hiding original tiles over erasing them. Object scripts can
> address tiles by their number, and erasing a tile shifts the numbers of all later tiles. The
> status bar warns you when you erase an original tile.
@@ -326,7 +328,15 @@ change all tiles** (paint the model, every tile using it changes) or **Shared mo
this tile** (the painted tile gets its own copy of the model first).
Brushes have one material per face class (top, sides, bottom); tile models are painted per
polygon. Tile collision cannot be switched off – paint it 30 or hide the tile instead.
polygon. A painting drag is one undo step.
### Tiles without collision
To make a tile only visual, select it and tick **No collision** (Inspector, section **Build**; works
for several selected tiles at once). The built level then uses a copy of the tile's model without
collision polygons: the llama walks through the tile (a wall) or falls through it (a floor). Other
tiles of the same model keep their collision. In the editor the tile no longer shows collision
lines, and checks such as "no floor under the player start" ignore it.
The layer **Invisible collision volumes** draws invisible walls, invisible blocks and colliders
translucent red so you can see them while editing.
+23 -1
View File
@@ -7,7 +7,7 @@ collision and lit vertex colours, and its textures are packed onto texture pages
The **library** works the other way round: it saves geometry from any level (original tiles,
brushes and meshes, with their textures) so you can insert it into other levels. And **Export
selection as OBJ** takes level geometry to Blender.
selection as OBJ** takes level geometry to Blender, **Export level as glTF** the whole level.
## Supported files
@@ -178,6 +178,28 @@ it in Blender, then **File → Import mesh** it back (round trip).
> **Note:** The exported textures are game data – fine for your own editing, please don't share
> them.
## Export the level as glTF
**File → Export level as glTF…** writes the whole level – tiles, brushes and meshes – as one glTF
2.0 file for Blender or any 3D viewer:
* **.glb** (binary) or **.gltf** (text, everything in one file), chosen by the file type,
* the level's texture pages as PNG pictures inside the file, the game's vertex colours
(light and shade) as vertex colours, transparent and double-sided parts as such,
* unlit materials, so viewers show the baked colours like the game.
| Option | Meaning |
|---|---|
| **Object models** | also the models of placed objects (coins, characters …) as the viewport shows them |
| **Leave out hidden items** | items hidden in the editor (**H**) are not exported |
| **Game orientation** | mirrors the level so that Blender and viewers show it the same way round as the game. Off: the same axes as the OBJ export and **Import mesh**, so the file can be imported again unchanged |
Tiles with **Exclude from build** are left out. 1 unit is 1 cell.
![glTF export dialog and the exported village read back by Import mesh](img/geo_gltf_export.jpg)
> **Note:** The exported textures are game data – fine for your own use, please don't share them.
## Tips for good meshes
* Model at the right scale: 1 cell is one grid square, the llama is about 0.6 cells tall. Use
+1
View File
@@ -157,6 +157,7 @@ Every menu command with its shortcut and a short description.
| Import texture… | | Import PNG/JPG images as textures (colour reduction, blend class, packing) |
| Export level WAD… | | Build the level and save the game file (.wad) somewhere |
| Export selection as OBJ… | | Mesh, UVs, vertex colours, textures (PNG) and collision for Blender |
| Export level as glTF… | | The whole level with textures and vertex colours as .glb / .gltf (Blender, viewers) |
| Close editor | **Ctrl+Q** | Close the editor |
### Edit menu
Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB