LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: How to implement simple skeletal animation  (Read 418 times)

Lightbuffer

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
How to implement simple skeletal animation
« on: May 23, 2017, 08:12:35 »

Hello there! :)

I'm starting working on a low-poly 3D game, but before I can actually start working on the games, I need some basic game engine. I'm working with LWJGL3.1.1 and OpenGL3.3. My requirements for skeletal animation doesn't really require dynamic per vertex animation, rather something like Minecraft-ish animations where each box rotates all its vertexes around its given origin (anchor), but also preferably with relationship of one parent box -> one or more children boxes.

Should I go with "traditional" (as far as I understand it's the traditional method) method like described here or here? Or is there a simpler way to implement such animation?

Thanks for attention!
Logged

Zin

  • Newbie
  • *
  • Offline Offline
  • Posts: 15
Logged

Lightbuffer

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: How to implement simple skeletal animation
« Reply #2 on: May 24, 2017, 11:23:11 »

i recommend https://www.youtube.com/watch?v=f3Cr8Yx3GGA&list=PLRIWtICgwaX2tKWCxdeB7Wv_rTET9JtWW

So, I guess there's no easier way than implementing it as traditional skeletal animation... Thanks for the link! :)
Logged

josephdoss

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
Re: How to implement simple skeletal animation
« Reply #3 on: June 21, 2017, 13:04:39 »

I ended up having to use quaternions to calculate my joints, and then to calculate the skin vertices from it. It's a real headache to figure out, but I think it's how the pros do it and it really is worth learning. Your second link discusses it a little. If you're talented with geometry shaders, you can calculate all the skin in the GPU.
Logged

Evan407

  • Newbie
  • *
  • Offline Offline
  • Posts: 40
Re: How to implement simple skeletal animation
« Reply #4 on: June 22, 2017, 04:48:24 »

Hello there! :)

I'm starting working on a low-poly 3D game, but before I can actually start working on the games, I need some basic game engine. I'm working with LWJGL3.1.1 and OpenGL3.3. My requirements for skeletal animation doesn't really require dynamic per vertex animation, rather something like Minecraft-ish animations where each box rotates all its vertexes around its given origin (anchor), but also preferably with relationship of one parent box -> one or more children boxes.

Should I go with "traditional" (as far as I understand it's the traditional method) method like described here or here? Or is there a simpler way to implement such animation?

Thanks for attention!
I implemented bones and animations with my own code. Then interpolation between the tweens or moments or whatever they are called. Time length of each moment.
The bones also have a child parent structure. One bone's transformation matrix is passed onto its children and the children bone is rotated about its parent bone. It is complicated but I found it easier to make my own formats.
Logged