Skip to content

Commit 934b808

Browse files
hodoulpmichdolanremia
authored
Add Python GPU renderer implementation example (#1493) (#1518)
* Add Python GPU renderer implementation example Signed-off-by: Michael Dolan <[email protected]> * Move to apps with README Signed-off-by: Michael Dolan <[email protected]> Co-authored-by: Patrick Hodoul <[email protected]> Co-authored-by: Rémi Achard <[email protected]> Co-authored-by: Michael Dolan <[email protected]> Co-authored-by: Rémi Achard <[email protected]>
1 parent 36845c3 commit 934b808

File tree

3 files changed

+1393
-0
lines changed

3 files changed

+1393
-0
lines changed

src/apps/pyociodisplay/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
2+
<!-- Copyright Contributors to the OpenColorIO Project. -->
3+
4+
pyociodisplay
5+
=============
6+
7+
**Work in progress**. Minimal image viewer implementation demonstrating use of
8+
the OCIO GPU renderer in a Python application.
9+
10+
Usage
11+
-----
12+
13+
1. Install dependencies on ``PYTHONPATH``
14+
2. Run ``python pyociodisplay.py``
15+
3. Load image with ``File/Load image...`` menu item
16+
17+
Dependencies
18+
------------
19+
20+
* PyOpenColorIO
21+
* [OpenImageIO (Python bindings)](https://github.com/OpenImageIO/oiio)
22+
* [Imath (Python bindings)](https://github.com/AcademySoftwareFoundation/Imath)
23+
* ``pip install requirements.txt``
24+
* [numpy](https://pypi.org/project/numpy/)
25+
* [PyOpenGL](https://pypi.org/project/PyOpenGL/)
26+
* [PySide2](https://pypi.org/project/PySide2/)
27+
28+
Implementation notes
29+
--------------------
30+
31+
* Assumes the ``OCIO`` environment variable is defined and pointing to a
32+
compatible OCIO config file.
33+
* Takes into account file and viewing rules, and may change the input color
34+
space and/or view automatically when a new image is loaded.
35+
* Exposure and gamma controls are dynamic parameters, driving uniforms in the
36+
generated shader program.
37+
* Specific channel views can be toggled with R, G, B, A keys, and the RGBA view
38+
restored with C.

0 commit comments

Comments
 (0)