Software rendering and parallel data edition

The software rendering model

Software rendering with REDsdk requires the engine to be started in hybrid or software modes (Software startup), ray-tracing options to be activated (see RED::OPTIONS) and a RED::IWindow::FrameTracing (or any derived method) to be called. Once these have been gathered, REDsdk will process the scene using its software ray-tracer.

From this, a software image does not stop at the return of the rendering method that was used; The image continues to be calculated. While the image 'N' is calculated, transaction 'N+1' can be defined. On closing the 'N+1' transaction, two different behaviors may come up:

  1. No data used by the rendering were modified during the transaction 'N+1'. Consequently, the image being processed continues on then next rendering method.
  2. Some data used by the rendering were modified (shape, materials, options, camera, etc...). The image being processed is stops and a new frame starts to be rendered.

The engine determines whether an image being rendered has to be stopped or not, based on the set of changes that have occurred in the last transaction.

If a transaction is not rendered, then on opening a second transaction, all software renderings will be stopped, as illustrated below:

Rendering interruptions on a second transaction after a transaction that was not rendered

This avoids possible data corruption that could occur otherwise if we were to modify data already used for the processing of an image.

Modifying an image during a software draw

It's not possible to modify an image if a rendering occurs. Images are not fully enforcing the transaction model and can't be modified at the same time they can be used to render a given scene. Consequently, and image operation attempt while an image is being processed by the software ray-tracer will end up in a RED_WORKFLOW_ERROR code being returned.