Jump to content
  • Advertisement
Sign in to follow this  

3d model clothing programming

This topic is 2924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I'm making a game where I'd like to have the user able to change clothes
on the main character model.

How do I best go about this?
The clothes will of course have to move like the character moves.

I'm guessing one approach would be to properly map up and name the vertices (with prefixes) of the e.g pants,
and maybe programmatically have the different bones give weight to the vertices?
I've animated the character model with bones.
But this sounds very messy to me.

There has to be some easy (generic) way of making this simple in 3ds max, which I've made the model in?

Maybe programmatically make the different vertices move according to their closest vertex from the player object?
Leaves a lot of room for error...?

Thanks for your replies! :)


Share this post

Link to post
Share on other sites
In games this is mostly done by creating different models, like some new pants, which are skinned to the same skeleton.
You basically update the transformations of the bones of the character representing the pants with the main skeleton's transformations for those same bones.
And you then render a collection of these clothing items.

Often a higher level system is built on top of that, to determine which clothing items are overlapping others, so that they can be removed.
For example a t-shirt below a jacket might not be visible as you only see the jacket.

So basically its very simple, just copying over the bone transformations of the main character to the same bones in the clothing items.

Of course you can go more complex as well, if you want to prevent specific triangles in some pants penetrating the boots the character is wearing.
So you could also introduce clip planes to clip the pants mesh so they dont go through the boots, etc. But 99% of the games don't do such thing

So to summarize, you do this:

1.) Update main skeleton, which has no meshes, or just a naked body.
2.) For all clothing items, copy the bone transforms of the main skeleton to the specific clothing item
3.) Render all clothing items using those new transformation matrices for their bones.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!