Jump to content
  • Advertisement
Sign in to follow this  
Falconite

Decals on Cloth

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

Hey Guys, I've been thinking of implementing decals on clothing. Basically, my character models have 'rough' polygony clothing on them. I need a way to add decals on certain areas of the cloth.(Like a logo on the arm, nike logo on the chest, etc). I may also like to extend this to be on other areas of the model as well and not just cloth(like scar on the face..etc). I've no experience on how to do this. Can anyone point me out to articles or give me a lead on how I may be able to go about it. Thanks. -Ken

Share this post


Link to post
Share on other sites
Advertisement
Decals on a rigid surface are easy, just put a polygon on the surface with the decal texture (e.g. bullet hole in wall) However, for moving geometry, you can use a variety of methods. You can have one texture, read only, for the base image, and then apply a second texture, on the top, which can be edited and have data added. This texture is updated every time a decal is added to the object. The texture is then texture mapped at the same time as the static one.

So, if your character can be shot and have bullet holes in him, use one texture for his clothing, and one texture for the decals. When a polygon is hit, find the corresponding coordinates for that position on the dynamic texture, and add a hole. You can save processing power by having the decals symmetrical in outline, and not worrying about rotating it when it is added to the dynamic texture.

Share this post


Link to post
Share on other sites
If you have relatively confined decal zones, you can define 'decal meshes' that use the models normal vertices and pose, and just just alternate 'decal' polygons on the same vertex set. Be sure to use z-offset or z-priority to enforce that the decals appear overtop of the clothing and model. This way you don't need any splatting or 'overlay' textures, which can consume a fair bit of memory or shader time if you have a lot of decals.

Share this post


Link to post
Share on other sites
Thanks for the reply ppl. speciesUnkown does talk of a good method and is worth considering.

I've also read(brief overview) of another technique which involves essentially unwrapping the base texture on the model and then painting over the areas on the texture where the decal should be applied(by locating the uv coordinates of the texture relative to the vertices in the model) and then rewrapping the texture back to the model.

Do any of you know more about this technique? Any thoughts?
Performance wise this seems better since we can have a hundred decals and it would still be just the same texture essentially. I'm not sure how much the compressing and decompressing calls to the GPU would take though.

Of course this technique would be done in the background while the player can just select the area on the model where the decal should actually go.

Thoughts?

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!