Applying specific properties ONLY to masked texture areas

hello guys,

I was trying to verify one texturing aspect.

let’s say I would like to create a plane which has fully reflective and fully opaque areas as well.
(it’s not the real life case I am working on, but it should simplify the example)

if ia create a material with Mirror -> reflectivity property I can jusst obtain a reflective material despite I use a texture to (try to) modulate the reflectivity effect.
I thought infact that using an underlying B&W texture could be the way to obtain what I looked for: I have used a procedural grayscale texture to map Mirror and ray mirror.
but it didn’t work as expected since, as said above, the entire material is reflective not just the textured areas.

is there any non-nodes way shall i use?
(at the moment I am still using external yafaray renderer and cannot use node composition)

ty and bb

The key is using the ‘stencil’ feature. substitute your mask for the first texture.

thank you for the time spent providing a blend file as well!

secondly, let me better understand this feature which I was exploring and applying myself on yesterday and which your file seems to somehow confirm:

in order to have “localized” reflectivity I have NOT to higher the reflectivity parameter in the material panel and I simply have to assign a texture whose influence is set to MIRROR, isn’t it?

using a stencil texture should be the other way to “mask” certain areas, correct?
or in order to have the “correct” final material I must use a stencil?

Ok, for your described purposes this can actually work 2 different ways.

#1: Use the values of the texture to DIRECTLY control the value of the ray mirror.
Example HERE.

This is simpler if you’re only going to trying to control few values. The important things here are:
◘ White = 100% value, Black = 0% value by default. This can be flipped but it’s good practice to just plan for it from the start.
◘ Don’t ‘pre-define’ your values, only enable them if they need to be. The texture will do the rest.
◘ If you are using a color ramp or image texture, ‘RGB to intensity’ must be enabled.

#2: Use the values of the texture to create a mask for the other textures.
Example in my first post.

This is SLIGHTLY more complicated but can definitely save time and frustration if you’re trying to control a larger number of different values through textures. The important things are:
◘ White = 100% visibility/input of following textures, Black = 0%.
◘ Enable ‘Stencil’.
◘ If you are using a color ramp or image texture, ‘RGB to intensity’ must be enabled.
◘ Additional textures used to control values will need to adhere to the basic ideas in #1.
◘ The mask/stencil texture CAN also define values simultaneously, food for thought…

Your final question is simply a matter of taste. There is no “correct” material settings. It’s always contextual, and new ideas trump the “correct” way of doing things all the time. Experiment! :smiley:

thank you very much for your extensive explanation :slight_smile:

I was wondering, in summary, if I could control ray and / or spec values directly via a texture rather than stenciling.

just can’t understand the reason why in some cases leaving the value to 0 and then just applying a control texture and varying its INFLUENCE parameters it perfectly WORKS but some other times not at all… :frowning:

in the ray mirror case, putting reflectivty to 0 in the material panel and then tricking the textures values WORKS
in the speculraity case, no chance (but probably difference are so narrow that they can’t be noticed)
in the alpha case, I had to work on the alpha value in the TRANSPARENCY chanel in the material panel and THEN trick back in the texture one (modifying JUST the texture influence does not give any result)…

modifying JUST the texture influence does not give any result

Are you sure you have checked “RGB to Intensity”? It’s working for me exactly as it should… ? Values in the material panel should be dropped to zero if the texture will be controlling them. Remember, full white is ‘on’ and black is ‘off’ with the grays in between and the texture by default works in an additive way. So if you’ve got .500 spec in the material settings you’ll never get less than that when you add texture values. Same with alpha, if you have alpha of 1.00 in the material panel and add texture values you will not lower the alpha (default/simplest settings), but if you start with alpha of 0.00 you can ‘build up’ the areas which are visible or not.

Nice job on the hamburger, btw!

I ended up with the same conclusion.
lowering the value in the “material” panel let the texture fully modulate the property, is that right?

probably some times it’s just because the differences are too limited to be recognizable by texturing!