Discussion about Equipping Items

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Discussion about Equipping Items

Post 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?
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post 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...
switch_case
Posts: 34
Joined: Sat Mar 08, 2008 12:46 pm
Location: Germany, FFM
Contact:

Post 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 ;)
if life could only be written in C++...
so much features, money++, remove_childs(), choose parents, life = new life, and no more <IDIOT> templates !
if you're looking for an nerdy coding language: http://lolcode.com/
Cardinal4
Posts: 97
Joined: Sun Jun 11, 2006 1:20 am
Location: SG
Contact:

Post 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... :?
Sketches of a rambling mind
Still a long way on learning Irrlicht...
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post 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.
TheQuestion = 2B || !2B
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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:
Image Image Image
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post 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.
TheQuestion = 2B || !2B
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post by FlyingIsFun1217 »

I love the Abs on that monster! ;)

FlyingIsFun1217
Jedimace1
Posts: 16
Joined: Fri Aug 01, 2008 12:59 pm

Post 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.
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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
Image Image Image
Post Reply