There are three different ways to render a geometry: you can explicitly create a Camera instance, call the function view(), or use the script chroma-cam.
>>> chroma.view(chroma.make.cube())
To control the camera refer to the following table and Camera Hotkeys.
Thing You Do | Modifier | Thing That Happens |
---|---|---|
click and drag | rotate camera around object | |
click and drag | shift | translate camera |
click and drag | control | rotate camera |
mouse wheel | zoom |
Command | Thing That Happens |
---|---|
alt | toggle fine motion |
F11 | toggle fullscreen |
escape | quit |
= | increase the alpha depth by one |
- | decrease the alpha depth by one |
pagedown | move down through the bounding volume hierarchy tree |
pageup | move up through the bounding volume hierarchy tree |
3 | toggle 3d mode |
g | toggle 3d colors between red/cyan and green/magenta |
F12 | take a screenshot |
m | make a movie |
F5 [1] | toggle hybrid monte carlo rendering mode |
F6 [2] | place a light source at the camera’s current location |
F7 [2] | add another light source at the camera’s current location |
Footnotes
[1] | The hybrid monte carlo rendering mode requires the geometry have surfaces with a non-zero diffuse reflection probability. |
[2] | (1, 2) Only available in hybrid monte carlo rendering mode. |
The Camera class uses pygame to render a geometry. Camera objects inherit from multiprocessing.Process so that you can render multiple geometries in separate windows at the same time.
Create a pygame window, intialize CUDA, and start the camera.