I want to write my own Model loader and animation system

I want to try to write a new and my own Model loader and animation system.

I think if an animation is playing good in blender so it must be play correctly on jme.
I try to use ogre and xbuf and gltf to export a model but all them have a problem some where.

1-I think it is good Idea to export directly from blender to j3o file.
so where is the docs for blender and blender plugins and docs for j3o file format?

2- or just writing a new animation system and .blend file loader ?

I want to write my own Model loader and animation system What problems and difficulties can has it ?

Millions…
You just simply can’t directly export a j3o from blender because j3o contains serialized java objects. It’s not meant for this.
Could you please explain the issues you have with gltf ?

I have model in blender that have some animations .
it is played and showed correctly .
but in exported gltf it have not any texture or material and have no animation.

is there any check list like how to ogre exporting , for gltf?
you know I have any texture and animation.

You just simply can’t directly export a j3o from blender because j3o contains serialized java objects.

a python plugin that export data from blender to a java app that uses the jme j3o exporter.

What gltf plugin do you use ? Usually you have to setup a spécial node in blender that supports PBR.

…said the guy who wrote xbuf

Heheh… You are essentially implying that you are way smarter than literally everyone else who has tried to solve this problem. I think that’s probably not the case.

When you are neck deep into it, I 10000000% guarantee your exporter will end up with exactly the same sorts of issues but you will understand how to properly format your model for your exporter. Seems simpler just to learn how to make a game-ready model to me. (hint: yours isn’t game ready… it’s probably 3D movie ready. Waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay different. )

Virtually every time blender updates, the .blend file format changes too. This, amongst so many other issues is a royal nightmare. The converter, therefore needs to be updated each time. Off the top of my head I’m sure the SDK comes with the Blender version that is compatible with the plugin.

The gaming industry moves so fast. Today its GTLF and PBR.

I completely agree that models are something of a nightmare at times with JME, however i have for all intent zero knowledge on model importing so i cannot complain. I do wish people would get more involved in the SDK… myself included. I am virtually the man for the job in that respect.

2 Likes

Bottom line: Blender is a tool that will let you make everything from a texture cube to a fully animated feature film.

It’s always (always) going to take some learning to figure out how to dial it back and prep your model for a game. Always. (always). Always.

1 Like

GLTF 2.0 exporter in blender.

whats that?

Heheh… You are essentially implying that you are way smarter than literally everyone else who has tried to solve this problem. I think that’s probably not the case.

you do not respect to new and noob users. I think there is no freedom of speech. if I answer you, you will block me. because you are the smartest man/woman in the opensource Community.
who is responsible for this? hoom? just count the model importing problem questions in forum.
you are right Im noob but show me a check list and a tutorial to export an animated character model.
you know ,we have a game engine that it have not any guarantee to importing your models.

Just show me a stable way to do that.

You didn’t ask “How do I load this model?” To which there will likely be a simple answer.

You asked “How do I write my own importer?”

…if you had the skills to do it better then you wouldn’t have to ask.

I don’t even have the skills to do it better… because xbuf is as good as custom exporter can possibly get (you can view your model live as you edit it) and gltf is (today) as good a generic export format as you can possibly get.

Lots of really smart guys have been working on this problem but they will never work around the FUNDAMENTAL FLAW: Blender is not a game model editor. It’s much more than that. If you don’t define your materials right, they won’t show up… and JME wouldn’t be able to render them properly even if you could. Similar caveats for animations, etc…

If you ask questions about the problems that you have, post example models with the issues, I guarantee you will get helpful responses. I’ve seen it 100 times.

Else, I look forward to your blender exporter that will handle any blender model.

1 Like

GLTF is still a Work-In-Progress, so expect it to have bugs sometimes.
For XBuf it would help to see your model as I even imported 100MB Models with like 2M Verts without a problem into j3o (Both: Multiple Animations and multiple Textures)

this is the model:
https://yadi.sk/d/ILD6GcoM3R87ab

Works for me. I had some trouble because the SDK froze during import and then threw an Exception in the AWT Thread (which means I had to kill it because it wasn’t responsive anymore), however the .j3o file was already there so I just had to re-start the SDK.

The Model is currently without Textures because I didn’t bother to set up an asset path (You have to select XBufRender and then in the Scene/Render Options of Blender, select the correct AssetPath). That AssetPath will be where the Textures are stored and referenced so they can be loaded when converting to j3o.

All that was left was right-clicking the xbuf and selecting Convert to J3o.

two notes though:
A) You should only have one Armature per Blender File, you however have them doubled it seems (one “Model” Object and then each animation separately again).
B) This also means you have to select “Model”'s AnimControl to trigger the Animations and not the others.

I’ve attached my .xbuf and .j3o files so you can maybe troubleshoot where your disconnect is.

(Note: Zippyshare is very naughty with ads, the first click on download might trigger an ad popup)

2 Likes

No I cant play the animations…
look at this:

I always use the SDK importer directly on blend files including animations/material/… and it mostly works. Even for multple nla strips. The only pitfall is the scaling, if I forget to reset that to 1 I have mess (skeleton and model). I think in the wiki there are some older step by step tutorials for ogre import. And @Ali_RS did some youtube tuts, I don’t know where you can find em but I guess the wiki is a good starting point…

1 Like

I can’t add load textures too , I did it but not working…

@ia97lies You should definitely consider xbuf for many reasons (e.g. blender importer can’t handle modifiers, xbuf applies them with blender algorithms, our importer would have to fake them).
Apart from that I’ve had no problems anymore after I switched to XBuf, so it could happen that animation gets wonky (when using motion capture though, simple animation might not be a problem)

Have you set your asset path correctly? Did you see the files “abohamed pan.jpg” “abohamed pootiin.jpg” "abo… shirt " and “tan” there?
If not just show me how you’ve set up the asset path

yes I did it in I copied them in them in same folder and change the assets path in blender when I choosed xbuf render :
Capture1

and now model is black.

You don’t have to copy them, you can see it made a Texture folder for you.
The idea here is to specify the asset path of your project, so the model’s Textures get filled into the regular Texture Folder.

I can’t tell you why the model is black, but it has to be with missing tangents/jMB I guess, because it went from white to black. Try to inspect the material on the model and if possible try to generate tangents.