Discussion about Equipping Items
Discussion about Equipping Items
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:
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?
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:
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?
-
- Posts: 34
- Joined: Sat Mar 08, 2008 12:46 pm
- Location: Germany, FFM
- Contact:
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
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/
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/
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...
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.
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.
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.
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
-
- Posts: 219
- Joined: Fri Apr 13, 2007 8:29 pm
- Location: Illinois
- Contact:
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.