
Introduction:
FreeStyle is a non-photorealistic render that generates line drawings from a 3D scene. It is freely available for download from
http://freestyle.sourceforge.net/
Its documentation can be accessed online at
http://freestyle.sourceforge.net/doc/html/index.html
The renderer is an open-source renderer and the source code can be compiled for Windows, Linux and Mac.
Description:
Freestyle is a simple & easy to use renderer that can be used to create artistic style pencil drawing for a 3D model. It uses ray tracing to create these drawings and user has the ability to define his/her custom style using a python script. These python scripts are called “Style Modules”. Once defined/created, these modules can be applied on multiple models to get the same effect. An interesting property of these modules is that they can be layered over the top of each other to get a more complex effect. Due to this layering, the order in which these modules are applied to the model also affects their output.
User Interface:
The basic user interface is very simple. Most of the functionality is controlled using key-bindings and there are no toolbars

on the main screen. You can load a “3D Studio Max” model (.3Ds only) into the renderer. After loading up the model, it’s displayed on the screen. You can use different views of the model like cartoon view, view silhouettes etc. Once you have decided on a view you want to render, you use “Tools->Compute View Map” to generate a view map for the current camera position. Note the camera position is always defined by the current view meaning the user is taken as the camera.
Style Modeler:
After defining the view map, the user uses the “Windows->Style Modeler Window” to open the Style Modeler. This is used to define the python scripts that will be used to generate the 2D line drawing output. You can load different scripts in this window and also define the order they will be applied to the model. You also have the option to enable or disable a particular style while rendering.

The scripts are very simple to program and contain 5 kinds of operations:
All these operations act on a set of 1D active elements of a ViewMap. The different elements that can be active at some point of the pipeline are:

Initially, the set of active elements is the set of every ViewEdge of the ViewMap.
Rendering the scene:
To render the current scene, “Tools->Compute Strokes” is used. The output from the example scene displayed above is shown here. Different styles are layered over the top of each other to create a new style.

The interesting part is that due to generation of the ViewMap, the rendering doesn’t take much time. The rendering time is divided into the two phases and for this scene it took something like 5 seconds to generate output.
Rendering a more
complex model:
The scene setup in FreeStyle is just dependent on the view map generated from the current scene. Different models in a scene and their interaction with each other doesn’t affect the final output. So instead of creating a scene with different models, I took a more complex model from the web to create my second scene.

The scene is that of a castle. The problem with FreeStyle is that it is not able to handle complex scenes with multiple models inside them. It just crashes if we load such a heavy scene. So it was difficult to find the model of just about the right size. The ViewMap creation process involving the following steps took about 10 secs.
Detecting Feature Lines- 1 sec
Computing Sweep Line Interactions – 1 sec
Splitting Intersected Edges – 1 sec
Computing Ray Casting Visibility – 7 secs
I used the following style modules (in order)
Thickness_fof_depth_discontinuity.py
Polygonalize.py
Cartoon.py
Ignore_Small_Occlusions.py
Backbone_Strectcher.py
The computation of strokes took about 40 secs which was a lot longer than expected. The output is shown below

Conclusion:
FreeStyle is very light weight and easy to use NPR renderer. It has a solid base but one feels that it lacks features and also not very scalable. It also doesn’t provide support for shading planes and deals with lines only. To generate true NPR picture, there should be support for line driven shading of planes. However, all this makes it very interesting base to extend and there is a lot of talk on the web about developers who are interested in extending its functionality. Also there are plans for merging this with “Blender”. That will definitely make more sense, as this will help in overcoming some of the current shortcomings of the software.