Specular reflection vs diffuse reflection.

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
daros
Posts: 43
Joined: Thu Dec 12, 2019 3:25 pm

Specular reflection vs diffuse reflection.

Post by daros » Fri Nov 20, 2020 9:51 am

Hi, i want to share here a problem which is common to many rendering engines. I found the same problem in Maxwell Render, indigo render, Cycles and now Luxcore. The problem shows up mainly in bright materials which need two overlapping reflection types: diffuse light reflection and specular light reflection. The problem in all rendering engines we tried is that the diffuse reflection do not fades correctly at the tangent as soon as the specular reflection starts to dominate the scene, causing an excess of reflection. They sum instead of replacing each other.
In order to demonstrate the problem we produced something like an real Cornell box in which we put real material samples and take photos of them with a Sony R7SIII with a 50mm Zeiss lens. Conversion from RAW to JPG has been done using RawTherapee by disabling every kind of correction and highlight suppression.
ceramic white.jpg
ceramic white.jpg (26.96 KiB) Viewed 773 times
barble white.jpg
barble white.jpg (33.18 KiB) Viewed 773 times
paint white semiglossy.jpg
paint white semiglossy.jpg (25.4 KiB) Viewed 773 times
this is a painted steel sphere so no SSS is happening.
white matte.jpg
white matte.jpg (26.61 KiB) Viewed 773 times
this is a painted steel sphere so no SSS is happening.



Instead this, or something very similar, is what we get with LuxCore and Maxwell.
Material is disney 70% white.
dysney 70%.JPG


We are not able to get rid off the white halo, no way.

This is the scene wich corresponds by the mm to our real model.
Disney vs Matte.blend
(995.82 KiB) Downloaded 9 times



Or are we doing something wrong?
Some ideas or toughts? Workarounds? Please help!


P.S. only one rendering engine i used was doing it well: Maxwell Render Alpha, back in 2005 (or 2006 i don't remember)! As soon as they switched to the release candidate version with the multilayer system everything was messed up, till today.

User avatar
Sharlybg
Donor
Posts: 2482
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Specular reflection vs diffuse reflection.

Post by Sharlybg » Sat Nov 21, 2020 12:46 pm

Same result here with Luxcore Vs Maxwell. No way to escape the bright rim around the ball.

Cycles Disney
Cycles.jpg

Luxcore using Cycles Disney node
Luxcore.jpg

Luxcore Glossy2 node
Luxcore_Glossy2.jpg

Blendfile
Shader_Ball.zip
(1.84 MiB) Downloaded 35 times
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

daros
Posts: 43
Joined: Thu Dec 12, 2019 3:25 pm

Re: Specular reflection vs diffuse reflection.

Post by daros » Sat Nov 21, 2020 2:53 pm

The only way i found to get something similar to the correct result by using Maxwell is by creating two spheres with a 0.2mm offset between them; to the outer sphere i applied a transparent plastic and to the inner one a white matte.
View main 600x600.png
In Luxcore it should work in the same way.
It would be cool the archive this result directly from the shader.

User avatar
Sharlybg
Donor
Posts: 2482
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Specular reflection vs diffuse reflection.

Post by Sharlybg » Sat Nov 21, 2020 3:44 pm

daros wrote:
Sat Nov 21, 2020 2:53 pm
The only way i found to get something similar to the correct result by using Maxwell is by creating two spheres with a 0.2mm offset between them; to the outer sphere i applied a transparent plastic and to the inner one a white matte.
View main 600x600.png

In Luxcore it should work in the same way.
It would be cool the archive this result directly from the shader.
I had been trying something simillar with Luxcore absorption feature but it darken the shader.So i wasn't sure about the approach viability :


Luxcore Glossy2 absp 0.06
Luxcore_AB_0.06.jpg
Luxcore Glossy2 absp 0.02
Luxcore_Glossy2.jpg

As you can see lowering the absorption deph make the bright rim even brighter.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

CodeHD
Posts: 395
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Specular reflection vs diffuse reflection.

Post by CodeHD » Sat Nov 21, 2020 3:47 pm

I'm currently working my way through the (2012) Disney paper, trying to understand it better.

You seem to be working with the assumption that this shader is a perfect physical model for all real materials. You can't make this assumption! Here is a quote from the Disney paper:
In developing our new physically based reflectance model, we were cautioned by artists that we need our shading model to be art directable and not necessarily physically correct. Because of this, our philosophy has been to develop a \principled" model rather than a strictly physical one.
Now, I'm not quite through the paper yet, but in the first section they discuss certain specular microfacet (including grazing retroreflection) as well as diffuse reflectance models. In your scene, you observe the sphere from the front with the light overhead. The bright ring simialrly appears in Figure 8 in the Hanrahan-Krueger model, which is also mentioned in section 5.3 regarding implementation details.

Moreover, they pretty much explicitly discard a Lambertian diffuse model, which would be represented by the standard Matte matieral, and should be a good model for real matte paints. From what I read I have the impression that this whole "bright rim on the edge of an object" was a primary motivation for the Disney shader.

You are working with a real experimental setup and comparing it to a computer model. Your first question should be "Which model best represents the material that we use?". Right now, you are asking "Why does a model that was fitted to some materials not work well on another material?"

User avatar
Sharlybg
Donor
Posts: 2482
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Specular reflection vs diffuse reflection.

Post by Sharlybg » Sat Nov 21, 2020 3:59 pm

You are working with a real experimental setup and comparing it to a computer model. Your first question should be "Which model best represents the material that we use?". Right now, you are asking "Why does a model that was fitted to some materials not work well on another material?"
But aside from Disney model there is also the Glossy2/Matte material from Lux being tested. The issue is that we are not able to get rid of the bright rim no matter the shader model.Normally it should be possible to reproduce this in a render engine :

Image
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

CodeHD
Posts: 395
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Specular reflection vs diffuse reflection.

Post by CodeHD » Sat Nov 21, 2020 6:44 pm

Sharlybg wrote:
Sat Nov 21, 2020 3:59 pm
But aside from Disney model there is also the Glossy2/Matte material from Lux being tested.
I could make the same argument here. Glossy2 has some underlying model. Do you have a reason to believe that it should fit your material?
How does it actually compare for matte? I don't think you have explicitly mentioned that yet.
The issue is that we are not able to get rid of the bright rim no matter the shader model.Normally it should be possible to reproduce this in a render engine
I have played around a bit with Disney in the scene daros posted above. Try setting metallic to 0.5 and play around with specular and roughness, perhaps subsurface. To me that looked closer to your picture.

daros
Posts: 43
Joined: Thu Dec 12, 2019 3:25 pm

Re: Specular reflection vs diffuse reflection.

Post by daros » Sun Nov 22, 2020 3:02 pm

I think this feature i very important for a rendering engine which states to put physical correctness at top of his priorities.
But forgetting luxcores official goals i'm sure that this features would give luxcore the final touch regarding naturalism and image smoothness.
Not even mentioning the fact that if in this moment an artists wants to deliver a 3D representation avoiding this kind artifact hi will not succeed using luxcore. I don't think, by the way, that the disney shader offers much more to discover and i also don't believe that the white halo is the result of an esthetic choice by disney because adding such a kind of halo has never been a problem in any rendering engine since 1995.
By examining the result i got in Maxwell, using the double sphere trick, which just replicates reality, even the math behind that results do not seems the most complex of this world; to me it seems a simple fresnel used to weight two (or more) different types of reflection, diffuse vs specular. For what i know the sepecular reflection is always stronger at the tangent as on the perpendicular, and never the opposite, correct? That could mean that the reflection with the lowest roughness always dominates the tangent...Sorry, may i say silly things, unfortunately I'm technically very ignorant, that's why sometimes i stick to the empirical approach :)

CodeHD
Posts: 395
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Specular reflection vs diffuse reflection.

Post by CodeHD » Sun Nov 22, 2020 7:43 pm

Could you perhaps clarify what your ultimate goal is? Both w.r.t. this thread as well as your test setup in general.

Upon re-reading your first post, it sounds like you ware aware of this problem first, and now built it specifically to experimentally verify it. Is that correct or was it built for another purpose?

It also sounds like you want the renderengine to be able to produce this specific look.
  • You have initially shown attempts with the Disney material. It may be the wrong model, though I am still continuing to analyse the LuxCore implementation. So far I fell like it exaggerates the effect, but it is difficult to compare with the original paper and its references. I will post findings separately.
  • Then you have stated that you can do it with a double sphere "trick". I assume you want it to be available in a single shader. Again, is that correct, or is there something else to it?

daros
Posts: 43
Joined: Thu Dec 12, 2019 3:25 pm

Re: Specular reflection vs diffuse reflection.

Post by daros » Mon Nov 23, 2020 9:08 am

To be honest, we're doing these photo tests to have a solid base on which to align multiple rendering engines from a quality standpoint. Our rendering platform, Felix, currently uses Maxwell but we want to migrate everything to LuxCore.
I knew about this reflection problem in Maxwell, but I hoped that LuxCore had solved it; Unfortunately that's not the case. In fact it was one of the biggest problems for us with Maxwell and now with LuxCore. The good thing is that LuxCore is open so we can help to find a solution to this problem.
Our rendering system tries to offer its customers an extremely simple material model; however, to achieve this with less effort, we would ideally need a rendering engine that behaves linearly. This reflection problem, which requires a completely different description of the material depending on the overall brightness of the material, makes things slightly more complicated.
So yes, we would like to archieve a similar result to the double-ball-maxwell-trick within a single shader, even through the existing disney shader if that doesn't change the nature of the shader itself.
What do you think or suggest?

Post Reply