A way to "fold" a texture on a mesh?

I want to create an effect of inserting a texture on a mesh, like if you were sticking a stamp on a cube.

Please note that this is not a texture projection: in a projection the texture is scaled to fit the projection area, in my case I can’t change the texture area. This is a projection:


See how the smiley is being stretched in the right side of the cube? This is not what I need.

What I need is to “fold” the smile texture. The only way I thought of doing this is having a mesh with the smiley and somehow frame (mold) it on the cube, like a cloth. How do I do it? Is there an easier way?


One important thing I forgot to mention.
A simple solution would be to copy one texture into the cube’s texture by using GetPixel and SetPixel. Unfortunately this doesn’t work in my case, since the cube UV mapping has each face pointing to a different part of a texture atlas. So, when I use this technique I end up with half smiley in the right face and the other half somewhere else.

maybe you should consider using a second UV-set.
you will have to write a shader to blend the smiley with the second uv.

here i created an image with my awesome photoshop skills. it’s just to elaborate, not sure if this is what you need.
left one might be any uv set, right uv-set allows folding of a picture on the side of a cube