OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

TODOs following SIGGRAPH write-ups

Open portsmouth opened this issue 4 months ago • 2 comments

Various problems with the current spec have been noticed and discussed as a result of the work on the write-ups for SIGGRAPH. I'll collect those here for reference, and PRs can be created as needed following further discussion.

  • Coat darkening (implementation). I noticed an error in the coat darkening code (in the numerator of the darkening factor), which I fixed in the pseudo-code listing in the write-up. This will have affected the look particularly with colored base and coat. This seems pretty important to get right, since the darkening is on by default, and we don't want it producing artifacts. We need to:

    • check the new darkening code theory and renders
    • implement the correction in MaterialX (and our internal implementations)
    • fix up the recommended formulas in the spec (or just omit them and refer to the new document).
  • Coat darkening (specification). There is an inconsistency in the current (v1.2) proposed statement of how the coat darkening parameter works, since we define it in terms of an albedo which is only sensible in the perfectly smooth case. This can be generalized with better wording though, which will also bring it in line with the more careful statements made for subsurface and glossy-diffuse.

  • Coat darkening (theory). The formula we state for the darkening effect in the case of a smooth base is probably incorrect. In this limit there is an exact solution (for a smooth coat), which we should properly work out.

  • Thin-walled mode. It was noted that the spec is currently not clear enough for an implementor in various aspects. See Slack threads here and here. In particular:

    • generally the implementation is not super obvious (of the ladder of reflections in the absorbing, rough thin-wall), since we don't reference a standard paper (there isn't one). A write-up of a recommended model would be helpful.
    • In the subsurface case, it's not stated correctly since the dielectric/spec Fresnel reflection has to still happen, but we don't make it clear how. Really we need to say the thin-wall is embedded (or bounded) by surrounding dielectric interfaces, more explicitly. (This likely won't impact implementations though, since they are already implicitly made that assumption).
    • transmission_depth is ignored in this mode, which is not clear.
    • It's not clear how to account for coat_color in thin-walled mode. In the mirroring assumption, it should be applied twice (but is not in Arnold, for example). The assumed behavior should be stated more explicitly. (Also what about fuzz, is it evaluated twice, or the color modified?).
    • It's not very clear what we recommend for thin-walled materials with different materials on each side. We should probably explicitly say it's out of scope.
  • Albedo definitions: In the discussion of the meaning of base_color for the glossy-diffuse slab, and subsurface_color, we talk about them controlling the "multi-scatter" albedo, but we don't make clear how the surrounding media (coat etc.) are involved. Probably we need to say that these definitions (of the meaning of the colors) are done in the vacuum exterior case, as e.g. we don't want the underlying albedos of the base adjusting as the coat properties change.

portsmouth avatar Aug 13 '25 15:08 portsmouth

Just to note some coat artifacts I observed in Arnold (Maya 2026.2), for example here applied to a granite-like base. With the coat darkening on (right panel), which is the default, there are some small regions of blown out purple color, possibly NaNs.

We should check that the modifications proposed in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/253 (once fixed up to correctly implement the math in the write-up), solve these. (And also check reasonably thoroughly that no other artifacts occur, since the darkening is on by default).

uncoated coated, undarkened coated, darkened
Image Image Image

portsmouth avatar Aug 19 '25 13:08 portsmouth

Coat darkening (theory). The formula we state for the darkening effect in the case of a smooth base is probably incorrect. In this limit there is an exact solution (for a smooth coat), which we should properly work out.

This has been worked out and written up in the tech notes. We just need to reference that, either in the spec text or just citing it.

portsmouth avatar Nov 11 '25 17:11 portsmouth