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
B3D JSON #14040
Comments
I have taken inspiration from Luatic in his beautiful example on the B3D format specification to create a sample example of what this could look like:
Of course, this can be minified etc. This is simply a readable version of it. The goal is to be as open as GLTF, but to allow progression in the existing format and engine implementations. If you would like to see Luatic's spec: https://github.com/appgurueu/modlib/blob/master/doc/b3d_specification.txt |
Thanks for the suggestion. We plan on deprecating (as in, no longer recommending the use of) b3d in the future, makes no sense to work further on it. Development efforts should be focused on glTF |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, but I don't think this is a good idea. There are two crucial reasons for (keeping the) binary format:
It's also not that hard to convert to/from binary from JSON yourself; it does not require engine support. I can write you a JS/TS library for that by porting modlib's b3d reader and writer if you need it. |
@appgurueu, don't forget: glTF doesn't imply JSON/ASCII, it can be binary too: |
Yeah, I know, I'm just discussing the proposed B3D format here, not glTF. (It should also be noted that even "text" glTF contains base64-encoded binary buffers, presumably also for (space) efficiency reasons.) The main problem that seems to be currently slowing down our "in-progress" glTF adoption is the complexity of glTF; any PR that properly solves this issue will probably have some kloc in diffs spanning both this repo and our Irrlicht fork. We could consider adding zlib compression on top of B3D and OBJ in the meantime. |
There is already a parser for blender 2.8. I made a fork to convert to JSON and B3D |
Problem
We have B3D binary only format with a complex binary file encoding. It does the job but it's very complex to work with. This is a heavily outdated format and the standard is basically whatever the Minetest engine says it is.
Solutions
I have studied the available documentation on this. It appears that everything that can be inside of a B3D file can be represented by a JSON file. A loader for this would be probably a magnitude easier to implement into the engine for the time being as a holdover while we're waiting for upstream Irrlicht to solve GLTF implementation. This solves a few problems:
1.) It makes B3D much easier to work with as a modder, you can more easily generate B3D files.
2.) It makes B3D extremely easier to work with as an extension developer. We can more easily bolt on importer/exporters into programs such as blender/maya/blockbench.
3.) It makes it so developers can completely skip using a modeling program and they can actually hand code their models if they so desire.
Alternatives
I mean there really aren't any alternatives
Additional context
I just spent 3-4 days trying to make a triangle appear in the minetest engine https://github.com/jordan4ibanez/minetest_b3d when I've written entire portions of game engines in rust faster than this horrific binary format has taken me to go nowhere. This idea came to me randomly, but I am glad it did.
The text was updated successfully, but these errors were encountered: