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

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #225 on: April 25, 2011, 12:27:16 pm »
i just got rid of clean name, instead used name

Offline panthenol

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #226 on: April 28, 2011, 03:42:12 pm »
i'm wondering if somebody knows how to implement several animation clips into a single *.dae file , using 3dsmax , or maya
because it could be very tedious to import and serialize each and every animation using a file loader  :-\


Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #227 on: April 28, 2011, 03:59:57 pm »
well, i wonder it too ;) i've never seen a DAE file with many animations but as i know it's possible.

but, you can merge several DAE files into one if skeleton and models are identical. the script files accept more than one input file for this purpose.

Offline Babu

  • int
  • **
  • Posts: 71
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #228 on: April 29, 2011, 08:23:56 am »
Hi Raft,

Quote
3) If the meshes to be changed on the fly, (i.e. from thin-upper-body to fat-upper-body) then I think I have to rebuild the entire ".bones" group programmatically. Is my understanding correct?  If so, then I think it will be performance issue.  Is there a performance friendly way to get over with that?

no. just build them once while initializing them make proper parts visible/invisible

we're contemplating about using blend shapes (pose animations) instead of having multiple meshes for body/head shapes.  Is this a feasible and scalable solution.  Can you please let me know your view on this?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #229 on: April 29, 2011, 12:29:06 pm »
sounds good to me. worths a try. performance will not be a problem since pose animations are much cheaper than skeleton animations.

* if you plan to use facial pose animations they may not blend well with head scaling pose animations. but not sure, try and see ;)
* if you radically change mesh with pose animations (like making it twice bigger), skeleton animation may not look good enough. but again not sure, try and see ;)

Offline panthenol

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #230 on: April 29, 2011, 02:46:37 pm »
Hello again ! , so , i don't think i did it right , but :

Code: [Select]
skinnedGroup  = loadDAE(filename);
skinnedGroup1 = loadDAE(filename);
skinnedGroup.getPoseClipSequence().addClip(skinnedGroup1.getPoseClipSequence().getClip(0));
skinnedGroup.getskinClipSequence().addClip(skinnedGroup1.getSkinClipSequence().getClip(0));


gives :
Code: [Select]
Exeption in thread "main" java.lang.NUllPointerExeption

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #231 on: April 29, 2011, 02:47:40 pm »
i cant say more if you dont post stack trace. possibly pose clip sequence is null for groups. collada does not support pose animations.

anyway, that's not the way to merge animations in groups. use AnimatedGroup.mergeAnimations(..)

Offline panthenol

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #232 on: April 29, 2011, 03:38:33 pm »
Ok , i did'nt thad the the latest Bones version , so i updated and continuing to test  :)

Don't know if it's of any help for anybody , but i found out that maybe some export problems
are coming not from the exporters , but from the character rigs.

On creativecrash.com ,  i found a lot of skeletons with controls inside the bone hierarchy ,
This could be an issue when exporting animation , because the controllers would potentially not be recognised
as bones by  the exporter , while being inside a bone hierarchy , and it would result in breaking bone hierarchy at export.

In ogreMax Xsi , i had several exported controllers set at origin ...

So I think it's a good idea to have the controllers outside the skeleton , controlling it using constraints.
Before export , you can use any utility to bake constraints into animation curves on the bones
( select the bones hierarchy , and go in edit/keys/bake simulation in maya , or plot animation in softimage )
and then , remove everything , but the bones and the meshes before export
 
« Last Edit: May 01, 2011, 02:13:52 pm by panthenol »

Offline panthenol

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #233 on: April 29, 2011, 03:52:01 pm »
ah , with .mergeAnimations(..) , it's working perfectly , thanks a lot  ;D

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #234 on: April 30, 2011, 09:40:12 pm »
i had missed your post, somehow notificaton mail didnt arrive ??? anyway seems as you've solved your issue ;)

Offline MrFluff

  • byte
  • *
  • Posts: 11
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #235 on: May 05, 2011, 01:13:53 pm »
Hi, awesome library :).

I have a few questions:

What was the original format of the ninja model? when I export an animated collada (dae) model I cannot set names for animations (I am using 3ds max 9) so after converting the model to the binary format and loading it into my android scene i can only select one animation (this works perfectly fine).

Maybe dae does not support animation naming. What about this ogre3D format. Did you use it for the ninja?

When I use the free version of the OgreMax plugin I can only export am OgreMax scene or an OgreMax Mesh.

When using OgreMax exporter, two files are created (%filename%..mesh, %filename%..skeleton), besides the fact that 2 dots are in the filename there is always an exception thrown when trying to convert either of these files into the binary format.

So what's the best way to create an animated model with different (named) animations?

Thx in advance :)

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #236 on: May 05, 2011, 09:54:43 pm »
hi,

original format of ninja is Ogre3D. i'm not sure if collada supports names. but ogre does and OgreMax allows naming animations. i prepared model and animation of animation blend demo myself and gave names to animatinons.

i suggest Ogre format and OgreMax for 3d max. but AFAIK you dont need to name animations to have more than one animations in one file.

there are two equivalent forms of Ogre format: binary and xml. *.mesh/skeleton and *.mesh.xml/skeleton.xml files. they can be converted to each other. Bones need xml format thats why you got an exception. OgreMax has an option to export to xml format or alternatively Ogre has command line tools to convert between formats. look at previous posts in this thread for more information.

Offline MrFluff

  • byte
  • *
  • Posts: 11
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #237 on: May 08, 2011, 12:55:18 pm »

Hi raft,

thank you for your reply. I finally got named animations working using the converted binary from an OgreMax exported file, and everything works as expected.

I had some problems converting from a collada file, however. The first animated frame in a loop does not display corretly (it does not matter to me as I use the Ogre3D format now).

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #238 on: May 08, 2011, 03:51:45 pm »
I had some problems converting from a collada file, however. The first animated frame in a loop does not display corretly
possibly an issue with exporter.

Offline panthenol

  • byte
  • *
  • Posts: 12
    • View Profile
Re: Bones - Skeletal and Pose animations for jPCT
« Reply #239 on: May 09, 2011, 12:10:17 pm »
Quote
I had some problems converting from a collada file, however. The first animated frame in a loop does not display corretly
possibly an issue with exporter.

I got no such problem in Maya , but OgreMax is quite a time savior anyway ^^