I want to implement a standard surface material similar to arnold, like https://autodesk.github.io/standard-surface/
However, when luxcore performs evaluation, only one of the reflection and transmission can be calculated at a time. How can I implement multiple lobes like a standard surface?
I want to implement a standard surface material similar to arnold
Re: I want to implement a standard surface material similar to arnold
Or similar to the principled BSDF of cycles, adding a transmit to the Disney modelBruceXu wrote: ↑Wed Sep 02, 2020 2:06 am I want to implement a standard surface material similar to arnold, like https://autodesk.github.io/standard-surface/
However, when luxcore performs evaluation, only one of the reflection and transmission can be calculated at a time. How can I implement multiple lobes like a standard surface?
Re: I want to implement a standard surface material similar to arnold
You could take a look at the disney material, especially https://github.com/LuxCoreRender/LuxCor ... y.cpp#L269
Re: I want to implement a standard surface material similar to arnold
Yes, I'm actually learning the luxcore code, but the disney material in luxcore does not have the transmission effect.B.Y.O.B. wrote: ↑Wed Sep 02, 2020 11:10 am You could take a look at the disney material, especially https://github.com/LuxCoreRender/LuxCor ... y.cpp#L269
I want to add the transmission effect to the luxcore disney material.
Currently, I add a transmit branch using localLightDir.z * localEyeDir.z in the evaluate function and add a transmit branch using passThroughEvent in the sample function.
I don't know if I'm doing it right.
Re: I want to implement a standard surface material similar to arnold
Just check the glass code: https://github.com/LuxCoreRender/LuxCor ... s.cpp#L190BruceXu wrote: ↑Wed Sep 02, 2020 2:06 am I want to implement a standard surface material similar to arnold, like https://autodesk.github.io/standard-surface/
However, when luxcore performs evaluation, only one of the reflection and transmission can be calculated at a time. How can I implement multiple lobes like a standard surface?
You decide if to transmit or reflect (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L230) than adjust the PDF according what you are doing (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L236 for reflect and https://github.com/LuxCoreRender/LuxCor ... s.cpp#L247 for transmit).
Re: I want to implement a standard surface material similar to arnold
OK,I'll try.Dade wrote: ↑Wed Sep 02, 2020 11:49 amJust check the glass code: https://github.com/LuxCoreRender/LuxCor ... s.cpp#L190BruceXu wrote: ↑Wed Sep 02, 2020 2:06 am I want to implement a standard surface material similar to arnold, like https://autodesk.github.io/standard-surface/
However, when luxcore performs evaluation, only one of the reflection and transmission can be calculated at a time. How can I implement multiple lobes like a standard surface?
You decide if to transmit or reflect (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L230) than adjust the PDF according what you are doing (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L236 for reflect and https://github.com/LuxCoreRender/LuxCor ... s.cpp#L247 for transmit).
Re: I want to implement a standard surface material similar to arnold
Emmm, in addition, is the wo and wi to determine whether to reflect or transmit in evaluate funtion?Dade wrote: ↑Wed Sep 02, 2020 11:49 amJust check the glass code: https://github.com/LuxCoreRender/LuxCor ... s.cpp#L190BruceXu wrote: ↑Wed Sep 02, 2020 2:06 am I want to implement a standard surface material similar to arnold, like https://autodesk.github.io/standard-surface/
However, when luxcore performs evaluation, only one of the reflection and transmission can be calculated at a time. How can I implement multiple lobes like a standard surface?
You decide if to transmit or reflect (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L230) than adjust the PDF according what you are doing (https://github.com/LuxCoreRender/LuxCor ... s.cpp#L236 for reflect and https://github.com/LuxCoreRender/LuxCor ... s.cpp#L247 for transmit).
Re: I want to implement a standard surface material similar to arnold
Glass is a specular material (i.e. a delta one) so GlassMaterial::Evaluate() always return "Black": https://github.com/LuxCoreRender/LuxCor ... ss.cpp#L41
In GlassMaterial::Sample(), the decision if to sample transmission or reflection is based on the random variable "passThroughEvent": https://github.com/LuxCoreRender/LuxCor ... s.cpp#L230