The last blog post received a number of comments through the blog system and the BA Freestyle thread, which reminded us once more of the increasing interest in a user-friendly graphical user interface (GUI) for Freestyle in Blender. To start with the design of the new GUI framework, we conducted an in-depth study of existing non-photorealistic (NPR) rendering software packages. Some of the investigated NPR software packages have well-defined feature sets, providing us with a good deal of insight into GUI design possibilities. After comparing the features offered, the organization of UI controls, and the ways of user interaction, we drew the initial plan toward the design and implementation of the new Freestyle GUI in Blender. Basic concepts are as follows:
- Render layers remain the primary place where Freestyle-related options are stored.
- Two separate control modes are introduced: One is the Python Scripting mode, a conventional control mode that allows you to directly use style modules written in Python. The other is a new control mode named the Parameter Editor mode that is intended to be usable by everyone without relying on Python programming. The new control mode is equipped with a rich set of UI controls built into Blender.
- Each render layer can choose to use either the Python Scripting or Paramete Editor mode.
- In the Parameter Editor mode, a render layer has one or more linesets. A lineset consists of feature edge selection criteria and a line style datablock.
- Feature edge selection criteria are used to select from a set of all feature edges in the view map only those on which you want to draw strokes. For instance, you specify a couple of criteria for selecting only visible crease edges.
- A line style is a set of line stylization parameters that describe the appearance of strokes as well as how feature edges are joined to build the strokes. Line style is a new datablock type, meaning that a line style can be shared by multiple linesets (possibly of different render layers in different scenes). Line styles will be manipulated through a number of UI controls such as color ramps for specifying color gradients, curve editors for non-linear line thickness and opacity, and a preview window for seeing the effects of parameter changes in real time.
Branch users may have noticed that some of these elements have already been implemented in the latest revision of the Freestyle branch. Now the Render buttons have two new tabs: the “Freestyle” tab and “Freestyle: Line Style” tab. The former has render layer-specific options, while the latter contains UI controls for editing line styles. The two images below show the new tabs in the Python Scripting mode (left) and Parameter Editor mode (right).
The code base is currently in a work-in-progress state. Most of the new UI elements in the Parameter Editor mode shown above are basically a mock-up, and there is no usefulness for end users. Much more additions are anticipated in the next weeks.
In the meantime, Maxime has kindly provided a set of slides that explain the internal of the Freestyle renderer in Blender. The slides would be of great help for those people who are interested in getting involved in the Freestyle integration project.