- Home /
Mapping 2d texture onto another 2d texture
I'm trying to figure out a way to have a 2d texture map onto another 2d texture. I have a 2d body sprite and then 2d clothing sprite. Rather than drawing the clothing for each body type, is there a way to wrap the 2d texture to fit this 2d body sprite?
Any suggestions or starting points would be greatly appreciated, preferably c#.
Rather than drawing the clothing for each body type
An image or two might be helpful. Are you talking about a single clothing image that fits different bodies, or does the image have to change? Are you taking about individual pieces of clothing, or just a single suit of clothing?
@robertbu what I mean is that if I have several body types, rather than drawing the clothing for each body type, ins$$anonymous$$d I mesh the clothing texture onto the 2d body sprite.
This for example is an outline of one body. http://i.imgur.com/YlRwpWQ.jpg Ins$$anonymous$$d of drawing a clothing texture to fit it perfectly, I'd like to bend/warp that texture so it fits onto the body. It would require some parts of the clothing sprite to be stretched and other parts to be compressed.
Unity built-in functions for manipulating textures are almost non-existent. In theory you could build your functionality on top of Unity's primitives, but it would be major piece of work.