I always wondered how do many of the rpgs out there handle clothing pieces.
Say like in oblivion/skyrim/whatever rpg they would have a torso and below the waist, along with head hands and feet. Yet they are all animated and are attached fine. How does that work? I can wrap my head around attaching a boot, glove or helmet but when you talk about shirt and pants, it kinda blows my mind.
It might be some really simple process or easy process but I have never understood or been able to imagine how vertex weights, skeletal animation and attachment is handled inside of an engine. Tons of games do it but I am not even sure where to begin trying to understand or what types of terms I need to begin searching on understanding this tech. Any thoughts?
Rigid pieces like helmets are easy; just attach the helmet model to the head bone.
For pieces that need to flow naturally around the body, a lot of games swap out the entire body part – for example, removing or hiding a bare torso mesh with a spiky-armor torso mesh. They get even more mileage out of each mesh by using different materials (e.g., shiny gold spiky-armor material, blood-soaked black material, rusty iron material, etc.).
Both torso meshes are rigged to the character’s skeleton. In fact, in many games, the character model has every single possible equipment mesh already rigged. Most meshes are kept inactive; only the character’s current equipment is active.