Page 1 of 1
Looking for a book on programming skeletal animation code?
Posted: Tue Nov 11, 2014 8:38 pm
by Ganemi
Is anyone aware of such a book? I found a book, and it seems legit. Anything in C and OpenGL would be welcome.
http://www.amazon.com/OpenGL-Developmen ... hongrou-20
I kinda want to see if I can do something similar for Q3. I know IoQ3 has something similar, but I wanted to try on my own.
Am I looking in the right direction?
Re: Looking for a book on programming skeletal animation code?
Posted: Wed Nov 12, 2014 7:55 am
by Eraser
Quake 3's md3 format doesn't do skeletal animation. It uses a vertex animation system.
Re: Looking for a book on programming skeletal animation code?
Posted: Wed Nov 12, 2014 1:50 pm
by Ganemi
Oh, I understand that. I'm interested in learning how to create something skeletal, like MD5 or the ioq3 version in C.
Re: Looking for a book on programming skeletal animation code?
Posted: Wed Nov 12, 2014 5:56 pm
by D-Meat
ioQuake 3 supports IQM model format, which features skeletal skinning and animation. But I don't know if anyone managed to export and make run a rigged and animated skeletal model yet.
Here's some quick infos and documentation :
http://sauerbraten.org/iqm/
I succeded in importing some static IQM model last year

I'm very interrested in your quest ! please share your progress
I recommend you to read and follow the stuff made by David Rosen at Wolfire Games on his game Overgrowh :
http://blog.wolfire.com/, and his latest GDC talk is actually quite impressive !
http://blog.wolfire.com/2014/05/GDC-201 ... tion-Video
Re: Looking for a book on programming skeletal animation code?
Posted: Wed Nov 12, 2014 7:43 pm
by Ganemi
Awesome. His stuff is kind of amazing. It's largely what's made me interested in learning about trying to see if I could learn skeletal stuff to bring something robust to Q3A, as a learning project.
I guess I need to search for something like this:
http://www.amazon.com/s/ref=nb_sb_noss? ... n%20opengl
But I'm not certain which one might be the most useful. Guess I need to dig through reviews, huh?
Re: Looking for a book on programming skeletal animation code?
Posted: Thu Nov 13, 2014 5:47 pm
by D-Meat
Yeah, and maybe digging tutorials on rigging characters in 3D software can make you aware of how the skinning / weight painting / skeleton setup is made, as well as the constraints, direct & inverse kinematics, controllers ... work. I use Blender to do stuff, and I'll be learning about this in the coming weeks.
If you don't know about Quaternions, it might be a good thing to read about it also

I don't have a scientific background so I struggled a lot to implement them, but in the end, once you have working conversion tools, I guess you can think back with traditional euler angles
When David Rosen said that inverse kinematics were simple trigonometry, I thought 2 seconds and, yes, it's basically as stupid as that

Re: Looking for a book on programming skeletal animation code?
Posted: Sat Nov 15, 2014 11:34 am
by D-Meat
Oh and take a look at renderergl2/tr_model_iqm if you're looking for some info on how the skeletal stuff is handeled !
One question I'm asking myself is how much can be done to control bones (or joints if you use the IQM terminology) from the cgame code

Re: Looking for a book on programming skeletal animation code?
Posted: Mon Nov 17, 2014 6:27 pm
by Ganemi
Thanks. I've done a lot of 3D stuff in the past, but have always been more interested in writing code that immerses players. Take the way characters in Q3 would lean if moving really fast. That kind of thing was always pretty interesting to me. 3D still is pretty relaxing to do, but I've never fully had my heart in it.
Why do you think you wouldn't be able to control bones from the gamecode?
Re: Looking for a book on programming skeletal animation code?
Posted: Wed Nov 19, 2014 9:23 pm
by D-Meat
As far as I've understood -I'm not sure-, the game code only sends to the renderer the frame number of the animated md3, or actually the current two active frames (start, end) and a value that linear interpolates between them.
Since torso and legs are separated, they are treated as different render entities, with that "current animation frame" parameter only ...
Now that what we want to do is to have a single 3D object but that can have fixed animations + procedural animation (dynamic head orientation, the basic thing), I don't know if this can be handled ! Maybe it will be necessary to add a new "trap" function to deliver more complex info to the rendering engine
Cool Character ! I'm also working on a 3D character for a music clip right now

it's always quite tough when you don't do it every day !
Re: Looking for a book on programming skeletal animation code?
Posted: Mon Dec 01, 2014 5:57 pm
by Ganemi
I barely understand what any of that means. Actually, I just bought that book you mentioned in the other thread. Focus on Modding in Quake 3. I quite like it, but sometimes I get errors that make me wonder if you can debug with Q3 like you could with ET:QW. Also, that mod you were working on with 6dof? Have you made any progress? Doing something like that is basically why I'm even bothering with THE Q3 code anyway. I wanted to do something like that with ET:QW but I ran into some issues. :/
Thanks for the compliment on the character. She's basically an antagonist for a story. It's kinda hard striking a balance between doing art and trying to figure out how to get really good at programming.
Re: Looking for a book on programming skeletal animation code?
Posted: Tue Dec 02, 2014 8:29 pm
by D-Meat
Ganemi wrote:I barely understand what any of that means. Actually, I just bought that book you mentioned in the other thread. Focus on Modding in Quake 3. I quite like it, but sometimes I get errors that make me wonder if you can debug with Q3 like you could with ET:QW. Also, that mod you were working on with 6dof? Have you made any progress? Doing something like that is basically why I'm even bothering with THE Q3 code anyway. I wanted to do something like that with ET:QW but I ran into some issues. :/
For my 6dof project, I actually had to modify some stuff in the client's source code and add some math operations (to handle quaternions). As a result, I don't think it can be released as a mod working with vanilla Quake 3 ... The project is in the junkyard atm, I've put my game projects on hold. I thought a little bit about it recently, and I think it could be interresting to try to finish it, now that I have more experiece. It'as also a project that would not require to much assets to prepare. But I don't know if the game will be enjoyable
As for debugging, I'm really far from pro, and I just add printfs all the time (G_Printf() for server game, CG_Printf() for client game side, Com_Printf() for everywhere else).
Ganemi wrote:Thanks for the compliment on the character. She's basically an antagonist for a story. It's kinda hard striking a balance between doing art and trying to figure out how to get really good at programming.
I'm also aiming for that, but it's quite tough

Actually, on my most recent project "Amon Drul", I also tried to work the sound effects myself, but it turns out I'm not good and imaginative enough, so next time I'll try to find someone to work with
The hardest part is actually keeping faith in your project and yourself ! With energy and will, anything is possible !
Do you have a blog or a thing where you share your progress ?