[Bf-committers] Stereoscopy Implementation Proposal

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Apr 23 15:04:28 CEST 2013

Hi Dalai,

On Tue, Apr 23, 2013 at 10:12 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
> I got the rendering to work for multiple views in Blender Internal (*) and
> I would like to address Cycles next.
> I don't want to abuse of your assistance, but it will likely save me some
> time to hear from you how would you tackle that.
> My first thought after spending osme time wandering on blender_session.cpp
> and session.cpp was:
> session.cpp (pseudo-code)
> + for view in ...
> +     scene->camera = view.camera;
> +     SOMEGLOBAL.actview = view;
>     if(device_use_gl)
>         run_gpu();
>     else
>         run_cpu();
> (. . .)

Probably the easiest way to do it is in BlenderSession::render, so that you get:

for each render layer:
    b_rlay_name = ..
    for each view:
        b_view_name = ...

And then in BlenderSession::do_write_update_render_tile use the
b_view_name to write to the right passes.

It would be good to push the view stuff further into Session itself,
especially if we're going to support multiview rendering in the 3D
viewport, but for now I'd start with doing it this way.


More information about the Bf-committers mailing list