Skip to content

Material differences: GlossyTranslucent vs GlossyCoating (+MatteTranslucent) #665

@CodeFHD

Description

@CodeFHD

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):

  • Evaluate current code in greater detail
  • Check existing documentation (wiki, forums posts)
  • Evaluate if any differences are on purpose, add to wiki-documentation and/or source code comments
  • Refactor code to be as uniform as possible (e.g. the order of if/else blocks to handle transmission/reflection)
  • Fix any differences that may not have been intended (or, that don't actually need to be different)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions