www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: phlux on July 30, 2013, 04:55:10 pm

Title: Combining MD2 models?
Post by: phlux on July 30, 2013, 04:55:10 pm
Hello!

I've already tried the search but to no avail. Right now I'm just playing around with the engine and have a look at whats possible and what not. I've seen that the engine supports loading MD2 models and also playing animations. However the models don't hold any weapons in their hands and my question now is, if there is a way to load two models combine them and play a skeletal animation?

For example let's say you have a MD2 model of a knight and also a model of a sword, can you add it programatically to the hand of the knight and the character model uses it correct in its animations?

Thanks in advance
Chris
Title: Re: Combining MD2 models?
Post by: EgonOlsen on July 30, 2013, 08:55:31 pm
Quake2 model do this all the time, simply by having two separate models for the player/npc and the weapon. The animations are created in a way that the same animation index applied to both makes sure that they are aligned. If the animations of a weapon and body don't match, there's not much you do in code to fix this.
Title: Re: Combining MD2 models?
Post by: phlux on August 01, 2013, 03:36:05 pm
Thanks for the reply. So when I create models and weapons I need to align them so it looks like the model holds the weapon and make them share the animations.
Title: Re: Combining MD2 models?
Post by: EgonOlsen on August 02, 2013, 09:42:34 am
Basically. However, i normally have to do the alignment in code (because it somehow never fits). But that animation itself has to fit.