Bones - Skeletal and Pose animations for jPCT

Started by raft, January 06, 2010, 11:45:01 PM

Previous topic - Next topic

fir3d

Quote from: raft on May 11, 2010, 12:19:13 AM
Quote from: fir3d on May 10, 2010, 07:05:08 PM
Is it usable in games now?
yes, on desktop definetely it is :D try ogre3d exporter (ogremax) for max. on Android, Bones suffers performance which is kind of expectable because of dalvik vm and -moderately- heavy matrix calculations :-\

Hopefully they are going to have some major improvements to the dalvik vm with the next android version (froyo).

raft


zammbi

Sounds like 2.2 will have JIT and flash :) Oh and maybe install programs on a flash card too!

faceb

#48
hey, i have been trying to run samples of bones. all of them running quiete good. but when i try to use another 3d model, some exceptions are thrown.

Exception in thread "main" java.lang.IllegalArgumentException: parent index should be less than joint index. o/w a joint array cannot be ordered such that parent comes first
at raft.jpct.bones.Joint.<init>(Joint.java:36)
at raft.jpct.bones.BonesImporter.convertJMEJoint(BonesImporter.java:359)
at raft.jpct.bones.BonesImporter.convertJMESkeleton(BonesImporter.java:332)
at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:151)
at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:93)
at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:77)
at raft.jpct.bones.util.JMEOgreImporter.run(JMEOgreImporter.java:58)
at Converter.main(Converter.java:24)


im using blender to create animations, and ogre mesh export plugin to export them as mesh xmls.
i tried more than 5 different models, but i couldnt succeed.
hope one of you help me. thanks.

raft

mm, Bones expect joints to be ordered such that parent always comes before children. all of the models i've seen so far obey this rule. seems as your exporter does not..

can you please post the exported xml file ?

faceb


these are exported files from blender with orge exporter plugin for blander.

male.mesh.xml
http://www.2shared.com/document/96gHiqlc/malemesh.html

male.skeleton.xml:
http://www.2shared.com/document/--_XAEVM/maleskeleton.html

Scene.material(it seems bones dont user such a file)
http://www.2shared.com/file/frNBp45d/Scene.html

to get files there is a link at the bottom of the page "Save file to your PC: click here".

thanks for your quick response :)


raft

it says :(
QuoteThe file link that you requested is not valid. Please contact link publisher or try to make a search


raft

ok, i got it. i will have a look at it tonight or tomorrow

raft

well, seems as this will take a while :(

the thing is, as i said Bones expects joints ordered such that parent joint comes before child one. this eases a lot of calculations since in skeletal animation each joint's transform is in its parent space. ie: we can process joints in the given order and be sure that parents are processed first.

i tried to sort Ogre joints according to this order but somehow final result got messed up ::) i couldnt figure what is wrong yet ???

sorry for the inconvenience :-\

raft

a screenshot of your skeleton in bind pose may help to visualize the problem..

faceb

#56
i used blender 3d models at http://www.katorlegaz.com/3d_models/

the one i shared yesterday contains a sample animation which i made.
original model is http://www.katorlegaz.com/3d_models/human_male/0143/male-01-suit.zip.

screenshot of the model in blender is here:http://img707.imageshack.us/img707/1368/manz.jpg

however if i didnt misunderstand , you mean, by sorting bones in following skeleton.xml file, probably, i can resolve the problem ?
i will try it.
<skeleton>
<bones>
<bone id="14" name="hip">
<position x="0.000000" y="-0.000000" z="-0.727107"/>
<rotation angle="0.146724">
<axis x="1.000000" y="0.000000" z="0.000000"/>
</rotation>
</bone>
<bone id="81" name="abdomen">
<position x="0.000000" y="0.778774" z="1.265279"/>
<rotation angle="0.213292">
<axis x="-1.000000" y="0.000000" z="0.000000"/>
</rotation>
</bone>
.
.
.


one more thing, is there another way to convert 3d models to mesh xml?


raft

oops, somehow notification mail went to my spam folder :-\

Quote from: faceb
however if i didnt misunderstand , you mean, by sorting bones in following skeleton.xml file, probably, i can resolve the problem ?
yes that will probably solve the issue. but is kind of tedius..

i guess i've solved the problem. my samples and yours loads and plays fine. can you please try it. you can download it here. however there are some spike like joints in your skeleton so i couldn't be sure if it's ok. i cant see them in your screenshot since it's taken from front.

Quote from: faceb
one more thing, is there another way to convert 3d models to mesh xml?
if you ask for blender i dont know. if you have 3dsMax OgreMax is a good exporter for it.

hope this helps
r a f t

faceb


raft

cool :D than i'll make that the official release tonight