Jump to content
  • Advertisement
Sign in to follow this  
S41NT

One model, several parts. How?

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working on how to warn the game-engine user that a specific part of the entity was hit (like head, right leg, left wing). So far, the game developer has to create a different entity for each different part and change the parts of the same element together to keep the animations synchronized. I wanted to make this whole process easier for the developer. And I'm looking for ideas, tips, papers, websites, etc to help me figure out the best way to do it. So far, I'm considering something like a scene node (don't know if I should use scene nodes without any change or make a special scheme for entities). The developer will add models to the entity and then use the entity as just one object. When a collision is detected (for example), it will return the object and the sub-object to the user. I also thought that I could have just one visualization model and several other very very simple overlaping models for physics and collision detection computations moving along with the one used for visualization. Performance is a major concern. So... Any ideas? Anyone knows how the big, famous, expensive game-engines work? Thanks

Share this post


Link to post
Share on other sites
Advertisement
in halflife you could attack bodygroups submeshes which could be activated when needed

in quake3d i think these bodygroups are attached to "tags"

search for the md3 modelformal specification these plenty of information about this topic

basically its just a submesh/model which is enabled when you decide to display it

Share this post


Link to post
Share on other sites
if you are speaking about skinned meshes(players) than you can check for collision with the bone bounding boxes.

regards,
m4gnus

Share this post


Link to post
Share on other sites
Quote:
Original post by Basiror
in quake3d i think these bodygroups are attached to "tags"

search for the md3 modelformal specification these plenty of information about this topic


Just FYI: You are correct in that Quake 3 Models we're tied together by tags, but they had nothing to do with hit-detection, just positioning information. Sadly, Quake 3 (and oddly enough even Doom 3) had no locational damage. Shooting someone in the foot did just as much damage as shooting them in the head. Doesn't matter much if you're blasting away with a rocket launcher, I suppose...

In any case, like m4gnus said: if you're animations are skeletal based, just use that for hit detection. There's a nice visual example of this kind of system Here. With something like this, and if you're artist named the bones, it should be relatively easy to return the bone name that the hit was associated with. "Head", "Upper_Left_Arm", "Tail"... Whatever.

Share this post


Link to post
Share on other sites
I don't know much about models. My engine is currently using md2 models, which, as far as my knowledge is concerned, do not have skeletal information. I suppose I could export the skeleton in a sepparate file? md3 models include skeleton information?

Share this post


Link to post
Share on other sites
I'd second the bone method. I'd think the best way to do it would be to either directly check the bones bounding boxes if you're not too fussed about accuracy, or otherwise to check which face has been hit and either apply damage to all sections (bones) that influence the face, perhaps proportionally to the influence, or you could simply apply damage to the bone with the largest influence.

Using this method you'd simply have to come up with a way of assigning body areas to the bones so you know what to do with the resultant damage (headshot = insta-kill or leg shot = movement reduced, etc).

Cheers,

Steve

Share this post


Link to post
Share on other sites
Hummm.... Ok. In a few days I should start coding this, let's see how it goes. If I have any problems, I'll post again.

Thanks.

Share this post


Link to post
Share on other sites
Quick note before you jump into it: The md3 format from Quake 3 does not use skeletal animation! It's basically an updated version of the Quake 2 format. The first ID game to use skeletal animations is Doom 3 (the md5 format). I think there was an md4 somewhere in between, but it's pretty obscure.

Share this post


Link to post
Share on other sites
you could use the .mdl format from halflife its pretty easy and uses bones but it does not support vertex weighting

Share this post


Link to post
Share on other sites
I use the Blitz3D b3d-format. Its small, compact and it supports just about anything - skeletal animations included!
But I should warn you, skeletal animation is a tricky thing to learn! I my self am struggling to get a working implementation goin at the moment.

If you are not too comfortable with the subject, take a look at my thread: Problems with skeletal animation.
And you should look into matrix and vector math aswell! Its complex stuff...

Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!