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
AgeCommit message (Collapse)Author
2015-04-28Fix T44404: freestyle crashes blender.Tamito Kajiyama
The reported crash case seems to be caused by freeing compiled Python objects in a thread. Now this issue is avoided by allocating a buffer to store a Python script and using BPY_string_exec() to run the script. This makes it unnecessary to repeatedly create and destroy Text data blocks. Many thanks to Campbell Barton for his help on the bug fix.
2015-03-27Freestyle: Code cleanup, prepare for strict C++ flagsSergey Sharybin
2015-02-02Fix for Freestyle view map caching not properly updated upon changes of ↵Tamito Kajiyama
render resolution and scale. Problem reports independently by Light BWK and Folkert de Vries, thanks.
2015-01-17Fix T43090: Cycles + Freestyle + border render = black render.Tamito Kajiyama
The reported problem was due to a special case where there are no strokes to be rendered. Since rendering an empty scene is a waste of time, the issue was addressed here by skipping the stroke rendering process entirely.
2015-01-03Freestyle: memory consumption optimization in stroke rendering.Tamito Kajiyama
Previously individual strokes were represented by distinct mesh objects no matter how many vertices and materials each stroke has, although the vertex and material counts can be quite small depending on the input scene data. Now stroke meshes are packed into a minimum number of mesh objects, so as to reduce the overheads of Blender object creation.
2015-01-03Fix for view map cache not flushed by updates of edge detection options.Tamito Kajiyama
This fix should be considered for inclusion in the 2.73 release, since it concerns a new feature of Freestyle introduced in 2.73.
2014-11-26Freestyle: Fix for view map caching not flashed properly in view port rendering.Tamito Kajiyama
2014-11-23Refactor: BLI_path_util (split out app directory access)Campbell Barton
This module is intended for path manipulation functions but had utility functions added to access various directories.
2014-10-02Freestyle: For until c++11 is accepted only static members could b ↵Sergey Sharybin
initialized in-lined
2014-10-02Freestyle: Fix for destructive view map modifications during chaining ↵Tamito Kajiyama
operations. The view map is mostly treated as a read-only data structure by line stylization operations (i.e., selection, chaining, splitting, sorting and stroke creation). The only exception is the chaining operation in some cases where insertion of extra FEdge objects is necessary to ensure the continuity of underlying FEdges from which a chain is constructed. The present revision addresses the removal of extra FEdges so to keep the view map clean and suitable for reuse in subsequent render frames.
2014-10-02Freestyle: View map caching.Tamito Kajiyama
New render layer option named "View map cache" is added to reuse a previously computed view map for subsequent rendering. The cache is automatically updated when the mesh geometry of the input 3D scene has been changed. This functionality offers a major performance boost for Freestyle animation rendering when camera-space mesh geometry is static, as well as for repeated still renders with updates of line stylization options. Although the "View map cache" toggle is a render layer option, the cache memory is shared by all render layers and scenes. This means that if Freestyle is used for two or more render layers (possibly in different scenes through the compositor), then the cached view map for one render layer is replaced by a new view map for another render layer and hence no performance gain is expected.
2014-08-12Freestyle: Removed the stored bContext from the Controller class.Tamito Kajiyama
The stored context object was used for creation of shade nodes. A closer look at the node system showed that the context is not actually used when shader nodes are added to a shader node tree. Relying on this fact, now a NULL pointer is passed to nodeAddStaticNode() instead of the stored bContext pointer.
2014-08-12Freestyle: an improved workflow of line style shading nodes.Tamito Kajiyama
Removed the previous changes for passing a line style through the Controller, and revised the BlenderTextureShader to assign the shader node tree of a line style (if specified) to strokes. This way the assignment of shading nodes can be done through both the Freestyle GUI and Python scripting.
2014-08-12WIP commit just for a record of a working snapshot of code revisions for ↵Tamito Kajiyama
node-based textured strokes.
2014-08-12Freestyle: Added preliminary support for textured strokes in Cycles.Tamito Kajiyama
Now the shader node tree of a line style ID datablock is used to define textures as well as their mapping and influence. TODO: Textures alpha channel mapping and influence. TODO: Blend mode in the Output Line Style shader node.
2014-08-12Initial implementation of Cycles materials for Freestyle stroke rendering.Tamito Kajiyama
2014-05-22Fix T40307: Crash with freestyle and particle hair.Tamito Kajiyama
The scene file provided by the problem report has many degenerate faces coming from a particle system. These zero-area faces were not expected in the ray-casting line visibility algorithms of Freestyle. Now degenerate faces are properly excluded from the imported mesh data and not fed to the line visibility algorithms.
2014-05-07Freestyle: debug statistics on stroke rendering.Tamito Kajiyama
2014-04-17Replaced assert() with BLI_assert().Tamito Kajiyama
2014-04-17Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 3).Tamito Kajiyama
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of the problem). Made changes to intern/view_map/Interface0D.h and intern/python/Director.h to avoid #include <Python.h> and keep non-Python header files independent of it.
2014-04-11Fix for Freestyle Python API modules not found in the Python Console.Tamito Kajiyama
Addition of the path to the Freestyle Python API modules to 'sys.path' was delayed until the first Freestyle rendering, so that any import attempt of the modules in the Python Console always failed. Now the update of 'sys.path' is done at Blender start-up. This allows the Freestyle-specific modules to be imported without running Freestyle, facilitating quick interactive testing in the Console.
2013-11-22Code Cleanup: int pointer comparisonCampbell Barton
2013-08-24Fix for [#36374] Read unitialized memory in Freestyle.Tamito Kajiyama
A variable keeping a bounding box was referenced after it was flagged as empty.
2013-06-11Fix #35561: freestyle + read full sample layers = crash.Tamito Kajiyama
Now add_freestyle() in pipeline.c takes a second argument to enable/disable stroke rendering. When stroke rendering is disabled, the function allocates data structures but does not perform stroke rendering. The allocated data structures (mostly left unpopulated with data elements) are intended to allow for the Read Full Sample Layers (Shift-R) command in the compositor.
2013-05-15More fix for memory leaks in the Freestyle module.Tamito Kajiyama
2013-05-01Fix for [#35116] Freestyle StringUtils::toAscii breakes non-ascii path values.Tamito Kajiyama
Just removed all calls of StringUtils::toAscii() as well as the function definitions.
2013-04-09Attempt to fix a potential name conflict between Freestyle and the compositor.Tamito Kajiyama
A crash in the Freestyle renderer was reported by Ton on IRC with a stack trace below. Note that #2 is in Freestyle, whereas #1 is in the compositor. The problem was observed in a debug build on OS X 10.7 (gcc 4.2, openmp disabled, no llvm). ---------------------------------------------------------------------- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 [Switching to process 72386 thread 0xf303] 0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43 43 delete (this->m_outputsockets.back()); Current language: auto; currently c++ (gdb) where #0 0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43 #1 0x0000000100c29066 in Node::~Node (this=0x10e501c80) at COM_Node.h:49 #2 0x000000010089c273 in NodeShape::~NodeShape (this=0x10e501c80) at NodeShape.cpp:43 #3 0x000000010089910b in NodeGroup::destroy (this=0x10e501da0) at NodeGroup.cpp:61 #4 0x00000001008990cd in NodeGroup::destroy (this=0x10e5014b0) at NodeGroup.cpp:59 #5 0x00000001008990cd in NodeGroup::destroy (this=0x114e18da0) at NodeGroup.cpp:59 #6 0x00000001007e6602 in Controller::ClearRootNode (this=0x114e19640) at Controller.cpp:329 #7 0x00000001007ea52e in Controller::LoadMesh (this=0x114e19640, re=0x10aba4638, srl=0x1140f5258) at Controller.cpp:302 #8 0x00000001008030ad in prepare (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:302 #9 0x000000010080457a in FRS_do_stroke_rendering (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:600 #10 0x00000001006aeb9d in add_freestyle (re=0x10aba4638) at pipeline.c:1584 #11 0x00000001006aceb7 in do_render_3d (re=0x10aba4638) at pipeline.c:1094 #12 0x00000001006ae061 in do_render_fields_blur_3d (re=0x10aba4638) at pipeline.c:1367 #13 0x00000001006afa16 in do_render_composite_fields_blur_3d (re=0x10aba4638) at pipeline.c:1815 #14 0x00000001006b04e4 in do_render_all_options (re=0x10aba4638) at pipeline.c:2021 ---------------------------------------------------------------------- Apparently a name conflict between the two Blender modules is taking place. The present commit hence intends to address it by putting all the Freestyle C++ classes in the namespace 'Freestyle'. This revision will also prevent potential name conflicts with other Blender modules in the future. Special thanks to Lukas Toenne for the help with C++ namespace.
2013-04-08style cleanupCampbell Barton
2013-03-31remove blender foundation copyright from freestyle files.Campbell Barton
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
2013-03-08A big code clean-up patch from Bastien Montagne, many thanks!Tamito Kajiyama
2013-03-02Removed paths to a browser command and help index that are no longer used in ↵Tamito Kajiyama
Freestyle for Blender. Review comment from Campbell.
2013-01-04New command-line option --debug-freestyle to enable verbose debug messagesTamito Kajiyama
on the console during Freestyle rendering. The debug prints are turned off by default now. Errors are still printed on the console. A patch set implementing this functionality was provided by Bastien Montagne. Many thanks! :)
2012-12-18Another big code clean-up patch by Bastien Montagne (GPL headers, indentation,Tamito Kajiyama
spaces around operators, and so forth). Many thanks!
2012-12-12Fix for svn:executable.Tamito Kajiyama
Reported by Bastien Montagne, thanks!
2012-10-06Split time measurement for temporary scene generation from that for stroke ↵Tamito Kajiyama
rendering.
2012-07-17Better handling of the ESC key during Freestyle rendering.Tamito Kajiyama
This commit is meant to improve the response of the ESC key for stopping Freestyle rendering throughout the rendering process. The rendering with Freestyle consists of several steps including: (1) mesh data loading, (2) winged edge construction, (3) silhouette edge detection, (4) view map construction, and (5) stroke drawing. All these steps have been extended to frequently check if the ESC key is pressed, so that users can abort time-consuming rendering at any point of time.
2011-10-06Fix for an uninitialized member variable.Tamito Kajiyama
2011-03-14Optimized view map calculation by Alexander Beels.Tamito Kajiyama
* View map calculation has been intensively optimized for speed by means of: 1) new spatial grid data structures (SphericalGrid for perspective cameras and BoxGrid for orthographic cameras; automatically switched based on the camera type); 2) a heuristic grid density calculation algorithm; and 3) new line visibility computation algorithms: A "traditional" algorithm for emulating old visibility algorithms, and a "cumulative" algorithm for improved, more consistent line visibility, both exploiting the new spatial grid data structures for fast ray casting. A new option "Raycasting Algorithm" was added to allow users to choose a ray casting (line visibility) algorithm. Available choices are: - Normal Ray Casting - Fast Ray Casting - Very Fast Ray Casting - Culled Traditional Visibility Detection - Unculled Traditional Visibility Detection - Culled Cumulative Visibility Detection - Unculled Cumulative Visibility Detection The first three algorithms are those available in the original Freestyle (the "normal" ray casting was used unconditionally, though). The "fast" and "very fast" ray casting algorithms achieve a faster calculation at the cost of less visibility accuracy. The last four are newly introduced optimized options. The culled versions of the new algorithms will exclude from visibility calculation those faces that lay outside the camera, which leads to a faster view map construction. The unculled counterparts will take all faces into account. The unculled visibility algorithms are useful when culling affects stroke chaining. The recommended options for users are the culled/unculled cumulative visibility algorithms. These options are meant to replace the old algorithms in the future. Performance improvements over the old algorithms depend on the scenes to be rendered. * Silhouette detection has also been considerably optimized for speed. Performance gains by this optimization do not depend on scenes. * Improper handling of error conditions in the view map construction was fixed.
2010-12-05Made a change as to when the view map data structure is released,Tamito Kajiyama
with the aim of less memory consumption in stroke rendering.
2010-12-04A few attempts to reduce the amount of memory consumption in Freestyle.Tamito Kajiyama
* Made changes to the Controller so that dynamically allocated memory areas (e.g. imported mesh data, winged edges, and a view map) are released soon after they become unnecessary. * Added a new feature edge selection criterion based on image border. When the "Selection by Image Border" option is enabled, feature edges are selected only if they are within the border of the image being rendered. The border is defined either by the frame size or a border region (specified by the Shift-B key in a 3D View window). When large scenes are rendered, this clipping by the image border leads to less memory consumption. * Enabled the "Silhouette", "Border", and "Crease" edge types of the Selection by Edge Types option by default. When no edge types are specified, all feature edges including "Ridge", "Valley" and "Suggestive Contour" are detected at the cost of extra memory consumption. Disabling these three edge types and enabling some other edge type leads to less memory consumption. This change is intended to help new Freestyle users by providing a typical, low memory consumption default setting. * Slightly rearranged the UI controls for feature edge selection.
2010-10-17Fix for a bug that style modules from wrong scene render layersTamito Kajiyama
were executed. The bug was reported by Dazzle in the BA Freestyle thread, thanks!
2010-07-26* Implemented the basic stroke rendering functionality for the newTamito Kajiyama
Parameter Editor mode. This is a WIP commit. Only the base line color, base alpha transparency, and base line thickness are respected. More additions are anticipated to account for other parameters. * Added FRS_finish_stroke_rendering() to clean Freestyle-related temporary resources after stroke rendering. * Some functions in FRS_freestyle.cpp are now declared as static functions, so as not to mess up the program-wide name space. * Made the StyleModule class inheritable, and defined new subclass BlenderStyleModule that takes a Text object instead of a file name.
2010-05-23New option to specify the angular threshold for detecting crease edges.Tamito Kajiyama
An entry "Crease Angle" has been added to the Layers tab of the Render buttons, to allow users to specify an angle (between 0 and 180) used for crease edge detection. An edge is considered a crease edge if the angle between two faces sharing the edge is smaller than the threshold. The default value is 134.43 degrees (for backward compatibility). Be aware that a larger threshold leads to a larger number of feature edges and thus a larger memory consumption.
2010-05-23New option for detecting feature edges at material boundaries.Tamito Kajiyama
A checkbox "Material Boundaries" has been added to the Freestyle options in the Layers tab of the Render buttons. By enabling the option, any edge between two faces with different materials is detected as a feature edge. In style modules, edges at material boundaries can be tested with pyNatureUP1D(Nature.MATERIAL_BOUNDARY).
2010-03-28Fixed the full sample anti-aliasing support in Freestyle.Tamito Kajiyama
The render pipeline has been extended to better work with Freestyle stroke rendering. Struct Render has a new member ListBase freestyle_renders to keep Render instances generated through stroke rendering in Freestyle. The number of elements (LinkData instances with LinkData::data pointing to a Render instance) in freestyle_renders is the same as the scene render layers of the scene being rendered. When the k-th scene render layer has the Freestyle option enabled, the k-th element of freestyle_renders refers to a Render instance that holds Freestyle render results for the scene layer. This association between the scene render layer and the Render instance is used to merge the Freestyle render results into the corresponding render results for the scene render layer.
2010-02-17Fixed bugs in AppCanvas::readColorPixels() andTamito Kajiyama
AppCanvas::readDepthPixels() that caused a crash when the aspect ratio was not 1:1.
2010-02-14Added support for pixel-based density and Z depth information.Tamito Kajiyama
Availability of pixel-based density and Z depth information depends on passes of a render layer being rendered. - Density information is available if the diffuse pass of the render layer is enabled. It is accessible through the DensityF0D and DensityF1D functions provided by the Freestyle Python API. These functions return 0 if the diffuse pass is disabled. - Z depth information is available if the Z pass is enabled. It can be accessed through LocalAverageDepthF0D and LocalAverageDepthF1D. These functions return 0 if the Z pass is disabled.
2010-02-13Further consolidation of the view map creation.Tamito Kajiyama
Made Controller::_EPSILON constant with the value 1e-6. Previously, the _EPSILON value was computed based on the minimum edge size within the scene being rendered (in some cases, the computed value resulted in zero). This does not seem to make sense, because _EPSILON has been used as a tolerance threshold of floating-point arithmetic errors throughout the view map creation. Since Blender uses single-precision real values for mesh data representations, the new constant _EPSILON value looks more adequate.
2010-02-01Added support for orthographic camera.Tamito Kajiyama
The FEdgeXDetector class for silhouette edge detection and the ViewMapBuilder class for view map creation are enhanced. All changes are related to view point handling (i.e., the camera location). In the perspective projection, the visibility of feature edges and edge types (e.g., borders and crease lines) are computed based on a fixed view point, whereas the view point in the orthographic projection is an arbitrary point on the XY plane at the origin and is determined so that a line segment from the view point to a point in the 3D space is perpendicular to the XY plane. All view point related portions of the class definitions were modified so as to deal with the two different camera modes.
2009-11-10Improved context handling. Previously FRS_initialize() was used for bothTamito Kajiyama
initializing Freestyle and specifying contexts, making the API a bit messy. Now FRS_initialize() is only for initialization, and contexts are specified by new FRS_set_context() function just before starting rendering.