About j3O files

Where can I get knowledge about J3O files?(blender to j3o and gltf to j3o)

I want to write a tool ,Where to get the relevant knowledge?

you mean you want write tool to convert to j3o?

there already exist,

there is SDK that allow you that.(you have SDK sourcecode on github)

There is also JMEC command line script like:

so you can see its sourcecode

about blender to j3o, its pain to maintain it, since Blender change structure almost every version, so need update it very often.

2 Likes

thanks

1 Like

As @oxplay2 pointed out, there are existing apps to convert files, if that’s all you want to do. But in case someone reading this Forum wants to do more…

  • To write J3O from within a JMonkeyEngine application, there’s a save() method in the BinaryExporter class of the “jme3-core” library. Here’s a code fragment:
        JmeExporter exporter = BinaryExporter.getInstance();
        File file = new File(filePath);
        try {
            exporter.save(savable, file);
        } catch (IOException exception) {
            logger.log(Level.SEVERE, "write to {0} failed", filePath);
        }

While savable is usually a scene-graph object (a Node or a Spatial), BinaryExporter.save() works on any object that implements the Savable interface. So it can also be used to serialize physics controls, light probes, filters, and so on.

  • And for byte-by-byte documentation of the J3O file format, our best resource is the BinaryExporter javadoc. So you could write a converter in Python or C++ if you wanted to.
4 Likes

i saw it
I’m trying to understand this code
My knowledge of English is very poor
These are all mechanical translations
Okay, I just wanted to say thank you (If you understand what I’m talking about)

1 Like

As sgold said the javadoc may help you a lot.
sgold给的帮助文档连接里有详细文档结构的介绍