Author Topic: Importing MD5 animation data  (Read 9492 times)

jjzazuet

  • Jr. Member
  • **
  • Posts: 16
    • Unsung Stories
Importing MD5 animation data
« on: August 03, 2012, 12:22:37 AM »
Hello. I've just started exploring this engine and I think it has a lot of potential.

While I'm very competent when it comes to Java programming, I'm still a newbie when it comes to OpenGL and 3d design concepts so if there's something I'm not understanding correctly by all means let me know :P.

What I'm currently trying is to apply a bunch of MD5Anim sequences to some Collada DAE models I've created. I'm willing to do the bone name correspondence myself in code, pretty much the same way the animation tutorials do.

What I'm not very clear about now is if in fact I can merge MD5Anim data with DAE models to begin with.

If I understood the tutorials correctly, the best solution would be to first convert the models and the animation sequences to Bonzai's native formats (JMF for the models and JMA for the animation sequences). It is after this step where I think I can get anything useful from the experiment.

With this in mind, is there a way to convert MD5Animation data into Bonzai's native animation format? I'm reading through the API docs but if there's a simpler answer, I'm all ears.

Thank you for your time and help!

JZM

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Importing MD5 animation data
« Reply #1 on: August 03, 2012, 09:33:43 AM »
I have not thought about using MD5Anim without a MD5Mesh, so currently the MD5Anim support requires loading a MD5Mesh too. I will probably make a build soon (may be today) to add loading of MD5Anim separatly too.
In the meantime, you can use a dummy MD5Mesh to extract the motion or use BVH motion format (if you can/want).

It is not required to convert in jmf/jma formats, but it will be more efficient (faster to read, etc ...). You can convert with:
 * tools: viewer/editor
 * api: using ModelReaderSettings to load the original format and write in native format with ModelWriterSettings/JmfWriter (see in tutorial AnimationBuilder.build method)

When you're at the point to apply the motion to a model, you'll have to check first which case you are:
 1) Model and motion have the similar bone/joint hierarchy and same bind pose joint rotation (corresponding tutorial: AnimationBuilder)[/li][/list]
 2) Other cases (corresponding tutorial: AnimationRetarget)
« Last Edit: August 03, 2012, 09:35:46 AM by jerome_j »

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Importing MD5 animation data
« Reply #2 on: August 03, 2012, 11:23:28 AM »
The last dev build adds support to standalone MD5Anim reading:
You can now use sequence as shown in the tutorials.

jjzazuet

  • Jr. Member
  • **
  • Posts: 16
    • Unsung Stories
Re: Importing MD5 animation data
« Reply #3 on: August 03, 2012, 04:11:50 PM »
Well that was quick indeed.  8)

I'll be sure to try out the new functionality and provide feedback.

Thank you again for your time and help!