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

Propose guidelines and approximations for real-time implementation #248

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

virtualzavie
Copy link
Contributor

This PR is an attempt at proposing guidance for real-time implementation of OpenPBR, which there have been multiple requests for, including #241.

The proposal is to centralise the information relevant to real-time implementation in one place that is easy to identify and refer to in the document. There, we state clearly what the implementer is allowed to do while still complying to the specification, and we propose some approximation they can use. Ideally, we would even propose code snippets ready to use in an annex.

image image

Copy link

@dgovil dgovil left a comment

Choose a reason for hiding this comment

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

Thanks for explicitly calling out that approximations are permitted. This will be a very useful clarification.

I left a couple small typo notes as I was going through.

Approximations for constrained implementations
==============================================

This specification describes a model which includes a number of features that can be computationnally expensive and therefore impractical to support in certain contexts, like real-time applications or mobile devices.
Copy link

Choose a reason for hiding this comment

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

Typo: Computationnally -> Computationally (double n)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, fixed at 8416388.


The Historical background and objectives section explains how the goal of this specification is to provide an ideal, reference appearance. The implementer is, however, free to make decisions and approximations to satisfy their practical constraints. We cannot dictate what those approximations should be, as this depends on the use case. We can, however, propose some possible approximations and offer guidelines to help the implementer make those decisions.

As a general rule of thumb, we invite the implementer to think of those approximations in the same way one would think of different levels of detail (LOD) variants of an asset. Just like such an asset would become more coarse with distance while retaining as much detail as necessary to remain faithful to the original, an implementation of OpenPBR may decide to make simplifications, as long as the result remains reasonably faithful to the intent given the practical constraints. In the most extreme hypothetical case, the model might even get reduced to as little as a single Lambert BRDF.
Copy link

Choose a reason for hiding this comment

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

Typo: more coarse -> coarser

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 8416388.

Layering and mixing
-------------------------------------

As mentioned in the Reduction to a mixture of lobes section, the mix and layer operations can approximated as a weighted sum of BSDF lobes.
Copy link

Choose a reason for hiding this comment

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

Typo: approximated -> approximate or be approximated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 8416388.

@AdrienHerubel AdrienHerubel self-requested a review February 5, 2025 13:44
Copy link

@meshula meshula left a comment

Choose a reason for hiding this comment

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

this PR seems to include much unrelated history. does it need to be rebased?


This specification describes a model which includes a number of features that can be computationally expensive and therefore impractical to support in certain contexts, like real-time applications or mobile devices.

The Historical background and objectives section explains how the goal of this specification is to provide an ideal, reference appearance. The implementer is, however, free to make decisions and approximations to satisfy their practical constraints. We cannot dictate what those approximations should be, as this depends on the use case. We can, however, propose some possible ones and offer guidelines to help the implementer make those decisions.
Copy link

Choose a reason for hiding this comment

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

suggest: We don't dictate

obviously we could dictate, but choose not too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. Reworded at fdd20b3.

@virtualzavie
Copy link
Contributor Author

this PR seems to include much unrelated history. does it need to be rebased?

Yes, most likely. I think I either didn't branch off the right point, or didn't open the PR towards the proper branch.

@virtualzavie
Copy link
Contributor Author

virtualzavie commented Feb 11, 2025

this PR seems to include much unrelated history. does it need to be rebased?

I've rebased the branch on top of main, excluding the commits from the 1.x branches that were unrelated to the PR.

@meshula
Copy link

meshula commented Feb 11, 2025

Thanks! The diff is so much easier to look at now :)

Copy link

@meshula meshula left a comment

Choose a reason for hiding this comment

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

This is looking good to me. I've suggested that we should more explicitly direct the reader to the named sections ~ but maybe that's not necessary because the document gets published in a way where the sections are immediately obvious?

Layering and mixing
-------------------------------------

As mentioned in the Reduction to a mixture of lobes section, the mix and layer operations can be approximated as a weighted sum of BSDF lobes.
Copy link

Choose a reason for hiding this comment

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

since Reduction to a mixture of lobes is not a named section in this document, can we link or otherwise direct the reader somehow?


- [#McAuley15] describes a simpler and cheaper method based on [#Revie2011], consisting in modifying normals and offering a very crude approximation of anisotropic reflection.

- Finally, the crudest approximation would be to ignore entirely the `specular_roughness_anisotropy` for the base layer specular lobe (respectively `coat_roughness_anisotropy` for the coat specular lobe), as the anisotropy parametrization in designed to preserve the average roughness regardless of the anisotropy (see the Microfacet model section for details).
Copy link

Choose a reason for hiding this comment

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

since the Microfacet model section is not a named section in this document, can we link or otherwise direct the reader somehow?

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