You can render the scene from the script as well, as from the user interface. Boxshot allows you to configure the rendering engine the way you like, so you can automate the rendering. Here is an example of the rendering from script:

var params = {"width": 400, "height": 300, draft: true};
scene.render("renderer.builtin.raytracer", "/path/to/file.png", params);

Please note that the rendering may take a while and cannot be cancelled if started from the script, so make sure you saved your job first. This method is designed for using in batch scripting, so you’d better use UI rendering, if possible.

The draft parameter controls the rendering quality. Pass “true” if you need a fast, draft result. Otherwise ignore or pass “false”.

The render() method has 3 parameters. The first defines the rendering engine, currently only “renderer.builtin.raytracer” is supported. The second parameter defines the file name to save image to. Make sure you have provided the full path to the file. The last parameter is a dictionary of properties that are passed to the rendering engine, you can define a resolution here. If you provide just width or height, Boxshot will compute the other dimension using the scene aspect ratio.