Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2009-04-07 22:38:23 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2009-04-07 22:38:23 +0400
commit5dd39e651703249252f9c461031205fc22c90fd2 (patch)
tree509748df8c753f6dc963ecb3e415cba9635994ac /source/blender/freestyle/FRS_freestyle.h
parent6225d2d3f904bd8725fc86c6c2b6c78a479f89e8 (diff)
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.
Diffstat (limited to 'source/blender/freestyle/FRS_freestyle.h')
-rw-r--r--source/blender/freestyle/FRS_freestyle.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h
index 3bc6e092f02..7151471a561 100644
--- a/source/blender/freestyle/FRS_freestyle.h
+++ b/source/blender/freestyle/FRS_freestyle.h
@@ -8,10 +8,15 @@
extern "C" {
#endif
- extern char style_module[255];
- extern int freestyle_flags;
- extern float freestyle_sphere_radius;
- extern float freestyle_dkr_epsilon;
+ typedef struct StyleModuleConf {
+ struct StyleModuleConf *next, *prev;
+
+ char module_path[255];
+ short is_displayed;
+ } StyleModuleConf;
+
+
+ extern short freestyle_is_initialized;
extern float freestyle_fovyradian;
extern float freestyle_viewpoint[3];
@@ -19,11 +24,27 @@ extern "C" {
extern float freestyle_proj[4][4];
extern int freestyle_viewport[4];
+ extern short freestyle_current_layer_number;
+ extern char* freestyle_current_module_path;
+ extern SceneRenderLayer* freestyle_current_layer;
+ extern ListBase* freestyle_modules;
+ extern int* freestyle_flags;
+ extern float* freestyle_sphere_radius;
+ extern float* freestyle_dkr_epsilon;
+
+ // Rendering
void FRS_initialize();
- void FRS_prepare(Render* re);
- void FRS_render_Blender(Render* re);
- void FRS_composite_result(Render* re, SceneRenderLayer* srl);
void FRS_add_Freestyle(Render* re);
+ void FRS_exit();
+
+ // Panel configuration
+ void FRS_select_layer( SceneRenderLayer* srl );
+ void FRS_delete_layer( SceneRenderLayer* srl, short isDestructor );
+ void FRS_add_module();
+ void FRS_delete_module(void *module_index_ptr, void *unused);
+ void FRS_move_up_module(void *module_index_ptr, void *unused);
+ void FRS_move_down_module(void *module_index_ptr, void *unused);
+ void FRS_set_module_path(void *module_index_ptr, void *unused);
#ifdef __cplusplus
}