Standalone GUI - image size is always (1024, 512)?

I was fiddling around in the code base as I was looking into adding a new type of viewer as the SDL version always crashes for me (OSX 11.6.5, multiple versions of SDL)*.

What I found was that no matter what the size of the camera statement in the XML file, the output image size is always 1024, 512 (the default). On top of that, there seems to be a bug in the reader with the scene_world_volume.xml. The reader reads the initial camera statement, hits the transform with the nested camera type, and clears all the information from the size read in the first statement.


  • I’ve added the ability to use the stand-alone version with the tev HDR viewer ( similar to what pbrt-v4 does.

Have a look at options_parse() in src/app/cycles_standalone.cpp. The init of options.width and options.height here conflicts with the logic in scene_init(), with the net result being that the default 1024, 512 overrides the XML file. Change the init values in the first two lines of options_parse() to zeros, and you’re back in business.


In addition, I modified the setting of the camera’s full_[width|height] in xml_read_camera to:
if (width > 0 )
if (height > 0)

The reason being that in scene_monkey.xml & others, the nested call to camera:
camera type=“perspective”

causes the routine to re-read the width and height which get set to -1 as they don’t exist in that xml definition.