-
Notifications
You must be signed in to change notification settings - Fork 24
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
specular_weight reinterpretation #247
base: main
Are you sure you want to change the base?
specular_weight reinterpretation #247
Conversation
Adding here the finalized logo. This is almost identical to the one posted on Slack, except: - extremely small adjustment to the arrow head, to make it perfectly centered on and orthogonal to the stroke - SVG was optimized to remove redundant elements (e.g. gradients). Main logo is now only 10Kb. PNGs exported at 800dpi.
Implements the change described in AcademySoftwareFoundation#229.
…oftwareFoundation#238) Rather than eliminating the `specular_weight` > 1 case (as proposed in AcademySoftwareFoundation#228), we discussed keeping this but fixing up the metal logic to ensure the Fresnel remains bounded. This makes the corresponding change needed in the spec. (Note that now the `specular_weight` parameter consistently, for both metal and dielectric, has soft-range $[0,1]$ and full range $[0, \infty]$). It would be good to double check that the behaviour of the metal looks reasonable for high `specular_weight` values (presumably, similar to the dielectric where the Fresnel saturates).
…dation#218) Some minor changes are needed to improve the clarity of the wording (around the implementation of the coat details). I discovered these while using the spec myself to implement the Arnold version.
An alternative take could be to split the IOR used for fresnel from the IOR used for refraction (ray bending). This is the approach we took in Unreal's path tracer and it does have a number of advantages:
One natural reservation about this idea is -- how does this work with total internal reflection? The refraction equation for computing how the ray bends falls apart at a critical angle -- if this angle doesn't match the fresnel curve, one would think you would get a weird artifact if they don't line up. There is a property of the dielectric fresnel equations that isn't immediately obvious, but allows this to work:
Here In plain english, what this means is that the Fresnel curve you get when entering the material, is the same as the compressed Fresnel curve you get when exiting the material. As long as you do the "compression" using the refraction IOR, you are free to use any fresnel curve you want, you only need a curve with the right F0 value and have it tend towards 1.0 at grazing angles. Past the grazing angle when leaving the material, you have TIR and just use 1.0 (full reflection). This also gives a recipe to replace the dielectric fresnel with the Schlick approximation if you want to (as has been documented in other talks like the Disney BSDF writeup or Natty Hoffman's talk on Fresnel). Some other details that might be relevant -- we use the albedo scaling approach for energy conservation. At first I was worried that decoupling the IORs would require an extra dimension in the albedo table. However in practice, the specular IOR has a minimal effect. So sticking to a 3D table with (cos_theta, roughness, refraction IOR) is sufficient for good results. I don't recall if the OpenPBR spec spells out the behavior of nested dielectrics -- but this can all be taken into account easily if you want. Again, you have a additional degrees of freedom over the behavior here, but the physically correct behavior can be kept. |
This decoupling of the ray bending and the reflection seems like a more aggressive "non-physical" modification than having If we did this, then If it's considered reasonable to have this non-physical behavior of |
It was noted on Slack by Masuo that it seems a bit strange that the refraction changes when
specular_weight
is varied. This happens because in the current spec, we say that thespecular_weight
controls the IOR of the dielectric.For a glass object, this may be unintuitive:
specular_weight 1
specular_weight 0.1
The issue is that the name implies "specular presence", so in this case the artist probably expects the control to merely kill the reflection from the glass, not change the refraction as well. We do already have a control that does that, namely
specular_color
, but it is unintuitive to use that control for dialing the dielectric reflectivity.So the proposal here is to have the
specular_weight
simply function as a multiplier to that existing color (so it becomes simply an overall weight factor for the whole lobe). This matches how thespecular_weight
functioned in Standard Surface.The change to the spec amounts to a wording change only:
Note that this change requires: