AcademySoftwareFoundation / OpenPBR

Specification and reference implementation for the OpenPBR Surface shading model
Apache License 2.0
401 stars 17 forks source link

Remove unused transmission roughness from reference graph #173

Closed portsmouth closed 2 months ago

jstone-lucasfilm commented 2 months ago

Isn't the transmission_roughness value still referenced in the dielectric_transmission node of the graph?

https://github.com/AcademySoftwareFoundation/OpenPBR/blob/main/reference/open_pbr_surface.mtlx#L412

portsmouth commented 2 months ago

OK yup, just a misunderstanding on my part. Indeed, a rough coat should roughen the transmission lobe. This needs to be mentioned as part of https://github.com/AcademySoftwareFoundation/OpenPBR/pull/172, i.e. exactly what in the model is modified by the coat roughening effect.

portsmouth commented 2 months ago

Actually, no, it does make sense. The transmission_roughness in this can be replaced with main_roughness:

   <dielectric_bsdf name="dielectric_transmission" type="BSDF">
      <input name="weight" type="float" value="1.0" />
      <input name="tint" type="color3" nodename="if_transmission_tint" />
      <input name="ior" type="float" nodename="modulated_eta_s" />
      <input name="roughness" type="vector2" nodename="transmission_roughness" />
      <input name="normal" type="vector3" interfacename="geometry_normal" />
      <input name="tangent" type="vector3" nodename="main_tangent" />
      <input name="distribution" type="string" value="ggx" />
      <input name="scatter_mode" type="string" value="T" />
    </dielectric_bsdf>

As there is no need to distinguish between the "transmission roughness" and the "reflection roughness" of the dielectric (in OpenPBR).

We do still need to clarify the implementation in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/172.