Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify details of fuzz model #106

Merged
merged 8 commits into from
Oct 6, 2023
Merged

Clarify details of fuzz model #106

merged 8 commits into from
Oct 6, 2023

Conversation

portsmouth
Copy link
Contributor

I've refactored the fuzz model discussion to be much more explicit about the specific model we recommend, i.e. the model presented in:

"Practical Multiple-Scattering Sheen Using Linearly Transformed Cosines", Zeltner et. al 2022.

I think I give enough detail to be able to easily make the correspondence between our parameters and the paper and reference implementation. This model I think is also much more physically appealing than the Conty-Kulla one, as it directly models a volumetric layer of microflakes, albeit using a simplified model which is fit to simulations of this.

Is is a little scary recommending a model which we have not ourselves implemented/tested though, but I'd suggest we just be bold and recommend it, then implement it ASAP and make adjustments as needed.

image

@jstone-lucasfilm
Copy link
Member

@portsmouth Although I strongly support the idea of specifying a canonical fuzz model in OpenPBR, I'll note that we don't need to specify an untested model, and have the option of selecting the tried-and-true Kulla/Conty model for this initial revision, leaving it to future OpenPBR revisions to update to the more modern Zeltner/Burley model.

I don't have a strong preference on which model we choose for OpenPBR, but it seems important that it be well tested, both in production renderers and in the hands of a broad group of artists.

@portsmouth
Copy link
Contributor Author

portsmouth commented Oct 2, 2023

I would prefer to use the Zeltner-Burley-Chiang model, as it matches an explicit simulation of a material consisting of fibers. The Conty-Kulla model appears to produce a dimmer backscattering rim and almost no forward scattering.

Also their model has a clearer physical interpretation, as it was designed to match a simulation of light scattering from (and transmitting through) a thin layer of non-absorbing microflakes. Whereas the Conty-Kulla model is more ad-hoc and it's not clear exactly what it is modeling, so it's also physically unclear how it should be layered. (Not really a practical problem of course, but unappealing to someone interested in physically correct light transport).

I think there's very little risk in choosing this as the recommended model, and probably it's better for users (i.e. more realistic and expressive). That said, of course I'll be more comfortable once we have an implementation to try.

We are also introducing new models in others area (the new SSS parametrization, the new diffuse transmission, the more physical Fresnel dependence on IOR, the new anisotropy parametrization), so a lot of things are not well tested, or tested at all. I'm not worried though since all of these changes were thought about a lot, and designed to be more physically correct or expressive. If on testing we find there's some genuine issue with any of these things, we can obviously adjust as needed.

@peterkutz
Copy link
Contributor

This looks good to me based on a first readthrough. Thanks for making these additions and changes to the spec.

I had started implementing the Zeltner-Burley-Chiang model a couple weeks ago and might still try to finish the implementation before next week's code freeze. It shouldn't be too hard to prototype considering that the authors provide a self-contained reference implementation.

@portsmouth
Copy link
Contributor Author

portsmouth commented Oct 5, 2023

I had started implementing the Zeltner-Burley-Chiang model a couple weeks ago and might still try to finish the implementation before next week's code freeze. It shouldn't be too hard to prototype considering that the authors provide a self-contained reference implementation.

Yep their reference implementation is very clear.

Note that in my description in the spec, I had to think a bit about whether to use $\omega_i$ or $\omega_o$ in the formulas. In their paper for example, the output direction cosine appears on the left (so one needs to integrate over output cosine to get a directional albedo). But in the usual interpretation in a renderer, "output" means output photon, so it's the input cosine that is being integrated over and sampled (as the output photon angle is known when proceeding from the camera direction). I've seen it on a t-shirt, so it must be correct 😛:

image

In their reference implementation though, they seem to use the standard approach, which is like the formula I wrote in the spec. The directional albedo I write as a function of known output angle, as elsewhere in the spec.

(We are a bit hazy in the spec currently about the meaning of $\omega_i$, $\omega_o$ and which is being sampled given the other etc.).

I also tried to write down the full details with the matrices and LTC transformation etc., but it looks a bit too complicated. It seems unnecessary to give that detail though, we only need to give enough to make it unambiguous how to implement given the parameters in our spec and the details given in the paper.

Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

This looks like a great step forward, thanks @portsmouth!

@jstone-lucasfilm jstone-lucasfilm changed the title Fuzz model elaboration Clarify details of fuzz model Oct 6, 2023
@jstone-lucasfilm jstone-lucasfilm merged commit 3fc8e8d into AcademySoftwareFoundation:main Oct 6, 2023
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