Page 1 of 1

Discussion about Equipping Items

Posted: Thu Apr 03, 2008 8:08 am
by krama757
Hmm, so I am at a point in my game where I am trying to develop the equipment management systems.

I have a basic inventory working with items that you can drag into slots etc. Equipping and dropping is working fine in a theoretical sense.

But I have been thinking about how to attach items to the actual mesh and need you guys to help me out with suggestions.

---------------------
The question at hand is: Given a character mesh, what is the most efficient way of displaying items?
---------------------
The way I see it, the best way would be to have a base texture for any upper and lower armor you use. This base texture would be applied to the character when they equip an upper or lower armor.

Then, any parts that arent "hinges" (such as elbows and knees) can have their own mesh which is attached to a part on the character. Those "hinges" will always only show the base texture described above.

Please view this picture:
Image

This seems to be how most games do it and it is quite true to life. However, it doesnt allow you to customize EVERY single part of the armor.

Do you guys have any ideas?

Posted: Tue Apr 08, 2008 12:40 pm
by xray
However, it doesnt allow you to customize EVERY single part of the armor
I didnt understand why it shouldnt allow customize any parts? Or what parts do you mean? Could you explain it another way please, so I can think about it...

Posted: Mon Apr 21, 2008 8:14 am
by switch_case
you should have fixed points on your node, where weapons apperar, if equipped. of course those points are not visible, and have to move, if the node moves. understand my idea? :?
for example a sword equipped on the back. one point on the upper back, one point on the lower. if your hero or whatever is doing a step forward, the point will have to move with him, and the swords postion is the new position of those 2 points, upper and lower.
maybe you can do that with a second (invisible) mesh layed over the first one, but only consisting of those points.

the easier way would be to create a new texture for every weapon, but that would be boring, don't you think ;)

Posted: Mon Apr 21, 2008 10:21 am
by Cardinal4
I've been thinking along these lines as well, and my main issue was, the base default [nude] mesh is still going to be processed, which is really unnecessary since parts like his abs are going to be obscured, but yet there isn't a nice way to perform manual culling on the programmer's part either.. Just to throw in a consideration or two... :?

Posted: Mon Apr 21, 2008 10:40 am
by JP
Well you can cull on the programmer's side... But it's not supported by irrlicht so you'd have to write it in yourself.

On playstation 3 there's some culling which works using the depth buffer so you draw everything front to back (nearest to camera first, furtherst from camera last) and so anything that's obscured by objects in front of it won't get rendered. Apparently it works very well! I've yet to set up my rendering to make use of it properly though.

Posted: Mon Apr 21, 2008 12:13 pm
by Halifax
Yeah, JP I was wondering, because Insomniac Games talks about using that library. But they use the library specifically to build their own custom visible sight data.

So they render all their levels on the PS3 to retrieve the data for the algorithm. It's pretty ridiculous though, they say for one level in Resistance it takes about 1 whole day to render all the data to a set, and compress it.

But yeah they say the culling library is pretty good.

Posted: Mon Apr 21, 2008 12:47 pm
by JP
That's the thing about big games like that with such high quality models and textures and huge amounts of code.. it takes forever to actually do anythign... you just hope you don't gently caress up the code and have to do a pretty big rebuild :lol:

Posted: Mon Apr 21, 2008 2:18 pm
by Halifax
Haha, yeah, and it sucks when you have to change that data based on how the level is modeled. (Which is like changed everyday.)

I honestly would like to know of how Crytek did their realtime occlusion culling.

Posted: Mon Apr 21, 2008 10:27 pm
by FlyingIsFun1217
I love the Abs on that monster! ;)

FlyingIsFun1217

Posted: Wed Aug 13, 2008 11:40 am
by Jedimace1
Well, one technique that is pretty common if you only have a few characters that need to be equipped, is to use bone animation. Then you just replace the vertices on a bone to match the object you want it to be. This idea works with animations and is pretty easy and straightforward. So you have the weapon be a bone in the character model, then when it is loaded in, change the bone to the model you want. I don't know exactly how to go about this in Irrlicht, but I'm gonna have to do it too.

Posted: Wed Aug 13, 2008 11:47 am
by JP
Attaching an object to a bone seems much more sensible than 'replacing' vertices.... That's how it's done in irrlicht anyway, using the parenting system.

Plus replying to a post that's 4 months old is a bit strange isn't it? :P