Game Development Community

Multiple meshes for player character

by Duke Schneider · in Torque Game Engine · 08/23/2003 (1:57 am) · 5 replies

I'm currently working on an avatar to replace the test guy.My intent is to have different meshes available for the character he could switch between in the event that new armor types are discovered in the game.
I was hoping to create 3 to 4 armor types that would need altered shapes. My first inclination is to have the four different meshes contained in one player.dts file. So for example the player starts out in the game wearing a default pair of pants and a t shirt. As the player journies in the game he might discover a pair of "armor type 1" upper legs. The player could then "equip" the leggings and the rest of the exposed body would still appear in the default pants and t shirt configuration.
Examining the player MAX file all body parts are named like "Submesh_lthigh145" or "Submesh_larm145"
I would create new body parts named "Submesh_larm155"etc. that could then be called to replace the current mesh for that body piece. Each armor type would have multiple png textures that would also be applied upon discovery such as a lower quality rusted piece or a high quality shiny texture.

Was hoping to hear opinions as to this being a good method. Or possibly something else like having multiple DTS files that would all be called and assembled to make the player.
ie: head.dts, torso.dts, lupperarm.dts etc.

#1
08/23/2003 (2:57 am)
I would do it by having multiple dts files, one for each armor type, then using mount points (like mount1 because mount0 is used for weapons), you could mount the dts onto the character, making it attach to him.. this makes it much easier to update and modify if needed later on. Plus its very simple to do (a few lines of scripting). You would just need to add mount nodes to your character on the chest, legs, arms, head, etc.. wherever you want to attach an object. For info on how to do this, you should look into how to make weapons, because it is very similar.
#2
08/23/2003 (3:02 am)
Hmm.. just re read your post.. and using mount points is a bit tricky if you want the parts to animate, because mount points just translate the object. It may need some engine modification if you want them to animate with the rest of the body. You _could_ do it through scripts using shapebaseimages to get the animations working, but that could be tricky to get it all in synch.
#3
08/23/2003 (3:35 am)
You probably should have a look at the following resource:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2150

It allows you to hide nodes of a segmented mesh.

Stefan.
#4
08/23/2003 (4:14 am)
Awesome link, thanks, As Dylan pointed out about the difficulty of modification was thinking that a way to keep the editing less painful would be to maintain 5 MAX files. The first four each having one "armor type" mesh and the fifth to have them all merged together for export allowing you to go back and edit in the first four and then remerge into the fifth.
I'm hoping to make the models(male and a female) my first resource contribution.

http://www.xierlikonx.com/images/textest.jpg
#5
08/24/2003 (10:55 pm)
Mounting shapes to a body is not always a good way to handle this case. We tried that in Populopolis and ran into a problem where the avatar's mounted hair wasn't in the exact same place as the avatar. We discovered it was happening because the hair shape was having it's position updated by passing it's coordinates over the network.