Re: How to “wrap” a texture around a mesh


Forums > Jitter > How to "wrap" a texture around a mesh
January 12, 2013 | 12:19 am

Ok. Sorry, I clicked on "Send Post" at the wrong time!

Anyway, I was talking about the "texture wrap" effect which I’m trying hard to obtain…. I’m attaching a picture just to clarify. It’s just a jit.gl.gridshape with an attached texture.
[attachment=212227,4871]
So, as I said above, I’d like to achieve the same effect on a mesh that has the shape of a body. Like having a big piece of paper wrapped around the body. As Wes wrote, I need to generate a texcoord array that changes following the movement of the body, but I’m still stuck on that. What I got so far (se patch above) is always some sort of "magnifying glass effect", in which the body reveals and deforms a static image.
If I understood correctly I should try to get the correct texcoord from the depthmap of the kinect, but I can’t get this part to work.
Please correct me if I’m wrong and forgive my stubbornness.