A question I am not completely sure how to ask

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
eeheeehe
Posts: 22
Joined: Tue Sep 28, 2004 3:33 am

A question I am not completely sure how to ask

Post by eeheeehe »

Is it possible to set up a mesh so that you basically have an avatar, Then if you equip something onto the avatar, it shows up on the screen as being attatched to the avata? A good example of my question is the first and third person cameras in Elder Scrolls III: Morrowind, where you attach a weapon to a hand, clothing to the body, hats to the head, etc. without having to use a different model for every combination of items and models. If it is possible, can anyone tell me how to do it, or to impliment it? Any help would be appreciated, thank you.


Legal Note:
From http://www.zenimax.com/legal_info.htm:

The Elder Scrolls III: Morrowind®
© 2002 Bethesda Softworks LLC, a ZeniMax Media company. The Elder Scrolls, Morrowind, Bethesda Softworks, ZeniMax and their respective logos are registered trademarks of ZeniMax Media Inc. All Rights Reserved.

Ronin
Posts: 116
Joined: Wed Mar 03, 2004 6:23 pm
Location: Germany

Post by Ronin »

I am no artist, but I think what you want to do is specify joints in your avatar model and attach other models to the position of the joints.

Someone with more knowledge in this than me should it explain to you, but to generally answer your question: Yes, it is possible with irrlicht.
Plateau

Post by Plateau »

Yeah... This is a problem...

I have attached a hat to a model... And the body armour... This was easy...

But have no idea how to attach a weapon to arm...
Plateau

Post by Plateau »

By the way... By the end of my hard tryings I figured out that its better to have all the possible models (like model w/wo helmet, model w/wo mgun and ect) and not assigning different models inside the code...

I had two programs:
1) Sydney with assign helmet
2) Sydney with drawn helmet

Second one saved me around 10FPS...
dingo
Posts: 95
Joined: Tue Mar 09, 2004 5:02 am
Location: Brisbane, Australia
Contact:

Post by dingo »

If you are using bone animation you can have the hand a separate node and just make the weapon a child node of it with a zero offset.

It all comes down to knowing where the hand is and what direction it is facing. If your avatar is static or moves very little (like the marine's face in Doom I and Doom II) then you could pretty easily know where the hand is without using bones.
-= Want your C code to control real life robots? www.users.on.net/~symes =-
eeheeehe
Posts: 22
Joined: Tue Sep 28, 2004 3:33 am

Post by eeheeehe »

Thank you all, I will look into all of these solutions as soon as I get the chance. But just to clarify, I do intend most of the items I assign to a character to be on something that moves a lot. (Hats or hair or both on a head, shirt on a body that moves, pants, mace in hand or on waist, etc.) But for the sheer amount of objects that I want to include, I really do not think that a different model for each combonation is feasible for the project. There would be a set for the head, a set for that set, a set for the body, a set for the left arm, a set for the right arm, a set for the left leg, a set for the right leg, a set for the left foot, a set for the right foot, a set for the left hand, a set for the right hand... and with about 100 items ( at least ) for each group, that would be about 1100 models for the items, and ones for each body part being naked...
dingo
Posts: 95
Joined: Tue Mar 09, 2004 5:02 am
Location: Brisbane, Australia
Contact:

Post by dingo »

It sounds like you have no choice but to implement a bones animation system.

If you were incline to reduce the number of objects to just hand weapons and included the hand postition in each key-frame animation that would work too.

Also realise that q3 models are broken into three parts, head, torso, legs. Each can be model independantly and combined to suit your purpose on each occasion
-= Want your C code to control real life robots? www.users.on.net/~symes =-
eeheeehe
Posts: 22
Joined: Tue Sep 28, 2004 3:33 am

Post by eeheeehe »

Solution 1: Bones Animation System
Does irrlicht support bone animation? if yes, how do I access it, if no, how do I impliment it?

Solution 2: Reduce number of objects
This could possibly work, but would require some strange rotation code that I don't want to think about until I decide on how to make it work in the first place.
dingo
Posts: 95
Joined: Tue Mar 09, 2004 5:02 am
Location: Brisbane, Australia
Contact:

Post by dingo »

eeheeehe wrote:Solution 1: Bones Animation System
Does irrlicht support bone animation? if yes, how do I access it, if no, how do I impliment it?
Try seraching in these forums to find out the latest and best way to do bones.
-= Want your C code to control real life robots? www.users.on.net/~symes =-
Post Reply