Blender Git Loki

Git Commits -> Revision 5dd39e6

Revision 5dd39e6 by Maxime Curioni (master)
April 7, 2009, 18:38 (GMT)
SUMMARY:
Freestyle's pipeline is now fully controllable at the layer level. It can be used:
- in any render layer
- with as many style modules per layer

DETAILS:
Freestyle usage has not changed:
- all the configuration happens in the "Freestyle" render panel, after it is enabled in the "Output" panel with the 'Freestyle' toggle.
- each render layer can choose to render Freestyle strokes by togglingo on 'FrSt' (in the "Render Layers" panel)
- it is fully compatible with compositor nodes

In the "Freestyle" panel, a render layer is selected via the menu list next to the "Render Layer:" label. The options displayed below are those of the currently selected render layer (and are not global to all render layers, as was previously the case).

Style modules are added by pressing the lower button "Add style module". Once added, the following operations are possible:
- deletion (cross)
- reordering (up/down arrows)
- toggling of display (check)

The order of the style modules follows Freestyle's original convention: the modules in the list from top to bottom are respectively the first to the last composited in the render layer. For example, if the module list is "contour" followed by "cartoon", the "cartoon" strokes are rendered on top of the "contour" strokes.

The "Freestyle" panel is constantly synchronized with the "Render Layers" panel: if render layers are added, deleted or toggled off display, Freestyle will take note of the changes.

The current pipeline works as follows:

----------------------------------------------------------------------------------------------
for every scene that is being rendered
if Freestyle is enabled globally

Freestyle is initialized
camera and view settings are transferred from Blender to Freestyle

for every render layer
if: - layer is enabled
- layer enabled Freestyle
- the number of displayed style modules is non-zero

canvas is cleared
geometry is transferred from Blender to Freestyle
settings are fixed for current iteration
view map is calculated

strokes are computed in the canvas (based on view map and style modules)
strokes are rendered in separate Blender scene

scene is composited in current layer
----------------------------------------------------------------------------------------------

A number of changes were made on the codebase:
- the rendering interface between Freestyle and Blender was simplified. The following naming convention was used: functions that are called from within Blender pipeline are prefixed with 'FRS_', while the variables are prefixed with 'freestyle_'
- Freestyle data structures that were put in Blender's render pipeline were removed
- Freestyle cleans up its data structures on Blender exit and shouldn't leak memory
- to ease the configuration in the "Freestyle" panel, a centralized configuration data structure was used and can be easily extended

LIMITATIONS
Even though the current commit is stable and achieves the intended result, it is not as efficient as it could be:
- the canvas and the style modules are at cleared at each layer-level render
- geometry is reloaded at each frame and is duplicated across render layers

This revision clarifies my understanding of the future role of the view map in the compositor. Unfortunately, contrary to what the original proposal said, it is impossible to provide the view map as a render pass because render passes are defined (RE_pipeline.h) as raw floating-point rects. We will have to determine whether or not to extend the notion of render pass to fully integrate the view map in the compositor.

Commit Details:

Full Hash: 5dd39e651703249252f9c461031205fc22c90fd2
SVN Revision: 19587
Parent Commit: 6225d2d
Lines Changed: +389, -196

16 Modified Paths:

/source/blender/freestyle/FRS_freestyle.h (+28, -7) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.cpp (+5, -4) (Diff)
/source/blender/freestyle/intern/app_blender/Controller.h (+4, -3) (Diff)
/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp (+228, -72) (Diff)
/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp (+3, -17) (Diff)
/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.h (+2, -1) (Diff)
/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp (+4, -8) (Diff)
/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.h (+1, -1) (Diff)
/source/blender/freestyle/intern/stroke/Canvas.cpp (+6, -0) (Diff)
/source/blender/freestyle/intern/stroke/Canvas.h (+1, -0) (Diff)
/source/blender/include/butspace.h (+4, -1) (Diff)
/source/blender/render/intern/include/render_types.h (+0, -3) (Diff)
/source/blender/render/intern/source/convertblender.c (+0, -5) (Diff)
/source/blender/render/intern/source/rendercore.c (+0, -44) (Diff)
/source/blender/src/buttons_scene.c (+101, -30) (Diff)
/source/blender/src/usiblender.c (+2, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021