Author Topic: dubcats secret little hideout  (Read 129412 times)

2018-02-04, 12:58:56
Reply #135

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
I've finally made some test on the diffuse shading. Indeed, Corona seems to use pure Lambertian diffuse shading model which is suitable to describe high glossiness materials. When it comes to rougher materials, the oren-nayar model is more suitable.

example :



Arnold and redshift both use the oren-nayar diffuse shading model and then, expose a diffuse roughness parameter.

When diffuse roughness is set to 0, then it's pure Lambertian. As far as this value is changed, it switches to the Oren-Nayar implementation. You can see examples below (don't mind the little exposure difference between renderers, I matched them by eye, really quickly).

I did not find a Fstorm demo installation but from what I've seen from dubcat's tests, the Fstorm diffuse shading model seems quite off compared to other solutions. Don't know what algorithm is used there. Also noticed some strange artifacts on the sphere highlight in arnold when using strong roughness values. Redshift implementation seems to be the more consistent one.

Vray's diffuse roughness is completely off and I now understand why nobody (including me) uses it...

Also, to clarify things, diffuse roughness is not the same as glossy roughness. Most materials cap around 0.3 and shouldn't go over 0.5. From what I've found over the web, some artist tends to use a basic rule to get reliable results: diffuse roughness = glossy roughness * 0.33. There is something to dig in here.

It would be really nice to get diffuse roughness and glossy fresnel to be part of corona in the near future! Please!


2018-02-04, 15:07:39
Reply #136

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
one more test, Redshift , Lambertian vs Oren-Nayar diffuse shading :

Glossy roughness @0.7 - Diffuse Roughness @0.0

Glossy roughness @0.7 - Diffuse Roughness @0.23 -> 0.7*0.33 as explained above

Glossy roughness @1.0 - Diffuse Roughness @0.0

Glossy roughness @1.0 - Diffuse Roughness @0.33
« Last Edit: 2018-02-04, 16:28:02 by Fluss »

2018-02-05, 09:56:59
Reply #137

Juraj Talcik

  • Active Users
  • **
  • Posts: 4050
    • View Profile
    • studio website
F-Storm does almost 100perc. use Oren-Nayar diffuse shading, or some in-house but nonetheless based on it (like their copy of GGX).

The most interesting approach is what the Disney guys (Brent) have done. They manually fitted the model so that rough materials have some retroreflection.

I generally like what they do (test and see when it matches reality) instead of just adding code and ending up with unrealistic crap. Lambert has to go.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2018-02-05, 10:06:10
Reply #138

pokoy

  • Active Users
  • **
  • Posts: 1500
    • View Profile
A few users were asking for Oren-Nayar on a regular basis, probably too few to be heard. It's really needed for a lot of surfaces, I'd be really happy if we got an improved shading model.

Thanks for the test images - from all the tests, Redshift's version looks best to me. Kind of surprising since I find many of their gallery images to look quite artificial, I always thought their shading model isn't as nice as Corona's.

2018-02-05, 10:44:10
Reply #139

Juraj Talcik

  • Active Users
  • **
  • Posts: 4050
    • View Profile
    • studio website
Redshift still suffers from this odd reputation because their early user-base didn't focus on photorealistic work that much.

But their 2nd version came with state-of-art PBR shader with multiple brdf selection in 1/10 fraction of the time it took Corona to even fix GGX halo ;- ).
It was basically flawless, perfection.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2018-02-05, 11:42:33
Reply #140

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
The most interesting approach is what the Disney guys (Brent) have done. They manually fitted the model so that rough materials have some retroreflection.

I generally like what they do (test and see when it matches reality) instead of just adding code and ending up with unrealistic crap. Lambert has to go.

I've also read the disney paper, the approach is indeed quite interesting. The only thing that bother me in this shader is the specular control which stands in lieu of an explicit index-of-refraction. Except that, it looks like a fantastic shader to work with. Renderman is Full-featured and free for non-commercial use, just need to grab a demo version of maya to test that out.

I finally managed to test Fstorm and I have to say that I'm quite impressed! Everything feels so natural, and not only on the diffuse part, glossy fresnel is a no brainer here! I'll dig into it a bit further.

F-Storm does almost 100perc. use Oren-Nayar diffuse shading

I'm not sure about that. It's default 0.8 and seems to be "Lambertian-like" at 0.99. It's also capped to 0.5. What's more, transition between light and shadows is tremendously softer.


A few users were asking for Oren-Nayar on a regular basis, probably too few to be heard. It's really needed for a lot of surfaces, I'd be really happy if we got an improved shading model.

Thanks for the test images - from all the tests, Redshift's version looks best to me. Kind of surprising since I find many of their gallery images to look quite artificial, I always thought their shading model isn't as nice as Corona's.

A better diffuse model is highly needed to get rid of that rough surface plastic look.

After some more tests, I'm a bit skeptical about redshift's implementation as it's quite noticeable in the highlighted parts but it does almost nothing in the shadows. Arnold looks weird on extreme values but it also significantly changes the diffuse appearance in the shadows which looks more convincing to my eye. It's more noticeable on the happy Buddha, I'll post some more experiments later.

2018-02-05, 14:04:11
Reply #141

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
Juraj, can you PM me ? I'd like to discuss some stuff with you if you don't mind

2018-02-05, 15:24:56
Reply #142

Nejc Kilar

  • Active Users
  • **
  • Posts: 959
    • View Profile
    • My personal website
Juraj, can you PM me ? I'd like to discuss some stuff with you if you don't mind

I'm a lurker here (without much to say) and I really appreciate you guys going at it - going at the problem that is. :) That said, the more public spamming you guys do the better - I really enjoy reading the findings you smart people come up with. Hurrah! Thank you!

2018-02-06, 10:39:23
Reply #143

Juraj Talcik

  • Active Users
  • **
  • Posts: 4050
    • View Profile
    • studio website
Yeah I also prefer to bounce opinions public :- ). That's what threads like this are for. Don't worry the devs are not that sensitive and need some push :- )

But if it's something reeally private like just use my old mail juraj(dot)talcik (at) yahoo (com).
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2018-02-06, 13:08:34
Reply #144

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
Juraj, can you PM me ? I'd like to discuss some stuff with you if you don't mind

I'm a lurker here (without much to say) and I really appreciate you guys going at it - going at the problem that is. :) That said, the more public spamming you guys do the better - I really enjoy reading the findings you smart people come up with. Hurrah! Thank you!

Don't worry, will still sharing stuff here, just wanted to ask some hints to go further on the specular part without polluting the thread too much with trial and errors. Anyway, we're talking diffuse roughness, for now, let's see that later..

Here is another test to demonstrate the diffuse roughness contribution in Arnold. Diffuse shading is way smoother, diming light at F(0°) (which give the plastic look) and eliminating the black fringe Lambert tends to produce at grazing angles. Also, note that the whole thing appears to be darker, both tests were rendered in the same lighting and exposure condition. The shader is supposed to be energy conservative tho, that's just that diffuse rays are more scattered resulting in fewer rays hitting the camera hence darker render I guess.

edit: also grabbed a copy of the latest blender version which provides an implementation of the Disney uber shader. Will be interesting to see what it brings to the table :)
« Last Edit: 2018-02-06, 13:16:54 by Fluss »

2018-02-08, 15:45:00
Reply #145

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
Hey guys, I've made some more tests across different renderers to compare diffuse roughness at min/max values. Diffuse only, no specularity involved, here is what we get :











We can see that Fstorm and PxrDisney really stand out here, simply by the fact that they are modifying the shadow terminator according to the roughness (diffuse roughness for Fstorm, global roughness for PxrDisney). We can also notice that PxrDisney shader brighten up the diffuse at grazing angles, which Fstorm doesn't. Let's try to go a little bit more in depth.

It looks like there are two models that seem to be involved here :
_the diffuse model
_the geometric shadowing-masking model

For the diffuse model, PxrDisney uses a custom-made empirical brdf based on their observation of MERL100 samples.

Quote
This produces a diffuse Fresnel shadow that reduces the incident diffuse reflectance by 0.5 at grazing angles for smooth surfaces and increases the response by up to 2.5 for rough surfaces. This seems to provide a reasonable match to the MERL data and was also found to be artistically pleasing.

This is clearly noticeable on the PxrDisney test. As a contrary, Fstorm doesn't seems to do such computation and I now assume Lambertian model is used there.

The shadow terminator seems to be driven by the geometric shadowing-masking model which represent the shadowing from the microfacets (a.k.a specular G function). The BRDF viewer allows us to preview the different BRDFs independently, to better see the distinct contribution of each function in the shader. I used it to preview some specular G functions and made some screen of the Walter BRDF which is the one that seems to be the closest to what we get in Fstorm.

Min and max :





This function exposes an alphaG parameter which has a range of [0.001;1]. What's more, the PxrDisney has been implemented as follow :

Quote
we use the G derived for GGX by Walter but remap the roughness to reduce the extreme gain for shiny surfaces. Specifically, we linearly scale the original roughness from the [0, 1] range to a reduced range, [0.5, 1], for the purposes of computing G.

This correlates very well with what we get in Fstorm -> diffuse roughness range [0.5;0.99].

However, the implementation of this function seems to differ blithely between the Fstorm shader and Disney shader. In the Disney shader, everything is derived from the global roughness setting and is automatically performed backend. In Fstorm, the parameter is exposed and this seems to affect the diffuse component only.

In regards to the "more directional look" Juraj and Dubcat were talking about, I've also made some test on the specular part :

Corona :



Fstorm :



I guess it's because Fstorm uses Beckmann BRDF instead of GGX :

Beckman :





GGX :



« Last Edit: 2018-02-08, 15:50:20 by Fluss »

2018-02-08, 16:55:25
Reply #146

Fluss

  • Active Users
  • **
  • Posts: 544
    • View Profile
Oh and just for the sake of it, here is a real photograph. Better than thousand words....


2018-02-09, 02:26:00
Reply #147

dubcat

  • Active Users
  • **
  • Posts: 423
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
damn, you guys have been going ham since my last visit. Big thank you to Fluss for all the testing, really appreciate it! That photo is my staple for render testing!
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-02-09, 02:59:08
Reply #148

sebastian___

  • Active Users
  • **
  • Posts: 152
    • View Profile
Very interesting the real photograph, too bad it has light bouncing from bellow and it's a little harder to compare the lower area, because it's standing on a white plane.

2018-02-09, 03:49:57
Reply #149

worx

  • Active Users
  • **
  • Posts: 8
    • View Profile
Is there a way to replicate defuse roughness in corona? Because i also find corona being a little flat, and really have to use post to get that soft shading looking