LWJGL Forum

Programming => OpenGL => Topic started by: Lightbuffer on May 23, 2017, 08:12:35

Title: How to implement simple skeletal animation
Post by: Lightbuffer 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 (https://www.khronos.org/opengl/wiki/Skeletal_Animation) or here (https://lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content/chapter19/chapter19.html)? Or is there a simpler way to implement such animation?

Thanks for attention!
Title: Re: How to implement simple skeletal animation
Post by: Zin on May 23, 2017, 20:24:16
i recommend https://www.youtube.com/watch?v=f3Cr8Yx3GGA&list=PLRIWtICgwaX2tKWCxdeB7Wv_rTET9JtWW
Title: Re: How to implement simple skeletal animation
Post by: Lightbuffer on May 24, 2017, 11:23:11
Quote from: Zin on May 23, 2017, 20:24:16
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! :)
Title: Re: How to implement simple skeletal animation
Post by: josephdoss 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.
Title: Re: How to implement simple skeletal animation
Post by: Evan407 on June 22, 2017, 04:48:24
Quote from: Lightbuffer 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 (https://www.khronos.org/opengl/wiki/Skeletal_Animation) or here (https://lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content/chapter19/chapter19.html)? 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.