I’m trying to get a metallic material in Cycles using a mix of Diffuse Shader and Glossy Shader whereas the Mix Shader factor governs the strength of the reflection. Now the reflection simply looks crap in Cycles.
The material is bluish in color (let’s say pure blue for example). The glossy shader has a color input value. I tried using pure white as color as well as the same color as for the diffuse shader (blue in this case). Both looks crap.
Now my question is: what is the correct color to use for the Glossy shader? Is it pure white or the diffuse color?
Specular reflection is about the dot between the view direction and the reflected light ray (actually “reflLight dot -view”). This here seems to be “faceNormal dot -view” which is incorrect and doesn’t yield a correct result. What we need is higher reflectivity along the reflLight direction falling of in a cone-shape the more you get away from it. Right now cycles reflects anything anywhere as if the object is a perfect mirror.
Both are similar. With mirrors the cone shape effect equals 0 hence light rays are reflected at full strength no matter what direction (relative to reflLight) they travel. Specular reflection on the other hand has full effect on the cone shape and thus is drops to zero outside the cone shape. Nevertheless the key is dot(reflLight, -viewDir) due to the material structure.
It’s correct that you need camera, light source and face normal: dot(reflect(light,normal),normalize(fragment-camera) . The BlendWeights though seems to only take normal and camera into consideration but not the light source. This is good for RimShading but utterly useless for correct specular reflection.
Most of the time, you would use a white for your glossy material (preferably with a value that’s at or lower than 0.9). If you need a more bold coloring, but not to the point of saturation, you should use the same general color as in the diffuse component, but with the saturation value being perhaps 50 percent lower or more.
In many cases, you might turn the roughness up a bit so it doesn’t reflect like a perfect mirror, you can also use a map to control how sharp the reflection is.
The final part for metal would be an anisotropic component, there’s currently an incomplete implementation of an glossy anisotropic shader in the codebase, but is currently disabled due to some lingering issues with how to get the tangent automatically. There may be a way to fake it somewhat, but it would probably not be physically correct.
As mentioned I’ve got a blue colored metal (actually a light blue plus some light gray metal) and it just doesn’t work out. Using the blue color in the glossy shader results in the white lamps above to reflect as light blue which is wrong. Using white as color though the entire metal has a whitish color which looks again bad. There just seems to be no way to get specular reflection with metal working with Cycles. In BI it worked (mostly) but not Cycles.
So my main problem is this stupid white-out of reflection with the glossy shader. In BI we could use a reflection value to determine the strength of the reflection but the glossy shader seems to think anything is a perfect mirror (with optionally a very blurry mirror with roughness altered). What I need is a blue metal which reflects a bit so it is visible it is metal and not plastic but not fall prone to white-out.
Are you meaning specular as in what is seen in BI, in Cycles we have true specular which reflects the environment along with the lights themselves, as in the real world you would notice everything reflects to an extent. If you haven’t already, maybe try a very dark color for the glossy node.
Don’t forget that you can use a texture to control the opacity of the glossy shader in the mix node, you can also use the fresnal or blend weight node to graduate the intensity of the reflection according to the angle of faces to the camera (which would be plugged into the mix node fac. input, but I’m not sure if that’s part of what you’re after).
Frankly, i can’t remember any metal of periodic table (counted to some 12 i’ve seen) which would be colored blue. And all the rest except copper is that or another shade of gray. Well, yeah - gold. But that’s more yellow, red if copper added. If there’s something blue in metal, i assume i see reflected something - sky or jeans eg. No offense, but blue metal that’s just not realistic imho - to absorb all but higher spectrum part.
Would be interesting to see this glossy anisotropic shader Ace Dragon mentioned, that would change how certain objects look under different lighting, yes? Looking at my last rendering - i added plain white light source stripes - how cpu renders it - that glow around reflection might be something a like. However gpu/cpu treats this differently - wastebin anyway.
By mixing diffuse and glossy i have never got convincing metal surface even when modulated by fresnel, just dark glossy+light glossy.
Diffuse + glossy i would try to mix by texture map, imitating something worn out, polished in some places.
In BI we do have different shader models with hardness parameter, by changing this and specular spot size as a result we trick ourselves into thinking - smaller spot size, harder the surface. Take object like ball bearing ring - metal is equally hard, but reflection on bevel which is less bumpy, more polished, will be less in size. Cycles Roughness on lighter color shader will take care of that. Make it zero and material gets hard as an diamond on picture. How that’s supposed to be in relation of hardness of an object? It might be hard as hell, but sandblasted, matted and will look as a paper.
Again, i’m not any kind of expert here, my knowledge just scratches the surface of all this. Sharing this little i know and see.
Actually I’ve got a hole puncher right next to me which is blue… and reflective . But yeah, maybe the better expression would be “metallic paint” but this doesn’t alter the problem in any way. It’s a blue surface which is supposed to look metallic (as it’s a mecha).
Concerning mixing glossy and glossy I don’t get how this is supposed to yield a convincing result. The metal surface would have to reflect at best 20% tops. Glossy shader is though always 100% reflective. How should mixing glossy and glossy result in something like 20% reflection? Or even worse, how in 0% reflection (or better said pure diffuse reflection)?
In that case you might want to use the add shader node instead, it might get you closer to a metallic look as it would create the effect of adding the glossy shading on top of the diffuse component rather than just mixing it in according to a value.
Do note that if you use that, you may need to make your base colors a little darker, otherwise it will add up to a value of more than one and create a lot of noise, as tweaking the colors is needed for tweaking the effect when using that node.
I don’t know. This doesn’t look like metal at all to me. More like light gray plastic. Concerning the roughness setting it to 1 still produces reflection and thus recolors the object in an unwanted way. So that’s definitely not an option. What goes for the car paint the one mentioned in the post doesn’t work well at all. First things first: no speckles. They are out of place and also seem to cause troubles on various distances and lighting. Setting them to 0 though results in an even worse result. Furthermore the lighting issue remains. Could be that due to the geometry I need lamp meshes with emission above 15.0 to get the scene anywhere well lit. The reflection totally burns it out there.
I didn’t say I’m using transparency shader. For the metal I just need reflection. The transparency is a different problem (canopy material).
@eppo: Scratches are better but still doesn’t look like metal. Most probably though because there is nothing to reflect.
Experimenting with some lighting here. Cycles seems to be very sneezy about the lighting especially in large spaces. Can’t get rid of the over-white reflection but reducing the problem by reducing the luminance. This way though it’s too dark. Needs GIMP post-processing or Cycles modified to do proper HDRR. Why BI/Cycles can’t do HDRR while any major game engine can is beyond me.