Cycles / simple Question

Hey there,

a simple question: I´d like to map a little icon on a plane (with uv-mapping). But as well I want to use a diffuse shader on the same plane. I tried different mix-shaders (mix, mix rgb etc.). But however I try it - either one of both materials (icon or diffuse) is invisible. Or the icon gets colored (lighter, darker, colored etc depending on the blending mode). So which node do I have to use to combine these two?

Or: If I try it with two uv-maps - how do I get a diffuse shade in the second uv-map?

Many thanks,

shading has nothing to do with uv mapping. for a shadeless something, use an emission shader and plug your image node into the color or the emission. same goes for glossy shader or diffuse.

But I don´t want to add specs oder any gloss. I´d like to set a base color on which I´d like to add an icon. Do you have any idea how can I achieve this?

thx again!

you can use different uvmaps for different textures, just use the ‘Input > UV Map’ node, it will let you choose which UVMap to use.

you can transform uv maps by moving, scaling and rotate them, with the Mapping node.

you can mix different textures with the MixRGB…

there are plenty of methods to choose. :wink:

Thanks for your reply! But like I said - if I do any kind of mixing a the texture with a difuse shader, it gets colored…

U need 2 materials.

The problem is your mix shader is left at 0.5. So it’s 50/50 of both inputs. This means the red is coloring it, albeit only 50%. Providing your icon has transparency you can use that as the factor, like in my example

Alternatively you could create a new black and white version of your icon, and use that as a mix factor.

Many thanks again. I already tried both, but unfortunatly it doesn´t work. (I already swapped the noodles at the mix shader, but that didn´t fix the problem neither)…

And I forgot to mention, that the png (the icon) doesn´t has an alpha chanel…

Well yeah without alpha that wont work. You need a way of distinguishing between which part of the plane gets what. If you don’t have alpha, make a black and white mask texture.

so it is impossible to give an object a diffuse shader and map a texture on certain faces? So I always have to mask the texture out of the diffuse shader?

I already have tried to do something like a matte (I use it quite a lot in after effects). But with which nodes I can create a matte?

thx again

Okay now I found a workaround for that special problem. In photoshop I put the icon on a 1024x1024 px png with alpha. Then the nodesystem you suggested works.

But again - if I just have png in the exact size of the icon: do I then have to mask out this part of diffuse material? If so - how do I mask in cycles?

many thanks again!

Supposing your png is the exact size of the icon, e.g. exactly square - in this case you wouldn’t mask - you would just subdivide the surface, and make only 1 face (e.g. in the middle) use a material for the icon, and the rest of the face a a different material.

Remember there are plenty of ways to mask, e.g.

This black and white texture has its own UV map and is used in exactly the same way as a mask. In this case it decides between a “painted metal” or a “shiney metal” that is supposed to look like scratches. It’s important to remember that masks can have use different UV maps to that which the other textures use. In my case the “painted metal” and “shiney metal” both have a different UV map that tiles.

This mask looks bad but it doesn’t matter since it’s only a mask - it was used to add subtle details to the wall on the left

With this in mind you could use a completely seperate mask to deal with the situation in your question. Going back to the original square…

In this case I created a black texture with a white bit. Then I unwrapped it so that the white bit is where I want the “icon” to go. I created a new UV map specifically for this mask texture. Then in the node editor for the material you do exactly the same, except this time you have an image as the factor

Though in this case you have to line up the icon mapping exactly with the mask. So while this approach is great for other purposes like my metal example, it’s easier to use 2 different materials assigned to individual faces in this case.

hey wow, thanks for that detailed descriptions. To understand it correctly, I´ll try to rebuild this! Solution 1 is pretty clear. Number 2 and 3 I´ll have to try by myself …

many thanks!!