resolution (i.e., image width and height, scaled by the size factor).
Problem report by flokkievids together with a .blend file for reproducing
the bug, thanks!
for stroke rendering. This fix is intended to improve the
stability of stroke rendering when the output format is AVI
Codec, QuickTime, or one of FFMpeg codecs.
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.
rendering.
RE_BlenderFrame() and RE_BlenderAnim() are Blender's internal
top-level rendering API functions for a single frame and a series of
frames, respectively. These functions rely on global variables to
keep render pipeline states. Freestyle's stroke rendering was also
using RE_BlenderFrame to render a temporary scene of stroke meshes.
These nested calls of the top-level rendering API functions were
causing broken render pipeline states and eventually led to a crash.
This commit is intended to fix the issue, by introducing an rendering
API function RE_RenderFreestyleStrokes specifically used for stroke
rendering in Freestyle. The new function does not do anything with
regard to the global variables in the rendering API implementation.
Transparent strokes are rendered by means of transparent vertex colors.
To make this possible, Blender's internal renderer has been slightly
extended to allow transparent vertex colors. When Material::vcol_alpha
is non-zero, the renderer takes MCol::a into account.
because of incomplete functionality.
When two transparent strokes intersect, the stroke drawn first is
completely overridden by the stroke drawn after the first stroke,
instead of two stroke colors being blended at the intersection.
In Freestyle, strokes are represented with triangle strips, and stroke
colors are realized using vertex colors in order to enable variable
stroke colors (i.e., each triangle has a different color). Stroke
colors in Freestyle are in the RGBA format, while vertex colors in
Blender do not have an alpha component. Therefore, we here employ a
2-pass rendering approach as follows. First, the alpha component of
an image is rendered by using the red component of vertex colors as
the alpha component of stroke colors (1st pass). The render result is
saved into a temporary buffer. Then, the vertex colors of stroke
meshes are replaced with RGB values, and the RGB components of the
image is rendered (2nd pass). Finally, the RGB and alpha components
are merged to produce the render result in the RGBA format.
rendering. When objects exists out of the viewing frustrum and
near the near clipping plane, feature edges in the 3D camera
coordinate system are projected to an extremely far location from
the camera view in the 2D image space. These feature edges
result in very long strokes with a large number of stroke
vertices, which temporarily require a significant memory storage,
causing a fatal "out of memory" error. This problem is partially
addressed by the changes in the present commit.
Updated buttons_render.py to have Freestyle buttons
Added "empty" BlenderTextureManager as preliminary step to remove last remnants of OpenGL and to allow Freestyle to run on my machine.