OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Account for coat IOR in base roughening

Open portsmouth opened this issue 1 year ago • 2 comments

As discussed on Slack, the coat roughening formula we suggest in the spec:

image

incorrectly ignores the IOR of the coat. For example if the coat IOR is 1, the coat is effectively not present so there should be no roughening effect.

Generally, I think we need to do some simulations to check the actual behavior, and come up with a good fitting formula, as the theory seems a bit hand wavy at present.. At least it should be understood that these formulas are just suggested approximations, but it's not good if they're totally wrong in certain regimes.

portsmouth avatar Oct 15 '24 17:10 portsmouth

Peter's suggestion on Slack for the IOR dependence (based on some hand-wavy but reasonable arguments) was:

r_b^\prime = \left(  r_b^4 + X r_c^4  \right)^\frac{1}{4}

where

X = \begin{cases}
			\mathrm{lerp}(1, 0, \eta^{-1}_c), & \text{if  } \eta_c \ge 1\\
                         \mathrm{lerp}(1, 0, \eta_c), & \text{otherwise}
		 \end{cases} \ .

This seems fine to me as the suggestion we put in the spec. Obviously, this is essentially a guess which has the right qualitative behavior, nothing more. Some more quantitative evaluation of the accuracy is planned.

I suggest a slightly more compact formula which does the same as the above, though:

X = 1 - \min(\eta_c, \eta_c^{-1}) \ .

portsmouth avatar Jun 23 '25 19:06 portsmouth

Also we shouldn't be explicit about the lerp formula with the coat weight, in (61) above. As physically if the coat is partially present, the result will a blend of the original and roughened base lobes, which doesn't look the same as a single lobe roughened by the mixed roughness. Or at least, point out that the use of the mixed roughness is a further approximation.

portsmouth avatar Jun 23 '25 19:06 portsmouth