How character customization work?
For example, in the character mesh might be a bone named 1-Hand Weapon, which represents the weapon the character is wielding in one hand. A bone is merely a set of transformations, relative to its parent chain. If a sword mesh is "attached" to the bone, it derives its transforms (rotation, translation) from the corresponding bone, resulting in a translation and rotation of the mesh to its proper location in the character's hand.
If you support multiple bones per mesh, with vertex weighting, you can achieve crude representations of some effects, like a cloth cape or cloak that sways as the character walks, etc...
In 2D sprite-based games the task is a tad bit trickier, requiring pre-rendering of all pieces of equipment, and all nodes of customization (hair, face, etc...) in all frames of all poses, perhaps with additional depth-type information to aid in correct "stacking" of nodes to composite the final image, if you are having a hard time coming up with a sane draw order that handles overlap well.
It's a combinaiton of three basic operations.
Lip color, skin color, tattoos and such are generally made by blending textures together. You might have a tattoo in a separate texture, then you simply blend it ontop of the skin texture at the correct position.
Height, "fatness", muscularity, and other body type changes can be done by scaling the appropriate bones in the skeleton.
Facial expressions are generally done with blendshapes (vertex/uv morphing).
One of the difficult parts is to make everything fit together without cracks or overlaps. For instance, it's not very nice if the ears of your character goes right through the helmet.
Bone scaling can have an adverse effect on animations. For instance, if you make your character's shoulders wider you still want his hands in the same position if he's wielding a two-handed sword. A walking stick should always reach the ground regardless of the height of your character. Etc...
Some of these problems are pretty easy to solve, but all in all it's a lot of work.
To reduce complexity, most systems only use a few base meshes and does most changes with texture swaps. So for instance, you have your basic armor mesh and then you apply a metal texture or a leather texture depending on the armor type.
thanks for answering my post guys, are there any sample source or tutorials, resource or books that handle such topics?
need to study how to do this.
Thanks!
I've often wondered about this myself, not with hats and weapons and things that can be attached relatively easily, but with different character combinations. (These are things that can merely be attached to an attachment point of a specific matrix in the bone structure.) Like, how do you allow the same character to have multiple outfits or give the same armor to many different heads and not have massive gaps between pieces where they don't line up? Do you have a head mesh and a separate body mesh for each outfit? If so, how do you get the neck to line up? Do you merely establish rules as to where the vertices will be which attach the neck to the body so that they will be guaranteed to line up? And the lower body, how do you allow for several different torso and pant combinations? Does this mean that sometimes you will have hidden vertices or even triangles that will never be seen with certain combinations? In some games would you have an armor mesh that covers up but still draws the body mesh which is now covered and can no longer be seen or do you use completely different meshes for the armored and unarmored version of the character or otherwise try and optimize so that things that cannot be seen are not drawn?
7 years between asking the question and checking on the answers; possibly a new record for the internet.
There's an Unreal asset available: https://www.unrealengine.com/marketplace/modular-characters-blueprint
A discussion on Polycount: http://polycount.com/discussion/91509/mutant-little-league-team-skankerzero
But on the whole I think it's important not to overanalyse it. You want things to change, so... change them. Probably 90% of what you want can be done with model, texture, or shader parameter swaps. What works for you will depend as much upon the art style as anything else.
7 years between asking the question and checking on the answers; possibly a new record for the internet.
There's an Unreal asset available: https://www.unrealengine.com/marketplace/modular-characters-blueprint
A discussion on Polycount: http://polycount.com/discussion/91509/mutant-little-league-team-skankerzero
But on the whole I think it's important not to overanalyse it. You want things to change, so... change them. Probably 90% of what you want can be done with model, texture, or shader parameter swaps. What works for you will depend as much upon the art style as anything else.
wow i thought it was just like a year or two, sorry got busy with lots and lots of projects, my original project that involved this feature got side tracked, and i focused on some 2D game instead to earn some :)
thanks for the link, ill check on it!
It's worth exploring MakeHuman, given that it's free and available to study. It's not exactly how you'd accomplish the same thing in most game engines, but the core principals of blend curves and texture maps are the same.
edit: I did not notice this thread was from 2009.
I did not notice this thread was from 2009
Since the person necro-ing it was actually the original poster, I think it's a rare example where this is okay!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.