Distributed flam3 rendering

Flames look nice, but takes lot of time to render them, specially in high resolution and quality.
One way of speeding up rendering is to distribute rendering on various computers.
The main idea is to have a central server onto which one can upload various flames to be rendered. The rendering of these flames is then distributed on various computers which runĀ  as render slaves, each rendering one part of the image. When all parts are completed, then either the master or one of the slaves assembles the final image from various parts.
There are two issues related to this:

  • flam3 cannot render only one part of the image, although large images can be rendered in stripes to overcome out of memory error. Still, as it is originally, either with stripes or not, flam3-render can render one image only, not part of the image.
  • somehow the file location need to be resolved. the render slaves need the information describing what to render (the .flame3 file), and they need to store somewhere the result of their rendering. This means between the server and render slaves we need a shared file system,where/from where both can read/write, or the server need to act also as a file server, allowing slaves to upload render results and download render informations.

For now, I have changed flam3 package to allow partial rendering only.
In order to ease the parameter passing, I have modified the code that now settings can be passed either through environment variables, or through command line arguments. All environment variables can be set from command line using [name]=value format, where [name] is the name of the environment variable. Please note, command line settings have higher priority over their environment counterparts.

Also, couple of new options were added, for rendering only part of the flame:

  • –help – display the help
  • minstrip=[number] – the minumum strip number to be rendered.
  • maxstrip=[number] – the maximum strip to be rendered.
  • strip=[number] – the strip to be rendered.

Please note:

  • for all this parameters, you will have to set nstrips value. Also, the value of these parameters should between 0 and nstrips.
  • Also, if minstrip and maxstrip is provided, then render is between minstrip inclusive and maxstrip-1 inclusive. (minstrip=0 and maxstrip=1 will render strip 0, minstrip=1 maxstrip=1 will render no strips)
  • providing strip=[number] will render only the given strip.

Sources can be downloaded from here: flam3.tar.gz

Next step would be the server and render slaves.

  1. Really interested in how far you got with this! I’ve wanted to make use of the quad core servers at uni overnight to do some hardcore distributed sheep rendering! Any tips?

  2. Well for now the render slaves are on hold at this moment, but the main ideea was to have a central server, where one could upload the xml files to be rendered, server which divide each flame in a number of slices and then distributes rendering of these slices to slaves as rendering jobs. Once a slice is rendered, the slave sends it back to the server and asks for a new job. Once all slices of a flame are rendered, an assemble kind of job is sent to a slave to assemble the slices into final image. Of course these are only the main ideas. There are lot of things to optimize and tweak.

Leave a Comment