Now that the instability issues listed in the new to-do list have been mostly addressed, the next target is to recover missing features enumerated in the to-do list. To begin with, the dev team was working on transparent stroke colors during the last week.
In Freestyle, strokes to be rendered are represented with triangle strips. Stroke colors can be constant throughout a stroke, as well as variable for each triangle. Therefore, strokes are rendered by means of vertex colors in Blender. Stroke colors are specified in the RGBA format, whereas vertex colors do not have an alpha component (as a matter of fact, the internal MCol data structure for holding vertex colors has an alpha value, but the Blender internal renderer does not use it). This latter fact makes it difficult to render transparent stroke colors using the Blender internal renderer.
One approach to realize transparent stroke colors is to define transparent materials and assign them to triangles, instead of relying on vertex colors. It is remarked, however, that the maximum number of materials per mesh is 65536. This means that variable stroke colors cannot attain a very high gradient resolution.
Another approach is to employ a different general-purpose 2D rendering engine (such as Cairo) instead of using the Blender internal renderer. In fact, using the internal renderer for stroke rendering in Freestyle is a tricky idea, because Freestyle is a post-processing engine like the compositor and sequencer and thus the internal renderer is considered to have finished its job before Freestyle is invoked. Freestyle creates a temporary scene of its own to render strokes using the internal renderer, which Brecht described as “it looks like a hack.” However, employing an external 2D rendering engine imposes an extra software dependency that would complicate not only code maintenance by the dev team but also user-side build processes in various platforms. These considerations have motivated the use of the Blender internal renderer for stroke rendering in Freestyle.
Back to the problem of implementing transparent stroke colors, we decided to remain with the Blender internal renderer. Since vertex colors do not directly deal with transparency, we here employ a two-pass rendering approach as follows. First, the alpha component of an image is rendered by utilizing 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 are rendered (2nd pass). Finally, the alpha and RGB components are merged to produce the render result in the RGBA format. This method has been implemented in revision 26695 of the Freestyle branch. Any kind of feedback on this matter would be greatly appreciated.