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

+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