Author Topic: Animation guidance  (Read 2936 times)

Offline rafaelsm

  • byte
  • *
  • Posts: 3
    • View Profile
Animation guidance
« on: July 09, 2014, 04:55:38 pm »
Hello,

I'm using Blender for modeling and animations to develop a live wallpaper. Loading 3ds and texture with JPCT_AE works really well but I'm stuck at loading the animations.

I have the following questions:

1- Do I need to export the animation in a especific format (If yes, how can I do that from blender)?
2- How can I make the animation work with the 3ds file in JPCT_AE?

Please, help a noob  :)

thanks!



Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation guidance
« Reply #1 on: July 09, 2014, 05:40:35 pm »
Depends on what exactly you mean by animation. Animation like a walking human or animation like an object following some path?

Offline rafaelsm

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Animation guidance
« Reply #2 on: July 09, 2014, 06:00:16 pm »
Animation like walking, using armature to move the mesh.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation guidance
« Reply #3 on: July 09, 2014, 11:15:58 pm »
In that case, you have basically three options. First, you have to decide if you want to use keyframes or skeletal animations. The former is faster to process but uses more memory, the latter is the other way round. If you opt for keyframes, you can either use the md2 format (but i think exporting from Blender into md2 is kinda crappy if it's still available at all) or create single keyframes (http://www.jpct.net/wiki/index.php/Loading_3ds_Keyframes_from_Blender). If you go for skeletal animations, you can use Bones: (http://www.jpct.net/forum2/index.php/board,10.0.html, http://www.jpct.net/wiki/index.php/Exporting_from_Blender_to_Bones).

Offline rafaelsm

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Animation guidance
« Reply #4 on: July 10, 2014, 01:37:09 am »
I see, in that case I think I'll go for Bones, memory in android devices is a huge pain in the ass!

Thanks for the help!

Offline makvasic

  • byte
  • *
  • Posts: 2
    • View Profile
Re: Animation guidance
« Reply #5 on: October 15, 2014, 06:49:49 pm »
Depends on what exactly you mean by animation. Animation like a walking human or animation like an object following some path?

Hello,

Can you answer the other part of the question?
I'm having trouble translating object  to follow the curve path.
More precisely, I have curve object with moving texture and I need to put another object on top to move with the texture.
I tried with translation matrix but seems too complex, so I just want to know if is there any better way or solution for how it should be done?

Thanks in advance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation guidance
« Reply #6 on: October 15, 2014, 10:03:36 pm »
Can you illustrate this somehow? Curve object, moving texture...i think i don't get it...

Offline makvasic

  • byte
  • *
  • Posts: 2
    • View Profile
Re: Animation guidance
« Reply #7 on: October 15, 2014, 11:15:40 pm »
Well,

Try to imagine river that flows over the hill and leaf is in the water. Hill is object,
river is texture (which is not important I’m just changing UV coordinates with TextureMatrix to get moving effect)
and leaf is also an object.
So leaf follows flow of the river.
Of course you can assume that Camera is fixed.
I’m sending you embarrassing picture to get the idea, and hope it’s enough.

Thank you kindly for what you have done and still doing.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation guidance
« Reply #8 on: October 16, 2014, 08:23:24 pm »
I assume that the change in the texture's matrix is linear. So you could move the leaf linear with the same "speed" in the xz-plane. Then you can move the leaf up, so that it's on top of the plane, use http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#calcMinDistance(com.threed.jpct.SimpleVector, com.threed.jpct.SimpleVector) to calculate the distance from the leaf's position to the (curved) plane and translate it down by that amount. Remember to make the plane a collider (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setCollisionMode(int)) for this to work.