JME2+JME3 OGRE Model assembler

Hi all,

I am working on code to be able to achieve the following:

load a OGRE skeleton

load a basic set of submeshes for (arms, hands, legs, etc)

load a basic buch of animations for that skeleton (idle1, die1, etc.)

store this configuration and reload it.

swap submeshes as you like (e.g. exchange hand1 vs hand15 model) at runtime

load die2 animation, play it, throw it away at runtime

later on, some kind of animation stack as in thread http://www.jmonkeyengine.com/forum/index.php?topic=14428.0

so here’s my question,

has anybody done something similar in that direction, or knows of a source doing it (before I tryy reinventing the wheel)…

currently I have already code to split the ogre mesh, skeleton, material and animmations apart, what would come next is the composer to to the above stuff, so anybody going to share, before I rip my jme open?

Sounds interesting.

Afaik noone did something like that. The md5-guys made something similar (I searched for it

but couldn't find it anymore). They had an example about changing heads.



That will be for sure not trivial… Hmm…as long as the boneassignments are set the right way it might work…

hehe…well, if you need a tester count me in.



Keep on rocking

ok,… I have succeeded in acomplishing this by modifying several ogre classes, up to the case where I swap animations, skeletons and meshes at runtime, and get a variation of that at runtime.

Next thing I’m up to is an animation system on top of this and skeleton scaling (my models mostly use the same skeleton definition, and have a scale factor defined)

screens, demo or video will follow…

ghoust said:
ok,.. I have succeeded in acomplishing this by modifying several ogre classes, up to the case where I swap animations, skeletons and meshes at runtime, and get a variation of that at runtime.
Next thing I'm up to is an animation system on top of this and skeleton scaling (my models mostly use the same skeleton definition, and have a scale factor defined)
screens, demo or video will follow..

Looking foreword to that ghoust.
PS: are you still working on that lineage2 game client project?

Here is a screenshot: showing eight goblins based on the same configuration, each one with a little bit different looks (mostly noticable is the variation of helmets). It does not look as good as the halberdmen, but it is at least something to look at.

Yes I am still working on the lineage 2 client. With the animation system in place and some model assets present I will now concentrate on a small area as a starting area for a free and independant dataset.

Awesome! Do they have animations yet?

Awesome ghoust looking foreword in hearing from u and this contribution more!

@nomnom

the models are animated, curretly they are in idel state (some models look to the side as you can see)…



@Sethek

I’ll try to sync my jme and decouple the code from my internals but I guess it will take a month or two, I guess until it will be available.

So, are you at the point to post the code? No rush :wink:

I think you can find his stuff here:

http://hub.jmonkeyengine.org/groups/user-code-projects/forum/topic/high-level-universal-animation-system-source/

Ah yes… Thanks! I guess I missed that one in the forums…

there you will find the source for an animation system, not the model assembler.

The model assembler will take some time to seperate from my internal model parts system. Currently I have 2 requests for code in the pipeline, sorry for that, I’m quite busy. But the code will be available, I promise (perhaps around june when the next release of the l2jclient including the technology will be available).

No problem. Take your time :wink: It just builds up excitement :wink:

Hi all,

I ported the code to jme3, you can get the jme3 source and a webstart demo from here http://www.3d-inferno.com/Jme/#assembler .

For anyone still interested in the jme2 sources give me a pm.



what it does from my wishlist in the first post:



load a OGRE skeleton DONE

load a basic set of submeshes for (arms, hands, legs, etc) DONE

load a basic buch of animations for that skeleton (idle1, die1, etc.) DONE

store this configuration and reload it. CHANGED the config is created during build time, no gui for that

swap submeshes as you like (e.g. exchange hand1 vs hand15 model) at runtime NOT DONE (not automatically) change mesh in Assembler, then getModel

load die2 animation, play it, throw it away at runtime DONE the Animations are requested at runtime by a special AnimationProvider



later on, some kind of animation stack DONE (universal animation system linked in)

Thanks for sharing, but, could you please go into some detail about how this differs from jME3’s native OgreXML loader?



In what instance might we want to tell a user “you should check out jME Assembler”?

so for the difference:

What the ogre loader does:

each time you load a model, meshes, animations and a skeleton is loaded, next time you request that same model you get the same model. When you have two idle animations you must decide by yourself which one to play.



What the assembler loader does:

each time you load a model, a different assembley of meshes is returned, animations are only loaded once at runtime and will be shared between each model, skeleton template will also be only loaded once and reused.



By using these techniques you can create a wide variety of models (for example for a unit, or a warpack, etc.) by using only a limited set of models.

3 different arms, 3 body parts, 3 leg parts, two heads, can crate 333 = 27 different looking models by only having to create 9 parts.



The same techinque is used for animations, you can create 3 idle animations, which are picked round robin, so the models will all have access to the same three animations, but each one can play a different one at the same time.



Some optimizations which could be used, or will come later: baking of models to reduce them to one draw call, for characters from one unit only one could also instead of loading each mesh part alone use a shared mesh where a bitfield is steering the rendering of meshparts.

1 Like