Roblox Mesh Format

One last update to specify how the envelopes are tied to the mesh subsets and to clear the last 2 undefined bytes in the MeshHeader. The version 4.00 spec should be 100% complete now!

Let me know if you guys have any questions.

2 Likes

Have updated this with a WIP spec for version 5.00! I think I figured out most of it, but still need to do some experiments to make sure I’m covering it all correctly.

At the very least it should be trivial to read the data into a structure that fits the data :slight_smile:

The version 5.00 mesh spec is now 99.9% done! Just need to figure out the purpose of unknown_offset, but everything else has been fully cracked! :fire:

Enjoy!

1 Like

Thats very kind of you to keep this up to date even after 3 years. Also, I was wondering if there are any decoders for v4 and 5 meshes?

[EDIT] : It is actually possible to download meshes directly in the .OBJ (only face, vertices and uv data) format by using https://thumbnails.roblox.com/v1/assets-thumbnail-3d?assetId=AssetId
This will return an URL under ‘imageUrl’ field which will return the URL for the .OBJ object under ‘obj’ field.

4 Likes

Interesting! How would I use this API to read the mesh format data itself? I want to be able to count triangles in a Studio session.

1 Like

I’m pretty sure you can upload the meshes directly through the mesh upload API if you have the mesh already converted to this format, I haven’t tested it fully though

You could also load in the mesh using PromptImportFile or local content paths but these have their own problems (mainly asset caching)

I’ve made some final amendments and corrections to version 5.00 and made a placeholder section for version 6.00, which isn’t being used in practice yet but does exist.

I can now say I’m 100% confident in my spec for version 5.00 and have implemented it in practice!

I have a reader for the mesh format fully implemented in --!strict Luau here if anyone is looking for a reference:

2 Likes

I wrote a mesh decoder in Rust based on this guide, thanks for the nicely laid out info!

2 Likes

Never actually had to use Rust before so pardon my ignorance, but what is this supposed to compile into? Just throws a message saying “No bin target” or something.

It’s a library, for use in another application as a dependency. It provides an in-memory data structure that represents all the data from the mesh file, which you could use for something like converting into a different mesh format.

If you just want something to run, you can run the tests with cargo test

1 Like