Based on a discussion found here: https://blenderartists.org/t/luxcorerender-v2-10/1594230/43?u=codehd
A question was raised if the combination Matte Translucent + Glossy Coating should behave differently or identical to just Glossy Translucent.
After an initial look into the source code, I could spot some differences. The most prominent is the evaluation of sideTest:
In glossytranslucent.cpp, using localFixedDir and localSampledDir (depending on hitPoint.fromLight):
|
const float sideTest = Dot(frame.ToWorld(localFixedDir), hitPoint.geometryN) * Dot(frame.ToWorld(localSampledDir), hitPoint.geometryN); |
And in glossycoating.cpp, directly using
localEyeDir and
localLightDir:
|
const float sideTest = Dot(frame.ToWorld(localEyeDir), hitPoint.geometryN) * Dot(frame.ToWorld(localLightDir), hitPoint.geometryN); |
Differences observed so far are when looking at the backside of a 2D-object, or different response to path- and light-tracing.
List of action items (to be extended as the evaluation continues):
Further evaluation should consider the possibility of other base materials, i.e. should not implicitly assume Matte Translucent as a base material. In fact, the wiki article currently states:
The base material is the reflector beneath the glossy coating. If you use the matte material, the result will be the same as the regular glossy material.
Indicating that this may be the implementation reference to be considered, and against which the transluecnt materials may be refactored.
Based on a discussion found here: https://blenderartists.org/t/luxcorerender-v2-10/1594230/43?u=codehd
A question was raised if the combination
Matte Translucent + Glossy Coatingshould behave differently or identical to justGlossy Translucent.After an initial look into the source code, I could spot some differences. The most prominent is the evaluation of
sideTest:In glossytranslucent.cpp, using
localFixedDirandlocalSampledDir(depending onhitPoint.fromLight):LuxCore/src/slg/materials/glossytranslucent.cpp
Line 57 in 54ee101
And in glossycoating.cpp, directly using
localEyeDirandlocalLightDir:LuxCore/src/slg/materials/glossycoating.cpp
Line 91 in 54ee101
Differences observed so far are when looking at the backside of a 2D-object, or different response to path- and light-tracing.
List of action items (to be extended as the evaluation continues):
Further evaluation should consider the possibility of other base materials, i.e. should not implicitly assume
Matte Translucentas a base material. In fact, the wiki article currently states: