[Bf-codereview] Multiview Branch (issue 10083044)

dfelinto at gmail.com dfelinto at gmail.com
Thu Jun 6 21:27:17 CEST 2013


Reviewers: bf-codereview_blender.org,

Description:
Multiview Code Review
=================

This feature touches mainly the following areas of Blender:
(0) scene
(1) render
(2) cycles
(3) compositing
(4) window manager
(5) image editor
(6) viewport
(7) saving
(8) sequencer

Official repo: https://github.com/dfelinto/blender/tree/multiview (with
images)
Repo mirrored:
https://svn.blender.org/svnroot/bf-blender/branches/multiview/
Official issues list:
https://github.com/dfelinto/blender/issues?state=open

[0] Scene
=======
A new panel (currently as a panel on its own, though this is negotiable)
allows you to select views to use for rendering a scene. For new scenes
and old files, two views are created: Left and Right.

They are both deactivated, so things-should-work-as-before™. They also
have the option “Name as Label” disabled by default, and the default
labels: “_L” and “_R” respectively. See how this is used in [7] Saving.

[1] Render
========
If there is no view active in the “Render Views” panel, Blender will
render the scene camera, just like before. If there is even one active
view, pipeline.c will loop over the views, setting the current view in
Render->actview, which is used by RE_GetViewCamera to return the correct
camera.

* RenderLayer->rr no longer exists (now every renderlayer has a combined
pass per view)

* RenderResult->rectf / rectz / rect32 still exist to temporarily store
the output from RE_AcquireResultImage. But the data is now stored in
RenderView->rectf / rectz / rect32.

* RenderResult->views stores the views names and buffers (rectf, rectz,
rect32), not but the render passes.

* RenderPass is used just like before, but we will have Combined.left.R,
UV.center.U, ...

[2] Cycles
=======
Cycles first finishes a view entirely, and then go to the next one. The
new loop is in:
blender_session.cpp:: void BlenderSession::render()

** Not Implemented: **
It would be nice to have it done in parallel, so when in Rendered mode
and with 3-D turned for the window, you can preview the result in 3-D.
This could also benefit when you do the final render and see in Image
Editor.

[3] Compositor
===========
In the compositor the current scene is the queen. Just like the
compositor output size is capped to the current scene output settings,
the number of views to render comes from the current scene.

Image Node: If the image has more than one view, we have a drop-down
where you can pick the current view. An option “All” makes the view to
automatically match the current rendered view.

View Switch Node: This node will reflect the active Render Views for the
current scene.

** Not Implemented: **
View Node: Unfortunately the view node is still not 3-D friendly. It has
to do with the way its data is (not) stored. It’s probably doable, but I
haven’t tackled it yet.

[4] Window Manager
===============
Window manager provides support for 3-D displays when the drawing mode
is Triple Buffer.
The mode is set per user, but the enable/disable capability is per
window (shortcut “D”) at the moment.

See the changes on wm_draw.c::wm_draw_update(), the new
wm_draw.c::wm_method_draw_triple_stereo() and the new file wm_stereo.c
for more details.

[5] Image Editor
===========
If the image has more than one view a new dropdown button allows the
user to pick the view to see. If the image (or render) has a “left” and
a “right” views an extra view “3-D” is offered.

Because the passes list has one pass of each kind for each view, the
interface will show only one of each, and the user is actually selecting
the pass type (actually actually it’s selecting the id of the first pass
of a given kind, but I could change that to store the pass type
instead).

image_buttons.c::get_pass_id(), pass_menu() and view_menu()

I’m tempted to change that to recalculate the pass multi_index in
image_draw.c::draw_image_main()

That would also fix a bug I have now that I have to manually select a
view after turning 3-D on and opening an image in some cases (otherwise
the passes are not initialized).

[6] Viewport
=========
View3D.eye (set in windows manager [4]) is used to pick which camera to
use.
Only works when 3-D is enabled for the window.

** Not Implemented: **
* OpenGL Render

[7] Saving
=======
There is a new format “OpenEXR Multiview”, which will save the file as
EXR 2.0 Multipart file, one view per part.

If any other format is chosen, Blender will save each view as an
individual file. There is a new char “%” used to specify where you want
the view name to be in the filepath:

e.g., Render_%_Test.jpg will produce Render_myviewname_Test.jpg.

If there is no “%” the view name will be placed in the end:
e.g., RenderTest.jpg → RenderTest_L.jpg | RenderTest_R.jpg

There is an option to replace the view name by a label for the file
output. This way the scene view name doesn’t have to be used in the
filename.

** Not Implemented: **
Currently there is no option to save side-by-side, top-bottom, anaglyph,
...

[8] Sequencer
==========
** Not Implemented: **
EVERYTHING.

There is a Google Summer of code on Sequencer refactoring, so it may
make more sense to skip Sequencer support for now, and handle that with
Alex in his GSoC.

The design can be discussed here:
https://github.com/dfelinto/blender/issues/30

[9] Have fun reviewing
==============
Thanks for Francesco Siddi for collaborating with the original proposal
and tests.
Thanks for Alexey Akishin for contributing with code for the 3-D display
functionality.
Thanks for Ton Roosendaal, Brecht van Lommel, Jeroen Bakker and Sergey
Sharybin for helping with code discussion and design decisions.
Thanks for Blender users and devs for all the feedback and testing.

Feel free to send pull request to the github branch.

Note included in this patch:
release/datafiles/blender_icons32.png
release/datafiles/blender_icons16.png
release/datafiles/blender_icons.svg
(though you can find them in svn or github repository)


Please review this at https://codereview.appspot.com/10083044/


More information about the Bf-codereview mailing list