Skip to content

Initial implementation of specular haze#298

Merged
AdrienHerubel merged 2 commits intoAcademySoftwareFoundation:dev_1.2from
jstone-lucasfilm:dev_specular_haze
Apr 22, 2026
Merged

Initial implementation of specular haze#298
AdrienHerubel merged 2 commits intoAcademySoftwareFoundation:dev_1.2from
jstone-lucasfilm:dev_specular_haze

Conversation

@jstone-lucasfilm
Copy link
Copy Markdown
Member

This changelist adds an initial implementation of specular haze in the reference MaterialX implementation of OpenPBR Surface, as specified in #254.

This changelist adds an initial implementation of specular haze in the reference MaterialX implementation of OpenPBR Surface, as specified in AcademySoftwareFoundation#254.
@portsmouth
Copy link
Copy Markdown
Contributor

portsmouth commented Mar 31, 2026

Review: reference/open_pbr_surface.mtlx

The implementation correctly encodes the spec. Notes by section:

I checked the MaterialX file compiles in the validator.

Haze roughness computation

  • haze_roughness_base = mix(bg=specular_roughness, fg=1.0, mix=spread)lerp(r_core, 1, ξ_h)
  • Coat roughening mirrors the existing core treatment: (min(1, 2·r_coat⁴ + r_haze⁴))^0.25 blended by coat_weight
  • Anisotropy applied via the same open_pbr_anisotropy macro with specular_roughness_anisotropy_clamped, matching the spec ("anisotropy of the haze lobe is identical to that of the core") ✅

Dielectric haze

  • dielectric_reflection_haze / _haze_tf faithfully mirror the core dielectric_reflection / _tf nodes with main_roughness replaced by haze_roughness; all other inputs (tint, ior, scatter_mode, normal, tangent, thin film) are identical ✅
  • dielectric_reflection_with_haze = mix(fg=haze_tf_mix, bg=core_tf_mix, mix=specular_haze)(1 − w)·f_core + w·f_haze, matching the spec formula ✅

Metal haze

  • metal_bsdf_haze / _haze_tf mirror metal_bsdf / _tf with haze_roughness substituted; all parameters (weight, color0, color82, normal, tangent, thin film) copied correctly ✅
  • metal_bsdf_with_haze uses the same mix ordering ✅

Clamping & wiring

  • Both specular_haze and specular_haze_spread have clamp nodes placed consistently alongside the other clamped inputs ✅
  • dielectric_base.topdielectric_reflection_with_haze, base_substrate.fgmetal_bsdf_with_haze

No issues found.

Copy link
Copy Markdown
Contributor

@portsmouth portsmouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@AdrienHerubel AdrienHerubel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AdrienHerubel AdrienHerubel merged commit 475bd90 into AcademySoftwareFoundation:dev_1.2 Apr 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants