Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature request) Luanti (Minetest) support #120

Open
hardBSDk opened this issue Jan 2, 2025 · 3 comments
Open

(Feature request) Luanti (Minetest) support #120

hardBSDk opened this issue Jan 2, 2025 · 3 comments

Comments

@hardBSDk
Copy link

hardBSDk commented Jan 2, 2025

Luanti implemented the support for glTF/GLB 3D models recently.

https://blog.luanti.org/2024/11/10/5.10.0-released/

@louis-e
Copy link
Owner

louis-e commented Jan 3, 2025

Looks interesting, we could think about adding support for it in the future. Right now I have to prioritize my time on fixing some bugs :D
Do you know if the .mca world saving format is similar to Minecraft?

@rollerozxa
Copy link

rollerozxa commented Jan 3, 2025

The Luanti map format works by storing cubic mapblocks (i.e. chunks) with a block position hash and then the mapblock BLOB (Zstd compressed in latest format version) in a sqlite database, see world_format.md#map-file-format for more info about the format. Of most interest I assume to this tool is that nodes are stored in a flat array of IDs where there is a lookup table for IDs -> itemstring (i.e. like Minecraft's namespaced string IDs and their palette), then there is some header metadata, and then there is note metadata, object entities and such that I assume this tool wouldn't make use of and can be omitted.

@rollerozxa
Copy link

For some example code of mapblock serialisation, the code that the engine uses is located in MapBlock::serialize in src/mapblock.cpp, but it's a bit more noisy because of it supporting many format versions as well as the format used for network transfer (only the disk format version 29 would be relevant). There is also this method written in Python in my mcimport fork for serialising mapblocks to version 29, and is probably more realistic in what you'd need to implement to support the format. If you're familiar with Kaitai Struct I made a partial description of the mapblock format a long time ago for inspecting generated mapblocks, available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants