1
$\begingroup$

let's say, I have a texture with black background and yellow skulls everywhere on it. I want the black background to have a white reflection color and the yellow skulls i want to have a black "reflection" when shine on. (I guess black reflection isnt possible, but i want them to turn black when shine on)

I already have several specular maps to achieve that but the only part missing is that i dont get to turn my skulls black when shine on. Is there any node setup which can achieve that? (something like "if reflection"->diffuse black) I just can't get it working.

Thanks for your help

EDIT:

Here is a screenshot. I need the skulls which are hit by light to turn black..if even possible

http://www.pasteall.org/blend/41884 .blend file

$\endgroup$
  • $\begingroup$ are you looking to really change the reflection, or just change the color of your skulls (and background) when if light or a object goes over them? $\endgroup$ – David May 14 '16 at 15:55
  • $\begingroup$ Easily said, i want to change the color of my skulls (not background) when light goes over it to black...if no light is hitting the skulls, i want them to stay yellow...basically just like the glossy shader but instead of white gloss,i want them to turn black $\endgroup$ – marco56 May 14 '16 at 16:24
1
$\begingroup$

You will have to resort to some compositing tricks to achieve this effect. Cycles can't really perform an "if [glossy] reflection" check like you describe since a glossy surface is always reflecting something. You want it to change the surface's properties based on what is being reflected. This is impossible due to the backwards ray-tracing nature of Cycles since changing the properties of the surface will affect what is being reflected, creating a circular dependency.


To create the effect you are looking for I created three render layers, the main layer (as you have now), a just glossy layer (to use the lamp's highlight as a mask), and a black diffuse layer (to be mixed in with the mask layer).

The only other change I had to make to your scene was swapping out the mesh light with a point lamp since using material overrides in the render layers also overrides the emission material. However, it basically looks the same and renders a bit faster and with less noise to boot.

First create two more materials. Create one material that is just the black diffuse shader you want the skulls to turn into. The other material should look like this:

enter image description here

The color ramp is simply to map your texture to its extremes (i.e. skull = pure white, background = pure black). It is then used in a mix shader to make the skulls glossy and give the background a holdout shader (i.e. not rendered, pure black and transparent if enabled).

Next add two more render layers, I called one "mask" and the other "diffuse". Give each one an override material, the "mask" layer should use the glossy/holdout material and the "diffuse" layer should use the pure diffuse material.

enter image description here

Now you can render your scene and head over to the compositor. For the compositing, just mix the main layer with the "diffuse" layer, using the "mask" layer as the mix factor.

enter image description here

Which yields the following:

enter image description here

If too much of the skull pattern is darkening for you just add a Brightness/Contrast or RGB Curves node between the mask layer and the mix node and use it to knock up the contrast of the mask.

$\endgroup$
0
$\begingroup$

render and cycles nodes

Here is the .blend file: http://www.pasteall.org/blend/41881

  • You need a mask and a mix shader
  • Plug the mask texture into the "Fac input"
  • One shader is your normal shader (Glossy shader, in this case the Bliss wallpaper)
  • The other shader (represented by a red diffuse shader) can be your "black glossy shader
  • If you want an area to have no reflection, replace the red diffuse shader with a Glossy shader, set the color of the reflection to black and the roughness to 1
$\endgroup$
  • $\begingroup$ OK, thank you. Well, this isnt exactly what i was looking for. Is there any way to get the red-"ish" diffuse layer only going red"-ish" when shine on(glossy) and if not shine on showing the original bliss picture. Ill make a .blend file myself later on to show you exactly what I'm talking about $\endgroup$ – marco56 May 14 '16 at 15:59
  • $\begingroup$ http://www.pasteall.org/blend/41881 here is the .blend. How do i get the skulls which are hit by light turned to black? $\endgroup$ – marco56 May 14 '16 at 17:09
  • $\begingroup$ pasteall.org/blend/41885 - This should be what your want. If you really want complete black, you have to use a Holdout shader instead of the black diffuse shader (it punches a transparent hole in your render), export your render as a png (with an alpha channel) and then composite a solid black color behind your render (for example in Photoshop). But this is far more complex. $\endgroup$ – BiggCrazy May 14 '16 at 17:29
  • $\begingroup$ Thank you very much for trying to help. It's still not what i was looking for. I only want the skulls which are hit by light to be black...others should remain orange. After playing around for a few hours now I am not sure if there even is a way to solve it...i guess there must be but i cant seem to get it done $\endgroup$ – marco56 May 14 '16 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.