Hi, > to me it seems we should first try to grasp and evaluate what has been done > and how this integrates with Blender's features, our other render engines, > compositor, etc.
I think it is worth presenting a general overview of the integration work, to help all of us evaluate the work that has been done and how Freestyle works with other components of Blender. Freestyle as a post-processing option ------------------------------------- As Dan and Thomas pointed out, Freestyle works as a post-processing component of the Blender Internal (BI) rendering engine. Line rendering with Freestyle takes place just after the rendering of BI passes (e.g., Combined and Z depth) has been done and before the compositor is executed. The line rendering is performed as follows: 1. Mesh data are imported from Blender by accessing Render::instancetable (i.e., a list of ObjectInstanceRen instances). Only vlak objects are considered. 2. A 2D representation of the imported mesh data, referred to as view map, is constructed. It consists of feature edges identified in the imported mesh data, such as silhouettes (view dependent) and crease lines (view independent). 3. Feature edges of interest are selected by user-defined edge selection criteria, and transformed into strokes according to stylization parameters given either in the form of a Python script (called style module) or a set of parameters (called line style). Stylization concerns stroke color, alpha transparency, thickness and stroke backbone geometry. These style elements are parameterized in terms of 2D/3D geometry and other scene components (e.g., camera location and object materials) as well as image-space information (such as pixels in the Combined and Z passes). 4. Strokes are rendered using the BI. To this end, a temporary scene populated by new meshes representing the strokes is constructed. The rendering results are composited into the Combined pass. Freestyle works well with render layers and the compositor, since the rendered strokes are part of the Combined pass. Full sample anti-aliasing (FSAA) is also supported. When the FSAA is enabled, each sample of a Freestyle render is composited into the corresponding sample of the Combined pass. Note that there is no "Freestyle pass". Such a Freestyle-only pass can be obtained by disabling all Combined components but Freestyle. Freestyle respects most BI rendering options, including image resolution, percent scaling factor, pixel aspect ratio, and border rendering (with and without the Crop option). It is recalled that the BI splits the entire image into small tiles and renders them one after another (possibly in parallel). This tile-based rendering is not applicable to line rendering in Freestyle, since it is often the case that users want to manipulate all the selected feature edges at once during the stroke generation and stylization in Step 3 mentioned above. In addition, Freestyle makes BI passes accessible for stroke stylization. For these reasons, line drawing with Freestyle is performed just after the rendering of BI passes and before the compositing. In this sense, Freestyle is best described as a post-processing option of the BI. Because of all these functionalities, Freestyle has been tightly integrated into the BI rendering pipeline. Freestyle is by no means an external rendering engine. Additional Freestyle extensions ------------------------------- In addition to the enhanced rendering pipeline, Blender has been extended to implement the following Freestyle-specific components: * Line styles are a new data block (ID_LS). This allows users to reuse line styles among render layers, scenes and multiple .blend files (the Link and Append commands work as expected). * Mesh data have new edge and face attributes called Freestyle edge/face marks. These marks permit fine control of feature edge selection in Step 3. Users can interactively mark specific edges and faces in the Edit mode (using the Ctrl-E and Ctrl-F menus). The Subsurface Division modifier works fine with Freestyle edge/face marks. Freestyle and GUI ----------------- For what concerns GUI design, all Freestyle-related options are currently located in the Render panel of the Properties window as detailed below: * A global option for enabling Freestyle is located in the Post Processing tab. * Freestyle can also be enabled/disable for each scene render layer using the Freestyle toggle in the Include: section of the Layers tab. * When a render layer with Freestyle enabled is active, the Freestyle tab appears to allow users to specify conditions for feature edge selection. A set of edge selection criteria is called a line set. For each line set, a line style is associated. Render layers can have multiple line sets each, so that different sets of feature edges in a render layer can be drawn with different line styles. * Options defining a line set are shown in the Freestyle: Line Set tab. * Line style options are provided in the Freestyle: Line Style tab. Line sets are part of render layer options, and it is often useful to manipulate line sets and associated line styles altogether. For these reasons, all the Freestyle-related options are shown in the Render panel of the Properties window. Proposals for improving the present GUI design are highly welcome. That is all for now. Comments and suggestions are much appreciated. Regards, T.K. -- KAJIYAMA, Tamito <rd6t-k...@asahi-net.or.jp> -----Original Message----- From: Ton Roosendaal Sent: Tuesday, May 22, 2012 6:50 PM To: bf-blender developers Subject: Re: [Bf-committers] Freestyle branch status report May 2012 Hi, Cartoon render is very useful as a feature. Whether that's as separate download, as engine (like yafaray) or integrated we can always check on later... to me it seems we should first try to grasp and evaluate what has been done and how this integrates with Blender's features, our other render engines, compositor, etc. -Ton- ------------------------------------------------------------------------ Ton Roosendaal Blender Foundation t...@blender.org www.blender.org Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands On 22 May, 2012, at 7:19, Thomas Dinges wrote: > Hi, > first of all congrats for the project and your work over the last couple > of years! :) > > Although I understand the need and the users want this in trunk I am a > bit sceptical of the integration. > > Basically I would prefer to see Freestyle being implemented as an > external engine rather than hook so deep into Blenders core. > I mean that was the intention of the API, to make exactly that possible. > > From a quick look at the patch it looks like its quite heavily > integrated. What is the intention of the ID_LS you added? > Also I don't see a way to disable freestyle (compile option). > > Sorry but at the moment I would not recommend a merge. Basically I first > would like to check if it would be possible to integrate it via the > Render API, and with much less changes to the core. > > Regards, > Thomas > > Am 22.05.2012 03:17, schrieb Tamito KAJIYAMA: >> Nicholas, >> >> Here is a quick attempt of diff -ruN against the trunk revision 46787. >> >> http://www.asahi-net.or.jp/~rd6t-kjym/tmp/diff_against_trunk_r46787.zip >> >> The patch consists of 98070 lines. Of these, source/blender/freestyle/ >> (83932 lines) and >> release/scripts/freestyle/ (6239 lines) are C/C++ code and Python scripts, >> respectively, >> based on the code from the original Freestyle program. The rest of the diff >> (7899 lines) >> concerns changes to the Blender code base. The changes mainly reside in the >> following >> directories: >> >> release/scripts/startup/bl_operators/ >> release/scripts/startup/bl_ui/ >> source/blender/blenkernel/ >> source/blender/blenlib/ >> source/blender/blenloader/ >> source/blender/bmesh/ >> source/blender/editors/ >> source/blender/makesdna/ >> source/blender/makesrna/ >> source/blender/python/ >> source/blender/render/ >> source/blender/windowmanager/ >> source/blenderplayer/ >> source/creator/ >> >> Regards, >> > > > -- > Thomas Dinges > Blender Developer, Artist and Musician > > www.dingto.org _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers