-
Notifications
You must be signed in to change notification settings - Fork 366
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 Chiang hair BSDF #1968
Add Chiang hair BSDF #1968
Conversation
Just to recap concretely the request made in the TSC meeting - it would be great if this PR could also include updates to the PBR spec document reflecting the new nodes being added here |
Thanks for the recap @ld-kerley. I will update this PR including the PBR spec document sometime soon. |
I think the sqrtPiOver8 factor might be an internal BSDF implementation detail, rather than something that should be done externally. For example, MDL already applies this factor internally. |
It can be internal. Although that part in MDL I'm not sure. MDL applies the |
I don't think it does. Given the π/8 factor is in the appendix, rather than in equation 8, makes me think it probably should be part of the internal BSDF implementation rather than in <hair_roughness>. But happy to defer to others for that decision. |
You're right. The factor is applied to only azimuthal! I also see where your suggestion came from, and I feel the same now. I will include the change in next update. |
I think <hair_roughness> might need some more changes. In its current form, someone can't tweak the TT and TRT scaling factors. So I'm thinking of two potential changes to accommodate this. possible change 1) <hair_roughness> returns only a single "vec2 roughness" value (corresponding to roughness_R). This means it's only implementing equations 7 and 8, and any TT and TRT scaling should happen externally. Option 1 has less redundancy, but is more work for the user. Option 2 is easier to use, but has redundancy. I'm fine with either option. |
I would prefer the second option with pre-squared defaults, 0.5 and 2.0. Indeed these scaling values are somewhat arbitrary but most implementations follow the Marschner's paper so I think it makes sense that the scaling is built-in and exposed in the parameters. I will make this change as well. Thank you for the suggestion! |
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, thanks @msuzuki-nvidia, and I'm CC'ing @fpsunflower and @niklasharrysson for their thoughts from the OSL perspective.
Great to hear that, and thank you for correcting the spelling issues! |
777826c
into
AcademySoftwareFoundation:main
The current approach for converting GLSL code to MSL doesn't work for the recent Chiang hair PR #1968.
Add Chiang hair BSDF.
This PR provides Chiang hair BSDF model and related nodes proposed by #1973
The nodes to add are:
<chiang_hair_bsdf>
: The BSDF<chiang_hair_roughness>
: User friendly roughness mapping<chiang_hair_absorption_from_color>
: Absorption coefficient mapping from user input color<deon_hair_absorption_from_melanin>
: Absorption coefficient mapping from melanin parametersIt also include
simple_hair_default
material as a node graph example.