-
Notifications
You must be signed in to change notification settings - Fork 431
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 Python GPU renderer implementation example #1493
Add Python GPU renderer implementation example #1493
Conversation
|
Signed-off-by: Michael Dolan <michdolan@gmail.com>
7f5969c
to
4a8dac4
Compare
Fantastic, this is extremely useful! I hope we can also discuss some level of abstraction so that for a end user it can be as simple as calling |
[Question] Why not creating an apps (like |
I could rebrand this example as pyociodisplay and move it to the apps folder, refining it over time. |
Thanks for sharing @michdolan ! I'm working on having it work on macOS, will report when succeeded. Would be great for it to support all 3 major platforms. Edit: I also removed the |
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 is so helpful. Thanks guys. This dovetails really nicely with aspects of @hodoulp's and @michdolan's Siggraph presentations. I'd been struggling a little with figuring out what I needed to figure out vis a vis the bare minimum OpenGL + Qt to realize the python OCIO GPU image viewer of my dreams... and it looks like, in retrospect, I probably would have been better served by just biting the bullet and grokking oglapphelpers and ociodisplay.
It's really great to see how all the pieces fit together -- I have a whole new level of appreciation for the GPU processor design and API. For example, and maybe this is intuitive to those with more experience with OpenGL, but I had no idea the GPU path represented large Lut1Ds as 2D textures. Damn clever, and probably something that would have caused me grief if left to my own devices.
Anyway, thanks! Confirmed working quite well on macOS with Remi's tweaks (and imath bindings).
@michdolan This pull request is the next one to be merged. But there is still the question about the location, and a second one (at my point of view) would be to document how to run it (or create a CMakeLists.txt with dependencies). |
@hodoulp I will move this and add a README. |
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add Python GPU renderer implementation example Signed-off-by: Michael Dolan <michdolan@gmail.com> * Move to apps with README Signed-off-by: Michael Dolan <michdolan@gmail.com> Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com> Co-authored-by: Rémi Achard <remiachard@gmail.com>
* Add Python GPU renderer implementation example Signed-off-by: Michael Dolan <michdolan@gmail.com> * Move to apps with README Signed-off-by: Michael Dolan <michdolan@gmail.com> Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com> Co-authored-by: Rémi Achard <remiachard@gmail.com> Co-authored-by: Michael Dolan <michdolan@gmail.com> Co-authored-by: Rémi Achard <remiachard@gmail.com>
From discussion in Slack #dev channel about how to implement the OCIO GPU renderer in Python, this is a trimmed down version of an image viewer I wrote while stress testing the OCIO v2 Python bindings last year. It implements the OCIO GPU renderer with dynamic parameters for exposure and gamma adjustment. The goal here is to show just the pieces that need to be implemented for a functional and performant viewer GUI, which is quite a bit of code, but demonstrates the OCIO API in context, along with all the glue code needed to interface with the other Python libraries used here.
As @hodoulp mentioned in Slack, we should reimplement
oglapphelpers
in Python, which much of the rendering code in this module was adapted from. This module would be greatly reduced with that, leaving mostly Qt GUI code, but in the meantime this can serve as a working example.Signed-off-by: Michael Dolan michdolan@gmail.com