Skip to content

Commit

Permalink
Slight improvements to render scene python example
Browse files Browse the repository at this point in the history
  • Loading branch information
dvicini committed Dec 16, 2019
1 parent 96e57ac commit 39650e9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/examples/01_render_scene/render_scene.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import numpy as np

from mitsuba.core import Bitmap, Struct, Thread
from mitsuba.core.xml import load_file
import mitsuba

from mitsuba.packet_rgb.core import Bitmap, Struct, Thread
from mitsuba.packet_rgb.core .xml import load_file


SCENE_DIR = '../../../resources/data/scenes/'
Expand All @@ -18,10 +20,11 @@
scene = load_file(filename)

# Call the scene's integrator to render the loaded scene
scene.integrator().render(scene)

scene.integrator().render(scene, scene.sensors()[0])

# After rendering, the rendered data is stored in the film
film = scene.sensor().film()
film = scene.sensors()[0].film()

# Write out rendering as high dynamic range OpenEXR file (after converting to linear RGB space)
film.bitmap().convert(Bitmap.ERGB, Struct.EFloat32, srgb_gamma=False).write('cbox.exr')
Expand Down

0 comments on commit 39650e9

Please sign in to comment.