Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
used.
|
|
|
|
Problem report by flokkievids in the BA Freestyle thread, thanks!
Also made changes to suppress warnings in strip creation when Freestyle debugging is disabled.
|
|
the stroke.
Patch from flokkievids in the BA Freestyle thread, thanks!
|
|
SpatialNoiseShader, as well as SmoothingShader were not updating stroke length after
geometry modification, causing an infinite loop in Stroke::Resample(int iNPoints) due to
incorrect length-based resampling of stroke vertices.
|
|
- StrokeAttribute thickness setter
- BezierCurve (used from within BezierCurveShader)
- Smoother (used from within SmoothingShader)
|
|
|
|
|
|
Extra long straight lines showed up randomly due to the use of an uninitialized
variable as a line length parameter.
|
|
were not properly interpolated.
|
|
|
|
|
|
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.
|
|
Suggested by Brecht Van Lommel and Campbell Barton through code review comments.
Previously style modules were external Python script files whose absolute paths
were kept in .blend files. Now style modules are stored in .blend files as text
datablocks.
Style modules are configured in three steps:
1. Open an external style module file (or create a new text datablock) in the
Text Editor in Blender.
2. Add a style module to the list of style modules (by pressing the "Add" button)
in the Render Layer properties window.
3. Click the name entry and select the style module from the drop-down menu.
|
|
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
|
|
where additions of a small offset (to prevent vertices from being at the same point)
were not properly done when vertices were shifted in the reverse order.
A problem report by Vicente Carro through personal communications, thanks a lot!
|
|
|
|
method
for releasing resources. Based on review comment from Campbell.
|
|
|
|
small "error"
parameter value. The problem was caused by a null pointer reference in CurvePiece::error()
resulting from incorrect lengths of subdivided curves calculated in CurvePiece::subdivide().
Problem report by IRIE Shinsuke with a GDB backtrace log, many thanks!
|
|
StrokeVertex.point2d() instead of .getPoint(). It is noted that .point2d()
returns a 3-dimensional vector representing a 2D-projected point, with the z
component indicating a normalized depth of the original 3D point, whereas
.getPoint() returns a plain 2-dimensional vector. This fix should have been
done in revision 48510...
Also made fix for callers of Stroke.Resample() not calling stroke.UpdateLength().
|
|
(from gcc 4.7),
mostly by commenting out unused variables, or using the BLI's SET_UINT_IN_POINTER macro.
|
|
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! :)
|
|
again!
|
|
|
|
Reported by Bastien Montagne, thanks!
|
|
Patch contribution by Bastien Montagne, thanks!
|
|
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
|
|
|
|
The previous stroke creation procedure was trying to clean stroke topology
by removing overlapping stroke vertices in the same 2D location. The idea
was to avoid having to address this kind of singularity during subsequent
stroke shading. In-depth analyses revealed, however, that this was a wrong
way to ensure clean stroke topology, since just deleting overlapping vertices
may break the continuity of the underlying series of FEdges on top of which
the stroke has been built. Such a break of linked FEdges was a major cause
of frequent failure in CurvePoint::getFEdge().
The present commit aims to address the singularity issue by adding small
offsets to the 2D location of overlapping vertices and making them
non-overlapping to each other. Since the offsets only result in sub-pixel
differences, the impact on visual outcomes is expected to be negligible.
|
|
that
none of the SVertices are within the image boundary but an FEdge intersects with
the image boundary.
The problem was reported by edna through the BA Freestyle thread, with a .blend
file for reproducing the bug. Thanks!
|
|
Reported by flokkievids, thanks!
|
|
The Post Processing tab in the Render buttons has new Line Thickness options for
defining unit line thickness in two different modes as follows:
1. Absolute mode: The unit line thickness is given by a user-specified number
in units of pixels. The default value is 1.
2. Relative mode: The unit line thickness is scaled by the proportion of the
present vertical image resolution to 480 pixels. For instance, the unit line
thickness is 1 with the image height set to 480, 1.5 with 720, and 2 with 960.
|
|
stokes with 2D length longer than 50. Problem report by Forrest Gimp, thanks!
|
|
segment.
|
|
* Stroke::Resample(int nPoints) was not properly working when a wrong
value was returned from Stroke::getLength2D(), resulting in repeated
warning messages "Warning: incorrect points number" during stroke
rendering. The main cause was that stroke geometry shaders did not
update the two-dimensional (2D) length (also referred to as curvilinear
abscissa) after they modified the 2D points of stroke vertices. Now
all stroke geometry shaders make explicit calls for Stroke::UpdateLength()
that has been introduced for recomputing the 2D length. Many thanks to
Josef who reported the problem together with sample .blend files for
reproducing the issue.
* Missing Python wrapper of Stroke::getLength2D() was added.
|
|
of underlying FEdges introduced by chaining operations. The material of a
smooth FEdge is identified by the material index of the FEdge and the array
of materials in the SShape to which the first SVertex (i.e., vertexA) of the
FEdge belong. The present fix makes sure that the material index refers to the
intended array of materials, to avoid inconsistent reference and out-of-index
errors that lead to a crash.
|
|
FEdges
introduced by chaining operations. When two ViewEdges are concatenated by a chaining
operator, the last vertex of one ViewEdge and the first vertex of the other reside
in the same 3D position, so that the latter vertex is omitted. This caused a pair
of SVertices unconnected by an FEdge. The present commit intends to fix this issue.
The bug was reported by mato_sus304 with a .blend file reproducing the issue. Thanks!
|
|
Strip::createStrip().
|
|
|
|
This is still not the best solution, but seems to yield much better results.
|
|
The error was identified thanks to a problem report that MaterialF0D() failed
when the Face Smoothness option was enabled.
|
|
* 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.
|
|
Error handling in Operators::Chain(), Operators::bidirectionalChain(), and
Operators::create() was improved to release allocated data structures when
errors raised in user-defined predicates, chaining iterators, and shaders.
|
|
Fixed a complicated bug that caused a failure of CurvePoint::getFEdge()
which had affected a number of C/Python API functions such as MaterialF0D.
The current view map building procedure may generate ViewEdges whose
two-dimensional (2D) length is almost or exactly zero. Such a zero-length
ViewEdge is possibly chained with other ViewEdges to form a stroke. When
the stroke is finally generated by Operators::create(), an attempt to remove
redundant vertices at the same 2D point is made. This possibly breaks the
links of ViewEdges on top of which the stroke has been built, and eventually
result in a fatal error of CurvePoint::getFEdge() when API functions that
rely on this method are called from within a style module.
The present fix addresses this issue by automatically removing zero-length
ViewEdges (and Chains of them) before stroke drawing is started and after
splitting is performed (e.g., using Operators::sequentialSplit()).
|
|
occasional unexpected long lines.
1. The Parameter Editor mode was extended to prevent strokes from
doing quick U-turns that "enable" a known bug in strip creation
that generates unexpected long lines in question.
2. A verbose warning message was added to make the existence of
the strip creation bug visible to users. When the bug affects the
stroke rendering, the following warning shows up in the console:
> Warning: problem in strip creation (the strip is most likely doing a U-turn).
3. The extrapolation option of CurveMapping (used in alpha and
thickness modifiers in the Parameter Editor mode) was identified
as another source of unexpected long lines. Now the extrapolation
option is unconditionally disabled (even when users enable it
through the GUI).
|