Disney BRDF material

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Disney BRDF material

Post by epilectrolytics »

Dade wrote: Fri Jun 07, 2019 2:24 pm Side note
There is a theoretical advantage in using disney BRDF for all materials in a scene when rendering on GPUs: lack of threads divergence.
When that means that there must not be any non-Disney materials in the scene for the effect to take place it would be great to complement the shader with an option for refractive materials like the cycles version already has by adding transmission and IOR sliders.

Otherwise all scenes with glass materials would not profit from the advantage.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Disney BRDF material

Post by Dade »

epilectrolytics wrote: Fri Jun 07, 2019 4:33 pm Bad news:
When trying to render with PGI indirect cache + Disney materials Blender crashes or I get a black render with a console warning: nothing is visible and/or cache enabled :cry:
scene link
Also I noticed unlike matte or glossy Disney material is one sided = black on the back side.
The code is missing some "glossiness" related function to make it PGI usable, I will add the missing support.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Disney BRDF material

Post by Dade »

epilectrolytics wrote: Fri Jun 07, 2019 5:33 pm When that means that there must not be any non-Disney materials in the scene for the effect to take place it would be great to complement the shader with an option for refractive materials like the cycles version already has by adding transmission and IOR sliders.
This is an implementation of the original 2012 Disney Siggraph paper. Disney has than extended the model to allow transmission and presented the results in 2015 Siggraph course.

Indeed, we can upgrade the code to support transmission too.
epilectrolytics wrote: Fri Jun 07, 2019 5:33 pm Otherwise all scenes with glass materials would not profit from the advantage.
Only samples involving the glass will diverge and it does matter only if it happens inside a group of 16 or 32 contigue samples (depend on GPU SIMD width). Short version: you are likely to get most of the speed up with the glass too.

Just try to render your previous test scene with a glass sphere, it should be still faster.
Support LuxCoreRender project with salts and bounties
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Disney BRDF material

Post by epilectrolytics »

Dade wrote: Fri Jun 07, 2019 6:54 pm The code is missing some "glossiness" related function to make it PGI usable, I will add the missing support.
Great, thanks!
Dade wrote: Fri Jun 07, 2019 7:00 pm Just try to render your previous test scene with a glass sphere, it should be still faster.
Ok I already suspected this because in my test scene there was no speed difference if the sphere had a mirror material or Disney 100% metallic & reflectance.

Great work!
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: Disney BRDF material

Post by acasta69 »

B.Y.O.B. wrote: Fri Jun 07, 2019 4:13 pm What I would find cool would be an Azure script that creates a new BlendLuxCore daily build whenever:
a) a LuxCore daily build is published
b) a commit is pushed to the BlendLuxCore repo
But it would be a bit of work + requires knowledge of Azure scripts (which I don't have at the moment).
Yes, that would be cool and I'd like to implement it as a next step of our build automation.
But I don't have much free time lately... :(
Hopefully during the summer...
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Disney BRDF material

Post by B.Y.O.B. »

epilectrolytics wrote: Fri Jun 07, 2019 4:33 pm Also I noticed unlike matte or glossy Disney material is one sided = black on the back side.
I would consider this a bug. It should behave the same on front and back faces.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Disney BRDF material

Post by lacilaci »

I think it would be best if all materials behaved same way in front and backside. The only exception should be a 2 sided type of material or texture.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Disney BRDF material

Post by Dade »

B.Y.O.B. wrote: Sat Jun 08, 2019 11:12 am
epilectrolytics wrote: Fri Jun 07, 2019 4:33 pm Also I noticed unlike matte or glossy Disney material is one sided = black on the back side.
I would consider this a bug. It should behave the same on front and back faces.
I don't remember how it is supposed to work but it is likely to be a bug however try also to check another implementation like the Cycles one to see if the behavior matches or not.
Support LuxCoreRender project with salts and bounties
kintuX
Posts: 810
Joined: Wed Jan 10, 2018 2:37 am

Re: Disney BRDF material

Post by kintuX »

I too confirm a single sided bug. (Principled in Cycles works fine on both sides)
Lux_DisneyBRDF_bug.jpg
Sharlybg wrote: Fri Jun 07, 2019 4:37 pm
Found Disney's Specular value rendered with OCL a bit brighter than CPU/BiDiR.

Note: Only blue material. Difference shown in yellow.
Although there's a small difference in Glossy too (Red material, Dif. in Blue)
There is a huge specularity dif between your render test :shock: . Bidir is far less specular while OCl GPU is like adding another coating layer. and simple CPU is like a mix of them.
Maybe to the naked eye. It's same scene just different engines used.
For BiDir vs UniDir i expect minor differences, but not such a difference using GPU vs CPU. Though IIRC, i think it's an old issue, got something to do with precision (was already readapted/corrected a few times).
Anyways...
If anyone is interested, Test scene (for latest BlendLuxCore daily 2.2beta): LuxCore2-2Ball.7z 20.6MB (@mega.nz)
Last edited by kintuX on Sat Jun 08, 2019 1:32 pm, edited 1 time in total.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Disney BRDF material

Post by B.Y.O.B. »

Dade wrote: Sat Jun 08, 2019 1:15 pm I don't remember how it is supposed to work but it is likely to be a bug however try also to check another implementation like the Cycles one to see if the behavior matches or not.
In Cycles it looks the same on front and back faces.
Attachments
2019-06-08_15-26-35.png
Post Reply