Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Raeldor

Layered Clothing

This topic is 5214 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

Anyone have any tips of references on how to do layered clothing. I would like to create clothing that could attach to different size/shaped avatars. My first thought is to break the avatar up into pieces and replace the individual pieces that the clothing occupies. If I do that, then the clothing will potentially be a different shaped mesh (with different vertices). So will I have to have all new weighting on the clothing mesh to match the bones? To do this, do I have to 'rig' all my clothing too? Thanks Rael [edited by - Raeldor on June 7, 2004 10:44:10 PM] [edited by - Raeldor on June 7, 2004 10:44:46 PM]

Share this post


Link to post
Share on other sites
Advertisement
Interesting, so you think the way to go is to build this into the game engine rather than have the animations pre-canned in something like 3DS? Is this the way most developers are going these days?

Thanks for your reply.

Share this post


Link to post
Share on other sites
quote:
If I do that, then the clothing will potentially be a different shaped mesh (with different vertices). So will I have to have all new weighting on the clothing mesh to match the bones? To do this, do I have to 'rig' all my clothing too?

Yes.
And characters need to have identical skeleton structure too, which probably not a problem if you share a particular clothing for only one "race".

quote:
Interesting, so you think the way to go is to build this into the game engine rather than have the animations pre-canned in something like 3DS? Is this the way most developers are going these days

Depends on the game. We're working on a strategy game with a lot of characters with fancy clothing; and like most strategy games all animations are pre-canned, thus there's no need for real-time cloth sim.
You'll need it if you working on, for example, a fighting game or FPS that blends in some procedural animations (say, IK or ragdoll).

[Edit: added reply to the original question]

[edited by - yogiwp on June 8, 2004 1:57:21 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Raeldor
Anyone have any tips of references on how to do layered clothing. I would like to create clothing that could attach to different size/shaped avatars.

My first thought is to break the avatar up into pieces and replace the individual pieces that the clothing occupies.

If I do that, then the clothing will potentially be a different shaped mesh (with different vertices). So will I have to have all new weighting on the clothing mesh to match the bones? To do this, do I have to 'rig' all my clothing too?

Thanks

Rael





This is the common way of doing it. On the games that I've worked on where we have multiple types of clothing, they are all reweighted to the base skeleton so that they move properly with the character who is wearing them. We have also had, in a database that becomes code, information about which materials on the base skeleton can be hidden if you are wearing a piece of equipment. We used a 32 bit bitfield that we could test during rendering and if the player was wearing a helmet then you wouldn't need to draw the hair. This helps overdraw and fill but also avoids the 'hair poking through helmet' problem.

I've read a bit about and have done a little reasearch into a system that might let you do rough weighting automatically based on cloning the weighting from one object to a similiar object, but nothing really that good has come of it. If you are using 3DSMax, you might be able to use the Skin modified for weighting, which does everything using envelopes for rough weighting. Copying the weighting from one object to another, at least roughly, is as easy as saving out old envelopes, attaching a new mesh and loading envelopes back on it. From there you need to clean them up.

I wrote a tool in our company that lets the artists combine different pieces of clothing on models and run different animations, looking for poke through and other problems. I'm also thinking of adding a, albiet slow, mode that would check vertices in mesh A vs mesh B to see if there are any points lying behind the base player's skeleton.

A final point - If you are attaching it to different avatars, as long as they are simply scaled bones then the weighted mesh clothing should fit. In some games they make unique clothing models for each character race, but with clever naming conventions of your bones you may be able to share art across skeletons.

[edited by - Sphet on June 8, 2004 12:15:03 PM]

Share this post


Link to post
Share on other sites
I was having some more thoughts about this, and came up with another potential solution.

If you could keep the same number of vertices on the mesh with clothing as were on the mesh without clothing (but just shape them larger and maybe different positions for sleeves, etc.), then should it be possible to use morph blending to combine layers of clothing?

For example, I setup my base mesh. Then I take a copy, and shape the upper body to look like it is wearing a t-shirt. Then I take another copy of the base mesh and re-shape the lower vertices to look like trousers. Couldn't I then blend the base mesh and the other two meshes together when I wanted to show a character wearing trousers and a t-shirt?

This way it seems I would not have to keep re-weighting everything. Sure, I would have to add more vertices to the original model to allow shaping in certain places, but it could be a fair trade-off.

Has anyone tried this? Can you see any advantages/disadvantages?

Thanks again

Rael

Share this post


Link to post
Share on other sites
That's a good way to do it, that's the way it has been done for several games, it's a nice effect, you get quite a bit of customizeability.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!