Author Topic: Combining MD2 models?  (Read 2346 times)

Offline phlux

  • byte
  • *
  • Posts: 13
    • View Profile
Combining MD2 models?
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Combining MD2 models?
« Reply #1 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.

Offline phlux

  • byte
  • *
  • Posts: 13
    • View Profile
Re: Combining MD2 models?
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Combining MD2 models?
« Reply #3 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.