Volume Scattering Test Assets - #269
Conversation
|
I've updated the second asset now to vary I also added text labels for the axes. |
|
During the PBR meeting we talked about the need for updated screenshots here. |
|
I've updated the scattering assets to use the new KHR_materials_scatter extension as well as added a couple of new assets to test the new |
…ttering) Closes the subsurface gap flagged as our one hard limitation in the Khronos / Adobe OpenPBR thread, and makes us an early implementer of the draft extension while Mike Bond's conformance assets are still in review (KhronosGroup/glTF-Sample-Assets#269). Parses scatterStrengthFactor (+ texture, ALPHA channel), multiscatterColorFactor (+ texture, sRGB RGB) and scatterAnisotropy, adds two material texture slots and two vec4s to the material SSBO, and shades the lobe inside the existing transmission branch. APPROXIMATION, and the spec allows it explicitly: "it is acceptable to approximate volumetric mode using thin-walled mode behavior" for dense subsurface materials. So volumetric mode runs the thin-walled BSDF -- a Lambertian lobe of the multi-scatter albedo, split by anisotropy into a forward half (the most-blurred scene copy standing in for a diffuse BTDF) and a backward half (a diffuse reflection), per the spec's (1+g)/2 and (1-g)/2 energy split. Full transport -- Kulla-Conty multi-to-single albedo remap driving a Henyey-Greenstein walk -- has no place in a forward raster pass. Dense is exactly the regime these assets occupy. Measured on the conformance assets, whole-sphere means: ScatterAnisotropy, Volume row before after reference g=-1 ( 36, 40, 49) (195,176, 68) (199,162, 92) g= 0 ( 30, 34, 41) (192,174, 54) (200,161, 81) g= 1 ( 25, 28, 35) (147,136, 42) ( 75, 70, 57) Before, the five spheres rendered IDENTICALLY -- the only material property that varies across that sweep is scatterAnisotropy, so with the extension ignored there was nothing to see. The sweep now varies monotonically in the reference's direction. THE DENSITY BUG, caught by eye on the 4x4 grid asset. Mixing on scatterStrength alone discards the Beer-Lambert result, and since every conformance asset sets scatterStrengthFactor = 1 that collapses to "always fully scattered" -- rendering four IDENTICAL attenuationDistance rows. The mix is now weighted by optical depth, 1 - exp(-thickness/attenuationDistance), so a sparse volume stays a mostly-clear BTDF showing the backdrop and a dense one fully diffuses. Sparse->dense luma now moves +57% against the reference's +47%. Known gaps, documented in the README rather than left to be discovered: the density response SATURATES past optical depth ~1 where the reference keeps grading, and the result is OVER-SATURATED, because real multiple scattering desaturates as it redistributes energy between bounces and one Lambertian bounce cannot. Neither is fixable without a real multi-bounce term. Also: SIM_DISPLAY_OUTPUT gains "2d". It previously had no value that could select single-view -- "2d" fell through to the anaglyph default -- which matters for measurement, since anaglyph combines the views per colour channel and destroys exactly what is being measured. Draft extension; subject to change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UQJUXzuNLSNtTFjjYVcZig
|
Here are the current results from vk_gltf_renderer
|
…ssets into mbond/volume_scatter_anisotropy
|
This branch needs a merge or rebase from main so that it can run the new CI. Also we talked in the PBR TSG meeting about the need for the text labels on "Scatter Anisotropy" to avoid using +/- 1. |
| "version": 2, | ||
| "legal": [ | ||
| { | ||
| "license": "CC-BY 4.0", |
There was a problem hiding this comment.
I think all four of the metadata.json files in this PR need to use dashes here, CC-BY-4.0 instead of the space. That appears to be the cause of the CI failure.







Here are a couple of possible conformance assets to test KHR_materials_volume_scatter.
The first one test varying values for anisotropic scattering:

The second one tests varying scattering colours and attenuation distances while attenuationColor is held constant. As multiscatterColorFactor tends to black, scattering is replaced by attenuation.

This one tests the scatterStrength parameter for thin-walled scattering.

And this one tests scatterStrength for volumetric scattering.
