Merging two BSDFs brings Noise

   2070   11   1
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
Hi,

As the attached pictures mentioned, adding the reflect and refract bsdf together brings noise that doesn't appear in each bsdf individually.

Does anyone know the reason?


Thanks for checking!
Edited by jerry7 - March 30, 2019 00:47:31

Attachments:
bsdf add.png (83.9 KB)
reflect.png (63.8 KB)
refract.png (61.6 KB)
node.png (41.1 KB)
bsdf_noise.hipnc (261.9 KB)

User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
Any thought about it?

I have also founded these noise still existed in PBR Reflection vop with both refraction and reflaction on and they would disappear by turning off either of them.
Is it a bug?
Edited by jerry7 - April 1, 2019 09:32:45
User Avatar
Staff
418 posts
Joined: Sept. 2016
Online
It's not a bug, it's an unfortunate consequences of having 2 bsdfs stacked together. Direct lighting chooses which bsdf to evaluate based on their albedo. The reflection contribution (“kr”) from fresnel is only about 2~3% of the combined contribution (in the circled region), so the vast majority of the lighting samples are reserved for refraction and not enough is left over for reflection.
The recommended solution for such case is to increase shading quality on the light, but there are other workarounds. e.g. add PBR Reflecton and PBR Refraction vops together (with fresnel blend enabled on the bsdfs).
User Avatar
Member
8513 posts
Joined: July 2007
Offline
to me it always felt like a bug or at least a big limitation of direct lighting that makes rendering clean glass like surfaces very painful

it seems to me that forcing at least one sample per brdf per pixel no matter how low the probability is would solve this

as in the above example, if you make even mix of both brdfs 50/50 it's still noisy even with 6*6 samples (with or without ray variance)
while in old school shaders having 1 reflection and 1 refraction sample would be super clean straight away

but honestly 36 samples with 50/50 chance has no reason to be noisy for 2 perfectly specular lobes
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
A workaround I've used in the past that helps with the direct reflection is to disable ‘refract lights’ for the first bounce.

It doesn't help with the noise is coming from deeper bounces, however.
User Avatar
Member
8513 posts
Joined: July 2007
Offline
jsmack
A workaround I've used in the past that helps with the direct reflection is to disable ‘refract lights’ for the first bounce.

It doesn't help with the noise is coming from deeper bounces, however.
how do you reflect/refract lights then?


as this happens also with any mixed brdfs, so even diffuse + reflection, so If I want to have my hdr or other lights reflected I used to replicate them as emissive shader just for reflections/refractions
however that will all be mixed into Indirect Emission AOV, so kind of useless especially if you want to use Per-Light exports
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
tamte
how do you reflect/refract lights then?
You still refract lights, just not for the first bounce. This only works for closed (solid) figures where you can never see any direct refractions. Normal solids always require a minimum of two transmission bounces to a light source. (unless the light is inside the geometry).
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
dlee
It's not a bug, it's an unfortunate consequences of having 2 bsdfs stacked together. Direct lighting chooses which bsdf to evaluate based on their albedo. The reflection contribution (“kr”) from fresnel is only about 2~3% of the combined contribution (in the circled region), so the vast majority of the lighting samples are reserved for refraction and not enough is left over for reflection.
The recommended solution for such case is to increase shading quality on the light, but there are other workarounds. e.g. add PBR Reflecton and PBR Refraction vops together (with fresnel blend enabled on the bsdfs).

Thank you for reply. I want to know why PBR Reflecton and PBR Refraction is ok? What different between them and reflected/refracted light vop? Are they both BSDFs?
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
tamte
to me it always felt like a bug or at least a big limitation of direct lighting that makes rendering clean glass like surfaces very painful

it seems to me that forcing at least one sample per brdf per pixel no matter how low the probability is would solve this

as in the above example, if you make even mix of both brdfs 50/50 it's still noisy even with 6*6 samples (with or without ray variance)
while in old school shaders having 1 reflection and 1 refraction sample would be super clean straight away

but honestly 36 samples with 50/50 chance has no reason to be noisy for 2 perfectly specular lobes

+1, The smooth glass is most common in cg. The Principled Glass factory preset should fit this without any workaround.
User Avatar
Staff
418 posts
Joined: Sept. 2016
Online
jerry7
Thank you for reply. I want to know why PBR Reflecton and PBR Refraction is ok? What different between them and reflected/refracted light vop? Are they both BSDFs?

Reflected/refracted Light VOPs can output BSDF (“f” output, either cone or specular depending on parameters). PBR Reflection/Refraction VOPs are more modern and give you a lot more options. They also have constant albedo unaffected by builtin fresnel (for better or worse - better, in this case), so when you add both together, they each get 50/50 chance of being sampled by the light.
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
dlee
jerry7
Thank you for reply. I want to know why PBR Reflecton and PBR Refraction is ok? What different between them and reflected/refracted light vop? Are they both BSDFs?

Reflected/refracted Light VOPs can output BSDF (“f” output, either cone or specular depending on parameters). PBR Reflection/Refraction VOPs are more modern and give you a lot more options. They also have constant albedo unaffected by builtin fresnel (for better or worse - better, in this case), so when you add both together, they each get 50/50 chance of being sampled by the light.

Hi dlee,
Thank you very much!
I have another question about bsdf render. Why the refraction bsdf must link to output in Raytrace Render Mode? The reflection component is black without link bsdf. But the reflection component is not needed.



Edited by jerry7 - April 3, 2019 02:36:08

Attachments:
bsdf.png (159.8 KB)
bsdf1.png (94.1 KB)

User Avatar
Member
7733 posts
Joined: Sept. 2011
Offline
Using compute lighting invokes the pbr engine, even in raytracing mode. The pbr shader gathers ‘f’ from hit surfaces for secondary bounces to compute indirect lighting. Without exporting ‘f’, there is nothing to be gathered, and secondary hits will render black. The first hit renders okay as the compute lighting is evaluating the ‘f’ connected to it, and only sampling lights.

It is possible to make a shader that doesn't use pbr, such as with the ‘trace’ vop or writing your own gather loop. In this case you can gather ‘Cf’ or any other export and perform light transport using your own method.
  • Quick Links