Shading improvement thoughts

Hi guys!

I’m an active Vray and corona user and we were recently discussing shading improvements that could be implemented to improve realism in our scenes, on the Corona forum. So I’d like to bring the discussion here and know your thoughts and insight on what you might consider useful. So here are some of the discussed subject :

A better diffuse model

Vray diffuse roughness is available since ages and does not seems to have received much attention since. It looks weird compared to competitors implementation. Here are some examples (compared to Arnold’s Oren-Nayar implementation) :

Vray 0.2 roughness

Arnold 0.2 roughness

Vray 0.8 roughness

Arnold 0.8 roughness

I think these renders speak by themselves. I’m not saying Arnold’s implementation is the best out there but the Vray’s one just looks completely wrong to me, unless you want to create a toon shader. So what’s the point here?

So far, Disney diffuse BRDF seems to present the most accuracy/user-friendliness ratio. Don’t you think this should be addressed considering the results presented above?

More info here: https://disney-animation.s3.amazonaw…f_notes_v2.pdf

An energy preserving BSDF

I recently stumbled upon a presentation from Sony Image Works explaining how they improved their shading model to be energy preservative. Even if it seems a bit cumbersome, they’ve made the distinction between energy conservation and energy preservation and it’s finally a pretty way to focus on the incriminated phenomenon.

Basically, single scattering micro-facets BRDFs loose significant amount of energy as surface roughness increase. I’ve made a quick furnace test in Vray and I was quite shocked to see that we are indeed loosing close to 60% energy at 0.0 glossiness. Even if we almost never use such extreme values and considering this is linear, we’re still loosing 30% energy at 0.5 glossiness and 15% at 0.75 glossiness. That’s still a huge amount IMHO! Not to mention that physically wise, it is just nonsense.

Here is an example of multi scatter GGX implementation in Blender. As you can see, it’s quite noticeable:

What’s more, this affects every micro-faceted BRDF so diffuse, specular and transmission (including clear coat, thin surface etc etc..).

Have a look at their presentation for more info: https://blog.selfshadow.com/publicat…_slides_v2.pdf

Also, Stephen Hill made interesting Blog posts on the subject :

Keeping micro details skipped by filtering

Micro shadowing most of the time overlooked. If it’s not that much an issue on close up shots, as soon as we move away, filtering comes to action and we’re loosing all the micro détails when using bump/normal and micro-displacement maps, resulting in a flat/plasticy render. So translating bump/micro-disp/normal map to microfacets is a must have too (for me at least). It can also be declined to solve some artifacts introduced with normal mapping with BDPT algorithm (Bump/normal mapping is not reciprocal). And that’s what bump to roughness does with no negative impact on render time. These examples speak by themselves :

Bump to roughness :

Normal to roughness :

Regular bump :

Bump to roughness :

And i’ll finish by a quote from the article :

“We noticed a significant improvement on environment detail, especially surfaces such as concrete and marble,”

“The benefits don’t stop there, as previously mentioned, Cars 3 saw huge improvements in render times. Bump-Roughness is over 35% faster than bump alone”

You can read the full article here, it’s really informative: Pixar's RenderMan | Stories | Racing for Realism
Here is also a link to the paper: TECHNOLOGY LIBRARIES — Pixar Animation Studios

So, that’s it! What do you think about it guys? Do you think these change would be welcomed and if not, why (massive overhead, too complex, simply not useful etc etc…)?

No feedback guys?

I actually used the diffuse roughness for creating toonlike shaders in the past :smile: so 1+ for improving that one.
For the rest I’d like to hear someting from the smarter ones.

Well, it seems that in each example you gave quality, realism, and usability are improved. These would certainly all be welcome additions, no?

I guess the real question is how do these changes impact computational intensity/time?

Great post! I’m surprised it’s not getting more attention. Maybe just needs time.

In V-Ray for Modo 3.6, the v-ray material has a “roughness model” option. You can choose between “gamma-based” (which is the old model) and “oren-nayar”, which looks closer to your arnold renders. Is this missing in other versions of V-Ray?

Diffuse roughness only works on CPU too. It would be nice to have it on V-Ray GPU.

There is only one roughness model in Vray for 3DS Max (the ugly gamma-based one), can’t say for other software. That’s even more embarrassing that they’ve already implemented it in another package and not in the max version…

I found it in VRayPluginMtl of VRayNextUpdate 1 for 3dsMax.

hmmm good to know! It is just weird that it does not show up in standard Vray material TBH, especially considering that the Oren-Nayar model is way more accurate.

My bet is that it will be available in one of the future updates. I would like to see that, because it is more realistic, I have to agree.

Very interested in the answer about micro details in bump!

Great discussion! I’ve never used Roughness in Vray, even when the particular material called for it, exactly because of this. It has always made my materials look strange, almost like toon shaded. Hopefully we can see some improvement there.

+1 here for the roughness bump .. to balance closeup vs far shots is tedious now because of this

regarding the diffuse roughness, I don’t use it too but I won’t mind seeing improvement here.

Well I guess nobody uses diffuse roughness because results are weird, that’s the whole point of this request. And yes, There is so much to do in the micro details area. This paper is interesting too in that regard: http://www.cs.ucsb.edu/~lingqi/publi…er_glints3.pdf

a5D1NTdGwU0

That’s a good point about the diffuse roughness, it’s been on my “to do” list to switch to the Oren-Nayar implementation since forever, it’s probably time :slight_smile:

Thanks for the other suggestions as well; we are looking into better filtering for bump and normal maps and we’ve done some experiments, but things are more complicated when applied in practice than what the papers are suggesting.

Better energy preservation for glossy materials is also on the “to do” list; the trick here is to do it without sacrificing performance. That’s a good question though, if you had to choose between a X% slower render and better energy preservation, which would you choose? (Obviously depends on the X, but how much would be acceptable?) For Blender, someone mentioned about 2.5% slowdown, but it might be actually higher in V-Ray because the BRDF code is more critical to performance.

Best regards,
Vlado

Glad to see you here Vlado,

So happy that both diffuse and filtering are already in the WIP train. For the energy preservation, I guess you’re talking about the Heitz’s Multiscatter model which solve the light interaction completely? What about energy compensation like in the links provided in the first post? It’s probably less physically accurate but anyway, it’s energy conservative, reciprocal and it provides really good results IMHO. The only drawback is that it needs to be precomputed and stored in a LUT. But I would be curious to see the performance hit of this, it could be totally worth it.

Also, you’re talking about energy preservation for glossy materials but aren’t all micro-faceted BRDFs concerned here? (so diffuse, transmission, thin surfaces etc.. ?)

Edit: Do we have to choose between the two? Enabling/Disabling the feature is not an option?

Would that make creating microscraces as shown above (in the video with the cutlery) easier? Right now its almost impossible. Or is that a different problem?

If its meant to be always on - 2.5% seems ok :smile: everything above 5% would be a problem for me I think.
If nessesary: The percentage would go up a bit if it’s switchable.

I would choose what is consistent and predictable. If I can see/photograph it in real life I should see a corresponding function or result in vray. Render time can be solved by throwing more Ghz at it. Shader development takes man hrs which ultimately cost more.

I meant the multiscatter model. I had, in fact, missed the other links - thanks so much for posting these; the approach there seems a lot easier to implement. Will definitely look into it.

Edit: Do we have to choose between the two? Enabling/Disabling the feature is not an option? I would prefer if things worked better out of the box without additional options :slight_smile:

Best regards,
Vlado

I remember there was some kind of extended version of the stochastic flakes in development which allows prodedural generation of scratches, no?
Energy preservation would be great, we have this quite often on glossy parts. And there are lots of them on a car…
Also Oren-Nayar is highly welcome if it fixes the harsh shadow terminator issue and improves the falloff between light and shadow, especially under hard and contrasty lighting.

No, it doesn’t do that, I think. These issues will need to be solved in another way.

Best regards,
Vlado