OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Give an explicit suggested formula for fuzz base-roughening

Open portsmouth opened this issue 1 year ago • 2 comments

We describe in the spec a recommendation for implementing the roughening that a coat will generate in the underlying base lobes.

image

A similar effect should occur for fuzz also though. In a discussion with Tizian, the author of the fuzz model we use, he noted:

..as soon as you start comparing with proper volumetric layering you'll start to see all sorts of differences. I remember running some of these and the roughening of the base layer was very significant.

So physically this roughening should occur.

Lee Griggs has also noted that without this roughening, the look of fuzz on top of a glossy base is rather artificial.

image

Lee: I thought I would have a go at rendering a dusty car using fuzz but am struggling to get something convincing-looking. I was expecting the fuzz layer to sit on top of the coat layer but, to me, it looks like the dust is glossy. I was hoping to avoid extra shading tricks to add roughness to the dust layer. Am I using fuzz correctly here?

Jamie: That is admittedly a defect of the current fuzz model, which doesn’t explicitly account for the roughening of the base —I.e. the very glossy coat appearance under the fuzz is a bit unrealistic. We should probably develop an improved model that deals with that (and in the meantime come up with some heuristic roughening to suggest).

It would be reasonable, at least as an initial implementation, to use the same formula as the coat roughening. Except in this case, the roughening would be applied to the coat lobe as well as the specular lobes. (And in addition to the roughening of the specular lobes due to the coat).   We should ideally look into developing a more accurate model of the roughening specifically for the fuzz. This would require some Monte Carlo simulation using the microflake fuzz reference simulation from Zeltner et al. A similar investigation could be done for the coat case too (in that case simulating transmission through a rough microfacet coat).

portsmouth avatar Jul 18 '24 15:07 portsmouth

After I implemented the fuzz model, I did some experiments. Since the Zeltner model reference implementation directly gives the reflectance (noted $R$ in the paper and $E_\text{fuzz}$ in the OpenPBR specification), maybe for a layer underneath we can linearly interpolate between its roughness and the roughness resulting from a fully visible fuzz. As a first assumption, I tried considering that roughness to be $1$, leading to: $\alpha'=\text{lerp}(\alpha, 1, x)$ where $x$ is a roughening factor. $x = (E_\text{fuzz} F)^2$ gives plausible results, but it would be interesting to see if we can derive a formula grounded in physics.

virtualzavie avatar Apr 15 '25 14:04 virtualzavie

I think the most simplistic approach would be to use the formula quoted in the spec for the coat roughening, except with the fuzz_roughness $r_F$ and fuzz_weight $\mathtt{F}$ as the presence weight, so:

r'_\mathrm{B} = \mathrm{lerp}\Bigl( r_\mathrm{B}, \mathrm{min} \bigl(1, r^4_\mathrm{B} + 2 r^4_\mathrm{F} \bigr)^\frac{1}{4}, \mathtt{F} \Bigr)

where this

roughening would be applied to the coat lobe as well as the specular lobes. (And in addition to the roughening of the specular lobes due to the coat).

Possibly the fuzz albedo i.e. F$E_\mathrm{fuzz}$ (where F is fuzz_color) could be involved as well. I guess the idea is that higher albedo means more scattering means more roughening. As albedo goes to zero, the fuzz is indeed purely absorbing, so no roughening occurs. So perhaps we can set $r_F$ in the above formula to the product of the albedo and fuzz roughness. (Except albedo is an RGB color, but roughness is a scalar.. In reality the lobe roughening will be color channel dependent due to the albedo. But perhaps in practice using the channel mean works OK, or luminance).

Maybe it's questionable that fuzz doesn't roughen as its own roughness goes to zero, but it does make some sense since in the low fuzz_roughness limit the fuzz particles become fibers which produce a sheen effect (basically looking dusty only at grazing).

Having this approximation suggested in the spec seems better than nothing at all, so will make a PR for it.

To get a formula more grounded in physics will be a lot of effort, since we'll need to run MC simulations with a microflake volume. (Which we can do with the code of the Zeltner paper, so maybe not that bad).

portsmouth avatar May 12 '25 22:05 portsmouth