Author Topic: Bones - Skeletal and Pose animations for jPCT  (Read 88499 times)

Offline fir3d

  • byte
  • *
  • Posts: 11
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #45 on: May 11, 2010, 12:46:07 am »
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).

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #46 on: May 11, 2010, 12:54:23 am »
yes, we all hope for a JIT for Android..

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #47 on: May 11, 2010, 06:17:08 am »
Sounds like 2.2 will have JIT and flash :) Oh and maybe install programs on a flash card too!

Offline faceb

  • byte
  • *
  • Posts: 5
    • View Profile
    • javaoyunlari.org
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #48 on: May 25, 2010, 02:43:14 pm »
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.

Code: [Select]
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.
« Last Edit: May 25, 2010, 10:24:50 pm by faceb »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #49 on: May 25, 2010, 02:53:54 pm »
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 ?

Offline faceb

  • byte
  • *
  • Posts: 5
    • View Profile
    • javaoyunlari.org
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #50 on: May 25, 2010, 04:36:40 pm »

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 :)


Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #51 on: May 25, 2010, 05:41:30 pm »
it says :(
Quote
The file link that you requested is not valid. Please contact link publisher or try to make a search

Offline faceb

  • byte
  • *
  • Posts: 5
    • View Profile
    • javaoyunlari.org
« Last Edit: May 25, 2010, 05:56:18 pm by faceb »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #53 on: May 25, 2010, 06:26:12 pm »
ok, i got it. i will have a look at it tonight or tomorrow

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #54 on: May 26, 2010, 01:10:23 am »
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 :-\

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #55 on: May 26, 2010, 02:21:56 am »
a screenshot of your skeleton in bind pose may help to visualize the problem..

Offline faceb

  • byte
  • *
  • Posts: 5
    • View Profile
    • javaoyunlari.org
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #56 on: May 26, 2010, 02:16:46 pm »
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.
Code: [Select]
<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?

« Last Edit: May 26, 2010, 02:18:30 pm by faceb »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #57 on: May 26, 2010, 09:34:14 pm »
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

Offline faceb

  • byte
  • *
  • Posts: 5
    • View Profile
    • javaoyunlari.org
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #58 on: May 27, 2010, 12:15:56 am »
its working, perfectly perfect  :D
thanks.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #59 on: May 27, 2010, 08:41:29 am »
cool :D than i'll make that the official release tonight