BNPR Exclusive: Freestyle Peregrination into Blender

FreeStyle integration into Blender is a long story, Maxime Curioni was 24 years old when he submitted the proposal for FreeStyle integration into Blender via Google Summer of Code 2008. Today, he is 29 years old. In term of software and programming it is a generation apart.

In case you don’t know what Freestyle is, below is the “official” introduction that will be in the Blender’s wiki and release note.

Freestyle is an edge and line-based non-photo realistic (NPR) rendering engine. It relies on mesh data and z-depth information to draw lines on selected edge types. Various line styles can be added to produce artistic (“hand drawn”, “painted”, etc.) or technical (hard line) looks. The two operating modes – Python Scripting and Parameter Editor – allow a powerful diversity of line styles and results. Line styles such as Japanese big brush, cartoon, blueprint, thickness-with-depth are already pre-scripted in Python. The Parameter Editor mode allows intuitive editing of features such as dotted lines and easy set up of multiple line types and edge definitions. On top of all of that, with the introduction line style modifiers, the sky is the limit!

Even with that intro many people are often confused about what FreeStyle really is. Some say it is material, some say it has nodes, others say it is cartoon stuff.

Archviz by lokesh

Archviz by lokesh

First off, it isn’t material. It is lines generated on top of your render. These lines are calculated from mesh data, which is tasking to compute but very accurate. It doesn’t have node support yet but that is planned. “Freestyle is for cartoon,” that is partially true. It is line-art and line-art can be on anything. Think of an epic pimped-up brochure with 3D effects (Maker magazine style), logo, mechanical drawings, even pie-charts. Everything involving line-art via Blender can be done with freestyle.

overweight boss by mclelun

overweight boss by Mclelun

Freestyle Before Blender

Freestyle was an external renderer base on a research paper in 2004. http://freestyle.sourceforge.net was created in 2005 to initiate coding from the research. In early 2007, Stéphane Grabli and Emmanuel Turquin wrote to Blender Mailing list about possible integration of Freestyle into Blender. It gained big support with draft features and usability feedback from Blender community. On April 2008 Blender was awarded with 6 GoSC projects, FreeStyle being one of the projects.

Major events

FreeStyle 2008 GoSC. Proposal [Link], Midterm [Link], Status Report 2009 [Link]

Since the first build in 2008 GoSC, FreeStyle has faced major adoption obstacles. Up until around June 2010, FreeStyle only had scripting mode.  User must load python scripted module as style, not user friendly and only advance users could make different styles. FreeStyle isn’t really “freestyle”. Another major obstacle is Blender 2.5 major refactoring–for a project this big, I’m really amaze by their code work. It hits again when Bmesh is in trunk. Imagine coding the same thing 3 times!

FreeStyle UI before the introduction of Parameter Editor Mode

The Freestyle renderer, which was originally a stand-alone NPR application program with external dependencies (i.e., OpenGL, Qt, lib3ds, and so on), has already been fully integrated into Blender and no longer depends on any third-party software components.

That is a big milestone but T.K. loss a coding buddy.

After having brought the Freestyle integration work to this height, Maxime informed me (T.K.) of his intention to discontinue his involvement in the project.  In his last blog post, he has explained the aim of the withdrawal as to devote more time and energy to his software engineering career and work on different matters closer to the fields he is working in.  His leave is certainly a big loss for the Freestyle integration project as well as for the Blender community, but still his decision is acceptable and I totally understand what he intends to mean. [Link]

From then on, T.K. only has the original FreeStyle developers to help him stabilize and fix Freestyle. Around June 2010, the first implementation of the parameter editor mode started. It mimic of how the style modules were coded. [Link] [Link] [Link]

Early UI of Parameter Editor Mode

Then came Alexander Beels, he optimized the view map construction code and introduced a new option “Raycasting Algorithm” to the Freestyle tab. That translate into “a huge performance gain in silhouette edge detection.” In T.K.’s own words “This is really great!” [Link]

film noir by Greg Sandor

film noir by Greg Sandor

FreeStyle, are we there yet? Nope, not yet.

Four years has passed, Freestyle was still a branch and it got constant bugs and UI/UX fixes. Almost every week, when Developer meeting is posted, Blender Nation’s comment section will have at least one comment asking “when will Freestyle be in Blender trunk?” or “Any update on Freestyle?” Since Blender 2.65, motivation is high in the NPR camp.

HVAC Pre-Viz by Lee Posey

HVAC Pre-Viz by Lee Posey

Blender 2.65

  • Brecht checks this week on Freestyle branch, and reports back if it’s feasible to review and add for 2.65. It then becomes a target, or we move it to 2.66. [Link]
  • Initial review of Freestyle branch shows that’s it not ready in two weeks (deadline for release targets to get added in trunk). Bastien Montagne is interested to check on helping Tamito, we could make sure it’s OK for 2.66. [Link]
  • Bastien Montagne sent patches for the FreeStyle branch to Tamito. He’s afraid there’s still too much work involved. [Link]
  • Freestyle is under review still – Bastien Montagne has been working there. [Link]
Product design render by Nakeyta Schulz

Product design render by Nakeyta Schulz

Blender 2.66

  • Bastien Montagne: Freestyle integration is also a 2.67 target now [Link]
  • Freestyle and PyNodes are still 2.67 targets. [Link]
  • Next release FreeStyle is a target too, everyone please test and help out! [Link]
  • Freestyle, no real news, but final review can start soon. [Link]
  • Freestyle still needs more reviews. Sergey Sharybin has time for review. Campbell Barton’s remarks are being handled by Tamito Kajiyama.
    Ton Roosendaal: we need demo files and good docs for Freestyle! Especially having the users for Freestyle involved (almost daily) this month would work much better to get this migration done. Just drop in our IRC developer channel [Link]
  • Freestyle: Tamito Kajiyama addressed the comments from Campbell Barton already. Sergey Sharybin will start reviewing FreeStyle tomorrow. Looks like also this will go in svn this week! Freestyle code review in progressFreestyle doc in progress. [Link]
  • Freestyle: more reviews were done, and all handled by Tamito Kajiyama. Should be feasible for final merger this week! Tomorrow we’ll do final checks. [Link]
 “Kei-On!” by Mohe & Shiratama

“Kei-On!” by Mohe & Shiratama

The 5 years long project finally in Blender SVN trunk

Campbell wrote in the code review:

Hi Tamito, how are your plans for merging into trunk? As far as I can see, the branch can be merged now. [Link]

T.K. wrote via Tweeter:

Green light from Campbell — Freestyle is coming in Blender 2.67! [Link]

Merge is done in 2 phases:

Part I of the Freestyle branch merger: new ‘freestyle’ folders. [Link]
Part II of the Freestyle branch merger: modifications to the trunk code base. [Link]

Now no more “are we there yet?” kind of question. [A personal acknowledgement by T.K. ] [Stephane's reply] [Maxime Curioni's reply]

Future is beyond the Cosmos

The journey isn’t ending yet. FreeStyle has yet to unleash its full potential. To improve FreeStyle further, everyone can provide ideas to the publicly open FreeStyle Improvement Suggestion Document. We are also calling for help with FreeStyle Documentation, demo blend files are most welcome. Don’t forget to support us too. A Flattr or 2 will keeps ads away, pay site’s bills and keep BNPR alive.

vaisseaucolo by blendman

vaisseaucolo by blendman

Deepest Thanks and Gratitude

Original FreeStyle developers:

Stéphane Grabli

Emmanuel Turquin

Frédo Durand

François Sillion

FreeStyle Integration into Blender Developers:

Maxime Curioni
For your first step of the integration, which is always the hardest

Tamito Kajiyama (T.K.)
Being steadfast, kind and honest

Alexander Beels
For speeding things up

Code Reviewers:

Brecht van Lommel

Bastien Montagne

Campbell Barton

Sergey Sharybin

Shinsuke Irie

Blender IRC Freenode #Blendercoders regulars
and
Blender main developers

Freestyle build builders

Providing regular builds for everyone to play with

Blender Artists forum regulars

You guys who reported bugs, provide fixes and make UI/UX much more intuitive

Tutorial makers and wiki documenters

Researchers who inspire to the creation of FreeStyle

&

FreeStylers

For your awesome artworks, always inspiring

Arks by Blenderman

Arks by Blenderman

Share on Facebook38Share on Google+19Tweet about this on Twitter19Share on Reddit0Flattr the author
  • Shane

    First a big hand to the freestyle devs…… well done.

    One question I haven’t seen answered is whether freestyle is going to save the Internal render or is planned to move to cycles?
    Mention has been made that there will be no further official dev for the old internal render leaving any changes to the community. Will the freestyle devs be keeping BI alive as part of freestyle.

    One suggestion I would give for future features is a full painterly effect. I guess it would be based on faces, filling them with a ‘random’ array of brush strokes to make it appear hand painted.