4
$\begingroup$

Alright, so I have a confusing problem when I'm trying to mix together a Diffuse and a Glossy shader. To be more precise, this is how the scene I'm trying to create looks like with only the Diffuse shader active:

diffuse shader

Then, when I'm adding the Glossy shader, it looks like this:

enter image description here

Is this normal? I mean, it seems to work somehow, but why is everything grayed out? I mention that I have a specularity texture that I'm using on the factor socket on the Mix shader. This is how my node setup looks like:

screenshot of node setup

The only way (that I know) to fix this issue is to connect the default image texture (the one that I"m using for the Diffuse shader) to the Glossy shader as well. But from what I learned so far this isn't a good practice.

Am I doing something wrong or that's how it is supposed to look like? Is this the correct workflow?

I've tweaked a lot of settings here and there and I'm thinking that maybe I've messed up something. Do you have any clue on what's going on? :)

Thanks!

$\endgroup$
  • $\begingroup$ This is how my node setup looks like: i.imgur.com/t53pJM3.jpg $\endgroup$ – Andrei Ivascu Nov 12 '16 at 9:03
  • $\begingroup$ The setup seems fine - would add some roughness to the diffuse, but that's not the problem. Try add an invert node between the spec image and the mix node. Guessing you are trying to add specularity with white, where it should be black. $\endgroup$ – Patdog Nov 12 '16 at 11:00
  • 1
    $\begingroup$ It looks like scale of the specularity map is too high. $\endgroup$ – Mr Zak Nov 12 '16 at 12:35
  • 1
    $\begingroup$ I agree with @MrZak. The specular map is blown up and pixelated. $\endgroup$ – JakeD Nov 12 '16 at 13:06
5
$\begingroup$

The problem appears to be that you're trying to apply techniques common to older raytracing software like Blender Internal to a physically-based rendering engine - cycles in this case.

It's a real problem if you come from a world of specular maps, shadow maps, bump maps, displacement maps and so on.

Some of these maps are simply there to help the fake the look of objects in the real world. Indeed, I use maps in my own ubershader which allow me to include metals, paints, glass and even holdouts all in a single (albeit complicated) map image.

It's really hard to wrap your head around physically-based rendering, but once it clicks, you won't want to go back to the old methods.

For basic specularity the following:

  • The two shaders - diffuse (also called albedo) which is your colour and only the colours.
  • A mix shader to make sure that the light leaving the scene does not exceed the amount of light entering it.
  • A fresnel node to keep the mix looking as it should.

Try a setup like this:

Basic "dielectric" setup

and experiment with the IOR value in the fresnel node: values below 1 are not physically accurate and values above 2 are getting outside of a reasonable range too - but you can use them if you like the effect!

That's really all there is to it. You can feed the colour input of the diffuse node with your image and let Cycles do the rest.

If you're doing metallic objects, remember that they don't have any colour of their own (by and large) and get everything from their environment. There are a few exceptions like gold, but metals are so hard that pretty much all light bounces right off them. There are also fresnel effects for a very few metals such that the fringe around the object (a sphere is great for experimenting on) changes colour.

You can see these effects here. An IOR of 1.25 gives a nice effect (and is reasonable for objects like this but as we push it higher you can see how the light appears to creep around the edges. When I push it to ridiculous levels (5 in the example) you can see the entire surface looks unreal.

Fresnel IOR of 1.2

Fresnel IOR of 2.0

Fresnel IOR of 5

One area where you might want to use a specular map (or at least, the equivalent) is where you have a wet surface such as a road with puddles. The puddles are reflective and the road is a dielectric (a fancy word for non-metal).

I get around this using the fact that the colour in real-life is limited so that no colour should be darker than 20% or brighter than 80% (0.2 to 0.8 in your Cycles engine.)

This allows you to cheat by putting areas of 100% white or 100% black on the image and then filtering using a value node to switch to a different shader group.

Here's a simple node setup - not that where I've used a chequer texture to make the effect visible, you'd plug in your albedo/specular map and area that's 100% black or very dark using these values, gets the glossy treatment. I left the fresnel out of this to keep the node setup cleaner.

Node setup for smart shading

and the result:

enter image description here

$\endgroup$
-2
$\begingroup$

I think the problem with your material setup is that it's missing Fresnel (surface is more reflective at grazing view angles).

Good tutorial on how to correctly setup physically accurate materials by Andrew Price: https://www.blenderguru.com/tutorials/pbr-shader-tutorial-pt1/

$\endgroup$

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.