OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Roughening improvements

Open portsmouth opened this issue 6 months ago • 4 comments

According to the discussion in https://github.com/AcademySoftwareFoundation/OpenPBR/issues/239 (and on Slack), we need to provide a less obviously wrong suggestion for the coat roughening effect.

I wrote up the formula for the IOR dependence suggested by @peterkutz (with my simplification applied):

image

According to the discussion in https://github.com/AcademySoftwareFoundation/OpenPBR/issues/226, we also need to provide some suggested approximation for the roughening effect of fuzz.

I wrote up the formula I proposed, based on feedback from @peterkutz and @virtualzavie.

image

In my Arnold test implementation, I also had $R_F$ multiplied by the fuzz_roughness parameter, but on reflection that seems unjustified, since the reasoning is supposed to be that the roughening is being approximated/proxied by the reflection albedo (times tint), which is a function of the fuzz_roughness (so no need for an extra factor of fuzz_roughness). Intuitively, if fuzz_roughness is low, the microflakes are thin fibres which scatter very little so light normally incident travels more-or-less straight through undeflected, except near grazing where a forest of fibres is visible so the resulting albedo is significant, so such low fuzz_roughness fuzz will roughen the base only when viewed near grazing.

I will re-do my renders of the effect to check what visible difference this makes.

I'll note these formulas (particularly the one for fuzz) are obviously just generated purely out of (educated) guesswork. Possibly we should add some caveat noting that, though we do say they are just approximations. The use of the luminance of the tint to get a scalar roughening seems particularly flaky. It still seems worth suggesting them, as without them implementations have no guidance, and the resulting look will be less plausible.

Ideally we would have a better sense of how bad the approximations are, by comparing to some data/simulations, and develop more principled fits. We're working on that. (And if we do develop better approximations, we should eventually move them into our tech report, rather than provide the details in the spec itself).

portsmouth avatar Jun 24 '25 02:06 portsmouth

I think we need to think a bit about what the effect of the fuzz tint color should be.

With the roughening heuristic above, I get the following results when the fuzz color is varied from light to dark.

light fuzz dark fuzz
new_r1 0 new_colored_r1 0

When the fuzz is dark, our heuristic reduces the roughening, so we see a sharp highlight. However, I think we were assuming that dark fuzz (with high weight and roughness), should produce dark fuzzy patches, not just look transparent. This doesn't happen though, because the color only modulates the fuzz reflection, it does not alter the throughput/transmittance to the base.

I find that a bit unconvincing as if the fuzz is same density in the left and right image, you would expect the highlight to be much more dimmed on the right. In reality, more absorbing dust should reduce the transmittance as well as the reflection. It may be inherent in the Zeltner model though, that this more realistic volumetric absorption isn't really captured.

portsmouth avatar Jun 24 '25 14:06 portsmouth

Regarding the effect of dark fuzz in the images, I think the

I find that a bit unconvincing as if the fuzz is same density in the left and right image, you would expect the highlight to be much more dimmed on the right. In reality, more absorbing dust should reduce the transmittance as well as the reflection. It may be inherent in the Zeltner model though, that this more realistic volumetric absorption isn't really captured.

True. The Zeltner model is based on non-absorbing microflakes and it doesn't make a distinction between scattered and unscattered transmission. So some of the transmitted light is actually scattered light that should be eliminated if the single-scattering albedo of the microflakes is zero. So I agree that the dark fuzz should technically darken the base surface more. That said, in your renders it's hard to see how much the dark fuzz is actually darkening the base because the specular highlight is overexposed and the background is black.

peterkutz avatar Jun 26 '25 19:06 peterkutz

Great to have the IOR officially included in the spec's coat roughening formula and a mention of fuzz roughening.

Conceptually, the form of the fuzz roughening is questionable compared to coat roughening. The coat has a refractive interface, so all light passing through it is scattered. But the fuzz is effectively a volume without an interface, so only some of the transmitted light is scattered. The fuzz should ideally produce a mixture of roughened and un-roughened base lobes. Plus the scattering distribution should ideally be different due to the anisotropic scattering of the fuzz.

So, I wonder if a stochastic selection of roughened and un-roughened base roughness (based on a rough estimate of the scattered/unscattered transmission of the fuzz) would produce better results. (The proposed specular haze could potentially be leveraged to roughen only a fraction of the light, but the haze might already be in use.)

peterkutz avatar Jun 26 '25 20:06 peterkutz

Totally agree that we need to do more work on both of these formulas to produce the best approximation we can offer. For this we are going to need a combination of theory and simulation. I’m hoping we can work on this in the coming weeks as part of the preparation for the siggraph presentation. Even if it doesn’t make it into the presentation, we probably have enough time (say till the end of the year) to come up with a more physically based model for the 1.2 release.

portsmouth avatar Jun 26 '25 22:06 portsmouth

I am removing the roughening from the 1.2 scope as discussed in the meeting. We currently don't have a consensus for a good approximation of the roughening effect and having a built in approximation that is not satisfactory and can't be dialed down could be detrimental. We could acknowledge in the spec that roughening should happen but that the literature does not provide a suitable approximation at the moment.

AdrienHerubel avatar Dec 09 '25 14:12 AdrienHerubel