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

Add abbe number to dielectric BSDF #2203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdrienHerubel
Copy link

This PR addresses the limitation described in #2202 and makes it possible to implement support for dispersion in the OpenPBR and Standard Surface node graphs.

@portsmouth
Copy link

portsmouth commented Jan 28, 2025

This proposal simply adds to the nodedef of dielectric_bsdf:

<input name="abbe_number" type="float" value="0.0" uimin="0.0" uisoftmin="9.0" uisoftmax="91.0" />

Things to note:

  • The name abbe_number seems sensible. (Abbe is a name, but all params are lower case).
  • The (soft) min and max are taken from OpenPBR. The default of 0 is taken to mean "no dispersion", i.e. technically it corresponds to infinite Abbe number.. Since we presumably want the default to be no dispersion, and 0 is the most obvious sentinel value. (This is the same scheme as in Standard Surface). In OpenPBR we make the default 20, and have another scale parameter which divides that to generate the Abbe number, where the scale defaults to zero. For MaterialX, I think it makes more sense to just have the physical Abbe number (and not the convenience scale factor), with the 0 sentinel meaning infinite Abbe i.e. zero dispersion. See image below (from the Arnold docs) for the effect of typical values.
  • The MaterialX spec needs updating to state the new parameter. The standard definition of what it means requires some formulas (found e.g. on wikipedia), which we specified in detail in the OpenPBR spec. Those can be stated, or referenced, or alternatively just leave it to the implementor to interpret it.
  • The implementation in testrender requires some more thought, as there are various ways to account for refractive dispersion in a renderer (which differ depending on whether pathtracing or rasterizing). I take it this initial PR can just be for the change to the spec, and a testrender implementation can come later.
image

@portsmouth
Copy link

portsmouth commented Jan 28, 2025

In the MaterialX meeting, we noted:

  • it would make sense to add the Abbe number to the "generalized Schlick" BSDF as well, since this is used as a model of dielectric transmission also. In this case the refractive index would map to the F0 of the Schlick model. (The input itself would be the same presumably).
  • it would be good to loop in the OSL and MDL teams (on Slack), to double check that this parametrization works for them.
  • it would be good to outline here (and give some references) how implementations of refractive dispersion in various renderers might be done (pathtracing versus rasterization), to inform how this can be integrated into the various targets for testrender.

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.

2 participants