When I use image textures in Blender, I create a new material with an image texture, then I select the mesh and in the bottom menu I select Mesh -> UV Unwrap -> Unwrap. This works perfect if the image texture must cover all the surface of the mesh, but what if I just want an image texture like a sticker on just a small part on the mesh in the center or close to a corner and could the image have a transparent background withh a png file format?
You don’t say which renderer you are using, I’ll assume you are using the cycles renderer
You can use multiple UVs, one for the base texture and one for the location of the decal. Use an Attribute node to select which you want to use for which texture. The Mapping node with Min and Max enabled will prevent the decal texture from tiling. Use the decal texture alpha channel as the colour mix factor
See
Attachments
decal.blend (287 KB)
Thanks for the information and file!
Hi again!
I have som further questions about the file you made.
-
What role does the Attribute node has?
-
I wanted to have the decal on a mesh and it’s surface. At first I didn’t thougth about it, but the surface has a material. And since the mesh belongs to a modern furniture I have a white glossy material with some reflections on it. I guess this “furniture” material must replace the base texture with the wood in your file?
-
Is it possible to save nodes/materials and just reuse some of them to a new material? I’m thinking of my furniture material that I want to move to your file and test.
-
When I create a new plane mesh and assign your material, I don’t know what to do after that? I’m used to select the surface in editor mode and then select Mesh -> Uv Unwrap -> Unwrap, but it’s not visible on the mesh! Is there another way I should use?
-
Does this also work on a mesh like a cube with several sides? I just want to assign the material with the alpha image on one side?
Preciate your help! Thanks!
- What role does the Attribute node has?
The two textures are using different UV maps. The attribute node assigns the UV map to use with the map name
- I wanted to have the decal on a mesh and it’s surface. At first I didn’t thougth about it, but the surface has a material. And since the mesh belongs to a modern furniture I have a white glossy material with some reflections on it. I guess this “furniture” material must replace the base texture with the wood in your file?
In place of mixing colours use a Mix shader mixing the shader of the base material with the material of the decal using the decal texture alpha as the mix shader factor
- When I create a new plane mesh and assign your material, I don’t know what to do after that? I’m used to select the surface in editor mode and then select Mesh -> Uv Unwrap -> Unwrap, but it’s not visible on the mesh! Is there another way I should use?
Your UVs control where the textures are applied. Set the correct UV Map names in the attribute nodes
- Does this also work on a mesh like a cube with several sides? I just want to assign the material with the alpha image on one side?
Your UVs control where the textures are applied