[Bf-committers] New rendering engine - problem reading EXR file

Jonas Eschenburg indyjo at gmx.de
Sun Jan 19 20:12:59 CET 2014


Hi everybody!

My name is Jonas Eschenburg and I'm a software developer living in 
Augsburg, Germany. I am currently developing "BitWrk", an open 
marketplace for on-demand computing power.

Blender is an important use case for my project as, in my opinion, it 
could benefit heavily from having an open renderfarm, grid-like service.

If you're interested, please have a look at <http://bitwrk.net/>

I have begun writing integration code using Blender's Python scripting 
interface and so far, everything has been a nice experience. There is 
one problem I haven't yet managed to solve, though. I seem to be unable 
to load renderings (.exr files) produced by Blender back into the render 
result. The render result image stays empty.

Here is the Python script I used (execute, select "Dummy rendering", hit 
F12):
------------------------------------------------------------
import bpy

class DummyRenderEngine(bpy.types.RenderEngine):
     """Dummy Rendering Engine"""
     bl_idname = "DUMMY_RENDER"
     bl_label = "Dummy rendering"

     def render(self, scene):
         result = self.begin_result(0,0,320,200)
         result.load_from_file("/tmp/example.exr")
         self.end_result(result)

def register():
     bpy.utils.register_class(DummyRenderEngine)

def unregister():
     bpy.utils.unregister_class(DummyRenderEngine)

if __name__ == "__main__":
     register()
------------------------------------------------------------

Here is what the console says:
------------------------------------------------------------
IMB_exrtile_set_channel error RenderLayer.Combined.R
IMB_exrtile_set_channel error RenderLayer.Combined.G
IMB_exrtile_set_channel error RenderLayer.Combined.B
IMB_exrtile_set_channel error RenderLayer.Combined.A
IMB_exrtile_set_channel error RenderLayer.Depth.Z
warning, channel with no rect set A
warning, channel with no rect set B
warning, channel with no rect set G
warning, channel with no rect set R
warning, channel with no rect set Z
OpenEXR-readPixels: ERROR: Error reading pixel data from image file 
"/tmp/example.exr". No frame buffer specified as pixel data destination.
------------------------------------------------------------

Here is some information about the EXR file I used, generated by exrheader:
------------------------------------------------------------
file format version: 2, flags 0x0
Camera (type string): "Camera"
Date (type string): "2014/01/19 18:42:29"
File (type string): 
"/var/folders/1y/jvd5p46x5z70cdlz3f4tk7880000gn/T/tmplg5y08/input.blend"
Frame (type string): "34"
RenderTime (type string): "01:11.83"
Scene (type string): "Scene"
Time (type string): "00:00:01.10"
channels (type chlist):
     A, 32-bit floating-point, sampling 1 1
     B, 32-bit floating-point, sampling 1 1
     G, 32-bit floating-point, sampling 1 1
     R, 32-bit floating-point, sampling 1 1
     Z, 32-bit floating-point, sampling 1 1
compression (type compression): piz
dataWindow (type box2i): (0 0) - (319 199)
displayWindow (type box2i): (0 0) - (319 199)
lineOrder (type lineOrder): increasing y
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"
xDensity (type float): 72
------------------------------------------------------------

I also tried out a couple of variations, without success:
- With and without Z buffer
- With 'PIZ' and without compression

In case you suspect the EXR file to be faulty, please have a look at it: 
<http://files.bitwrk.net/example.exr>.
If I just load it from file system, it displays fine.

What do I need to do to get an EXR image into the render result?

Thanks in advance!
Jonas


More information about the Bf-committers mailing list