-
Notifications
You must be signed in to change notification settings - Fork 377
Open-sourcing Imageworks BSDF library #1986
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
base: main
Are you sure you want to change the base?
Conversation
Sony Pictures Imageworks BSDF library (working title BSDL) is here published and introduced to testrender. It is a header only library where everything is inlined and can be used on GPU. Although we haven't kept the BSDFs up to date with the latest research in the last couple of years, I hope you, at least, like the infrastructure. There are three main items in this PR 1. Put BSDL as an INTERFACE cmake library in src/libbsdl. 2. Introduce the switch/case automatic pseudo virtual methods in testrender to handle all the existing BSDFs. 3. As an example integrate SPI's ThinLayer BSDF in testrender and add a test for it. BSDL is a self-contained lib depending only on Imath. There is not even a need to link to OSL and it can be used as a build only dependency. Inside libbsdl directory there is a README with further information, but documentation is the usual weak point with production code. We use this code as-is directly for making movies with our in-house render, and we welcome everybody to contribute theirs. The name "BSDL" is one of my half-broken name ideas and I'm very much open to suggestions. I recommend to first look at my changes to testrender, integration was very easy. Then dive in the internals if you want. Credits for this code go mainly to Chris Kulla and me (Alejandro Conty), but there are also other smaller contributions from other Imageworks members, including alumni Laura Lediaev who wrote the LTC sheen implementation. Signed-off-by: Alejandro Conty <[email protected]>
Very cool, Alex! I haven't had a chance to go through the source yet, but I did run all of the |
Great, you will probably want to see the code removal in shading.cpp because of switch/case -> dispatch() |
Comments from anybody about this? |
We are going to look at it and come back asap. In the previous testrender implementation I noticed a potential issue with the Oren nayar closure losing a factor of PI at every bounce, going through the closures one by one is painful so we are hoping that this update provides a more robust start. |
Hi, everybody. My plan is to merge this on Friday of this week if no significant revision is needed -- that allows the rest of the work week to comment, as well as Thursday's TSC meeting to discuss live. This will only go in main, and so is subject to as much post-merge revision as we want, up to the point of the next major release, so there really is not any risk with getting something wrong and wanting to change the APIs organization. The APIs don't need to be locked down until late this year. |
This change only affects testrender and it does not break it. The BSDL interface is new and we can change it as much as we want until some other render starts using it. |
I'm very excited to try out this change, and the question in my mind is whether it brings OSL Here's the standard render comparison that we run for the MaterialX project, comparing reference renders between OSL |
Description
Sony Pictures Imageworks BSDF library (working title BSDL) is here published and introduced to testrender. It is a header only library where everything is inlined and can be used on GPU. Although we haven't kept the BSDFs up to date with the latest research in the last couple of years, I hope you, at least, like the infrastructure. There are three main items in this PR
BSDL is a self-contained lib depending only on Imath. There is not even a need to link to OSL and it can be used as a build only dependency.
Inside libbsdl directory there is a README with further information, but documentation is the usual weak point with production code. We use this code as-is directly for making movies with our in-house render, and we welcome everybody to contribute theirs. The name "BSDL" is one of my half-broken name ideas and I'm very much open to suggestions.
I recommend to first look at my changes to testrender, integration was very easy. Then dive in the internals if you want. Credits for this code go mainly to Chris Kulla and me (Alejandro Conty), but there are also other smaller contributions from other Imageworks members, including alumni Laura Lediaev who wrote the LTC sheen implementation.
Tests
Added render-spi-thinlayer for the example BSDF
Checklist:
already run clang-format v17 before submitting, I definitely will look at
the CI test that runs clang-format and fix anything that it highlights as
being nonconforming.