Commit Graph

11 Commits

Author SHA1 Message Date
7d377478c3 New option to specify the angular threshold for detecting crease edges.
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-22 23:56:42 +00:00
b85985535d New option for detecting feature edges at material boundaries.
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-05-22 22:21:15 +00:00
840ba8e8e7 Fixed the full sample anti-aliasing support in Freestyle.
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-03-28 17:46:10 +00:00
39ea873a8b Fixed bugs in AppCanvas::readColorPixels() and
AppCanvas::readDepthPixels() that caused a crash when
the aspect ratio was not 1:1.
2010-02-16 21:44:18 +00:00
903cc89e30 Added support for pixel-based density and Z depth information.
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-14 03:17:52 +00:00
1b3948f9aa Further consolidation of the view map creation.
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-12 23:24:59 +00:00
107667d20a Added support for orthographic camera.
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.
2010-01-31 22:56:19 +00:00
51efe7de27 Improved context handling. Previously FRS_initialize() was used for both
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.
2009-11-10 00:03:31 +00:00
Maxime Curioni
dc81204c91 TK's patch to correct the PythonInterpereter 2009-10-15 03:32:53 +00:00
Maxime Curioni
896a5fccef fixed headers and SConscript to have successful build 2009-10-05 01:27:35 +00:00
Maxime Curioni
e3e6e3ff0c renamed folders 2009-10-05 00:37:30 +00:00