How do video games render different equipment on players?
Members - Reputation: 151
Posted 12 July 2012 - 12:02 AM
Crossbones+ - Reputation: 8001
Posted 12 July 2012 - 12:23 AM
1. Simple: change the texture color of different equipment (gold chainmail, iron chainmail etc.)
2. More adv.: change the whole texture to represent different materials.
3. Model: link new model to the character, often used for weapons, it can be expanded for most hard equipment like helms, breastplate etc. The original model have often special bones to which the additional equipment are attached to.
4. Diff. Models: overlaying models often introduce artifacts (intersecting models, animation artifacts etc.), therefore different body parts, wearing different armor can be modelled seperatly and combined in the engine. This is quite limited and expensive, but have the best quality.
My game: Gnoblins
Developer journal about Gnoblins
Small goodies: Simple alpha transparency in deferred shader
Members - Reputation: 108
Posted 12 July 2012 - 08:32 AM
Members - Reputation: 582
Posted 12 July 2012 - 11:12 AM
I overlay the different items and load up the new mesh that is appropriate. As Ashaman stated above, if you overlay with the complete nude body, you will have the mesh underneath poking through. (It also saves on resources as the head, neck, hands mesh has way fewer vertices.)
Each item of clothing I have has a property that tells the game which character mesh to load when it is equipped.
Edited by RedBaron5, 12 July 2012 - 11:12 AM.
Members - Reputation: 466
Posted 14 July 2012 - 11:08 AM
If gear is by slot and free to combine, lets say like Skyrim or diablo, the the usual way to do it is to cut your avatar in parts that will be occupied by the main gear pieces, say (to keep it simple) head, torso, legs and arms. If the player puts on a chestpiece, you completely replace the avatar's torso with another model that reprecents that chestpiece.
If the item doesn't cover the entire body, thats still part of the Item's model (keeping in mind that if you can have different skin colors, the revealed parts of the item must also be properly colored)
In the case of the head, some helmets reveal the face partially, others cover it completely, hair is most usually covered, so you may find it usefull to have a full head model, a full helmet model and a combination of face model with a partially covering helmet.
Same works for 2D
LinkedIn profile: http://ar.linkedin.com/pub/andres-ricardo-chamarra/2a/28a/272