Freestyle integration into Blender

September 23, 2010

Weekly update September 1-21

Filed under: Update — The dev team @ 1:27 AM

Over the last three weeks, the dev team was working on two things.  One is integration of the new Parameter Editor mode into Blender’s animation system, and the other is a preliminary study on improvement of line drawing quality.

When we started adding the new graphical user interface (GUI) component, we had two implementation goals in mind: to make Freestyle accessible to artists without programming efforts, and to make Freestyle-generated line drawing animatable.  One of Blender 2.5 design concepts is to make everything animatable.  This rule applies to Freestyle as an integrated part of the 3D suite.  To this end, what we did is the following.  First, basic functionality for manipulating keyframes with respect to stylization parameters in Freestyle was implemented.  Keyframes can be specified in terms of base line color, alpha transparency, and line thickness, as well as all UI controls in color, alpha and thickness modifiers.  The following image is a capture of the context menu you get when you right click on UI controls in the Line Style tab.  Using this menu, keyframes can be inserted, replaced and deleted.

After we got the basic keyframe manipulation working, we moved on to extending animation-related editors in Blender, in order to permit manipulating animation data in line style data blocks.  Specifically, the Graph Editor, DopeSheet, and NLA Editor have been extended so that you can edit keyframe curves, drivers and actions with respect to line style parameters, as illustrated by the following screenshot.

The image below is a simple example of stylization parameter animation by means of the functionalities described above (plus postprocessing with GIMP).

Playing with animating strokes no longer requires any Python scripting.  It is a matter of imagination.  We hope you enjoy line drawing animation with Freestyle and Blender.

In the meantime, the dev team was investigating how to improve the quality of stroke rendering.  At the moment, stroke rendering in Freestyle does not have options for altering line joins (such as miter, round and bevel joins) and line caps (such as butt, round and square caps).  In addtion, strokes in Freestyle cannot be closed for now, meaning that every stroke has the beginning and the end.  These options are supposed to be available in every line drawing software, and indeed they are necessary in Freestyle as well.

A technical issue here is that strokes are currently represented by a specific mesh structure called triangle strip.  This mesh structure is easy to deal with, but its power of expression is very limited.  When complex strokes with line joins and line caps are considered, triangle strip is not necessarily applicable and a more general mesh structure is required.  Using a general mesh structure has its own difficulties.  For instance, generating a stroke mesh from a series of feature edges might be tricky when the stroke is thick and it makes a sharp U-turn.  The following image shows what Inkscape, a vectorial drawing tool, does when a path has different thickness values.

Red paths are identical, and grey polygons show the areas covered by the path with different thickness values.  This exemplifies what Freestyle should do when it draws a stroke along a series of feature edges.  When thickness values are relatively small as in (a) and (b), nothing special happens.  Increasing the thickness, however, makes the outline of strokes complicated, as shown in (c) and (d).

Branch users may have encountered a problem that unexpected long lines are occasionally drawn by Freestyle.  This is in fact a bug related to strokes with U-turns.  Fixing this issue is a priority task, and properly supporting line joins, line caps and closed strokes will be an integrated part of it.

More work on these stroke rendering issues as well as the new GUI development is anticipated in the next weeks.

September 2, 2010

Weekly update August 12-31

Filed under: Update — The dev team @ 1:11 AM

Since the last blog post, the dev team was working on several issues reported by branch users.  Two bugs causing a crash of the Freestyle renderer were successfully fixed, thanks to the provision of a .blend file by Cloud_GL for bug hunting.  One of the bugs was related to the use of movie file formats such as AVI, QuickTime, and FFMPEG codecs.  When one of these movie file formats is in use, animation rendering with the Freestyle renderer enabled was very unstable.  The other bug was in the Resampling shader for changing the spatial resolution of strokes.  Since the Resampling shader is widely used in standard style modules, the bug must have caused a lot of trouble on the users side.

Soon after the instability issues were addressed, several branch users kindly reported that the branch is more stable than ever and now is capable of rendering those .blend files that previously cause a crash.  We really appreciate the feedback, thanks!

In the mean time, Stéphane, one of the developers of the original Freestyle, sent us a link to a movie clip for introducing Freestyle.  The movie clip was screened during the Technical Papers Fast Forward session in SIGGRAPH 2010.  The entire movie clip was made using Blender and Freestyle.  Thank you Stéphane for sharing the nice video!

Blog at WordPress.com.