Cycles-nodes implementation of a better glossy shader

Thanks for sharing the node setup and the excellent work from lukas

Very interesting! I’ll have to experiment with this later when I’m at my Blender machine. WRT the posted links, it seems like this node setup is a patch to fix the energy loss problem until someone can implement the more correct multiple-scattering model, yes?

Yes, correct. As you can read earlier in the thread, that’s the goal, until Lukas comes with the new Shader. Also, first implementation was not too good but now the energy preservation looks quite costant from 0 to 1 roughness (i made a check in photoshop: a render every .10 in roughness scale, then make filter-median. the luminance was always the same). Last but not least, the same idea is applied to refractive shader -> translucent, as Stan Pancakes suggested
yo!

I think I saw an attempt on fixing this a long time ago using some weird roughness based physical approach. It was very interesting but waaay to complex and time consuming to actually use practically. However, both that and this one doesn’t seem to go beyond perfectly lambertian diffuse. How about going 0-2 where values >1 uses Oren Nayar (better simulation of micro rough diffuse surfaces)? Iirc Disney couples its roughness so that it drives both diffuse and glossy roughness, meaning you can’t ever get Lambertian shading.

I’m not sure what would be the “best approach” to apply Oren Nayar roughness.

Another thing, do we really need both glossy and anisotropic shaders? Wouldn’t it be better to unify diffuse/glossy/anisotropic shaders into one (with options)?

I agree - I think the glossy and anisotropic sharers give identical results when anisotropy is set to zero - so unless there is a performance or other reason why they are separate - it would make sense just to have a single glossy node with an anisotropy option.

The unified Glossy works flawlessly, I will definitely be using that. The refraction group has an issue (which stock refract also has) where you get very dark edges at intermediate roughness values. Not sure if that’s realistic (could be).

Here’s a comparison of the Stock Refraction, Stock Glass, and Unified Refraction all at roughness 0.6. Unified Refraction is fresnel-mixed with Unified Glossy, Stock Refraction is fresnel-mixed with Stock Glossy.

Attachments




http://i.imgur.com/WYMKya5.jpg?1

with this modified setup roughness around 0.8 is lambertian*, then quickly shifts to oren nayar (0.8 to 1.0)

edit: * actually it’s already slightly oren nayar. the ramp should be set to ease interpolation

i don’t like this to much, because shifting from lambertian to oren nayar gives the impression of not defeating the energy loss, which was the purpose of this whole thing

Could you explain how to create this group ?

This is a different approach that makes no use of diffuse component, and deals with the energy loss by increasing luminosity value of the base color.

@brus
just replicate the setup, what do you need to know more?

and this is its sibling for refractive shader

How to make group input and output ?

Diffuse isn’t “rough” glossy.
the difference is that diffuse material is (in real world) less dense than a glossy. and a SSS is even less dense. so the light can go a bit trough it.
and because glossy is the most dense , light can’t go trough, so it reflects.

Diffuse isn’t “rough” glossy.
the difference is that diffuse material is (in real world) less dense than a glossy. and a SSS is even less dense. so the light can go a bit trough it.
and because glossy is the most dense , light can’t go trough, so it gets reflected.

Crtl+G on any node makes a nodegroup. Search for it in the manual

Okay, but this sounds like just replacing ‘roughness’ with ‘dense-ness’. I can’t see a big difference except terminology.

Funny , I will work on a concept for a density shader. Which includes respectively glossy, diffuse, sss, translucent, transparent. Where I am not sure which is more dense: translucent or SSS.
eh … :slight_smile: Just an experiment.

Update: already finished ( cheating here) .
stc=1

i dont know if this has been mentioned but diffuse is NOT supposed to be very rough glossy. It is suposed to be very dense volume scatter or low radius sub surface scatter.

Why was this thread bumped?

The quest to avoid energy loss for glossy and glass shaders at least is moot by now (due to the GGX multi-scatter model that was committed several months back). No more need to approximate it by manually adding energy,

This was more an attempt to have a single “reflective BSDF” with smooth transition between diffuse and glossy BSDFs, merging the two shaders into one. Then the same concept was expanded for a “refractive BSDF”
Since the GGX multiscatter at roughness 1 doesn’t look like diffuse, this nodetree still has its logic, but honestly I myself hardly use materials with roughness higher than .5, so for me even the old GGX was fine.

Reflective BSDF to completely replace diffuse would mean having to deal with specular paths to handle global illumination. How does that work? For me, not at all even remotely :slight_smile: In fact I even replace glossy components with diffuse as far as GI is concerned.