.blend to .j3o via java -jar command?

Hi All,

Great to join this group, I’ve seen lots of great people helping each other hence I feel at home already :wink:

A quick question.

I like the model importer in the SDK but would like to be able to import .blend files to .j30 files by hand via a command line.

I looked a lot before asking this question and the answer seems to elude me for the moment thus the request on a “How To” import models and convert them into .j30’s via the command line?



You can easily write one yourself, the wiki explains how to write j3o files. The problem is it won’t work the way you imagine. The paths for images and other resources have to be set when the j3o is created, its like a compiled class and part of a project, not an exchange file format. j3o’s can even contain references to classes that exist only in the project they were created in.


I REALLY appreciate your awesome support.

Yes, I concluded by using KHexEdit that what I saw was Java byte code whcich makes the best of sense,

So what I gather is that using the blender modules to read in a blender file I will be able to construct the proper “geometry”, texture/material" references to write/stream back a .j3o.

I am very familiar with interpreting Java byte code, but if there is any specifics any and all info would be of great import!

MANY thanks Norman!!!

BTW: Rockin Icon, I gotta make one soon :slight_smile:

TIA for all infos :smiley:


No, its not bytecode but serialized java objects. Its best to do the conversion with java, as said a simple 6-line application would easily be possible. But as said, it will create a j3o file with absolute image paths. Say you create 10 models, each has a folder called “texture” next to it and inside is a “modelatlas.png” file. Then all models have an image path like “texture/modelatlas.png”. Later in the project you have to copy all files to (assets location)/texture/modelatlas.png" so the j3o will find it. From the second model on you have a problem. Same if you register each model folder with the assetmanager. As the names are all the same (the name starts at the root you register and again has to be the same as when you created the j3o so it can be found) you will always load the same image for all models.

The SDK handles all this for you with the model import tool and if you have many models to convert you can copy them into the assets folder and select multiple files to be converted.


MANY thanks!

I assumed a serialized object so great to have that assumption confirmed.
The rest is great info thus I am on track to do just that!

Truly appreciate the expediency and professionalism that adds to the synergy that JME has!!!

I look forward to retuning the favor to the community.

I can see why Blender uses “Suzanne” “The Monkey” for The Monkey Rocks!!!


Have a super evening and MANY THANKS!!!