Page MenuHome

Cycles X: Use GPUDisplay for the offline rendering
Closed, ResolvedPublicDESIGN

Description

Goal: Minimize memory and computational overhead drawing in-progress render result during offline rendering, similar to the viewport render.

Display Pass

There is one active display pass, which is communicated via Python API, similar to the active display pass for interactive rendering.

The render engine (i.e. Cycles) hold the full-frame pixel data of the display pass, preferably in the half-float data format.
When user changes display pass it is up to the render engine to load pass pixels from off-memory tile storage (i.e. Cycles will read pass pixels from the partial EXR files).

RenderEngine

RenderEngine has a draw callback (a complementary to view_draw()). This call takes care of drawing a GL texture which contains pixels of the display pass.

The drawing happens in the pixel space similar to the viewport. Draw manager takes care of setting up matrix stack which makes (possibly cropper) render to follow zoom and pan from the image space.

Draw manager

Draw manager is to use an external_engine to draw render result during rendering when the engine has the draw callback.
Once rendering is finished the regular RenderResult rendering is to be used.

Known limitations

One of the immediate limitation is inability to query pixel value and depth during rendering. It might be considered to be implemented in the future, but for an initial implementation it is a sacrifice to be made.

Event Timeline

Sergey Sharybin (sergey) changed the task status from Needs Triage to Confirmed.Aug 10 2021, 3:02 PM
Sergey Sharybin (sergey) created this task.

This design makes sense to me.

The drawing happens in the normalized space (unlike the viewport render where drawing happens in the pixel space relative to the left bottom corner of the viewport). This way panning and zooming is fully handled by the Image Editor.

I think it would be nice if this was the same space. If we push an additional matrix transform in external_engine, I'd expect panning and zooming to still work?

Indeed sounds like it should be possible. Part of the reason I kept the space unchanged is due to trying to keep overlay engine to work (to see checkerboard under transparent film). Not exactly sure what went wrong there. Will doublecheck and update the description.

Brecht Van Lommel (brecht) claimed this task.

This was implemented.