Freestyle integration into Blender

June 7, 2010

Weekly update May 24-June 6

Filed under: Update — The dev team @ 4:23 PM

In the last two weeks, the dev team made a few fixes and improvements for a better stability of the Freestyle branch.  A possible source of memory leak in WingedEdgeBuilder (part of the initial mesh importer) has been eliminated, while a fatal crash due to materials of the wire type has been fixed.

Now that most entries in the December 2009 edition of the to-do list have been addressed, it is a good time for defining the final targets toward the merge into the trunk.  Here is a list of tasks that we would like to finish before we ask for the merge:

  • An artist-friendly graphical user interface (GUI) with a stylization preview window
  • Feature edge detection at the intersection of two faces
  • Completion of Freestyle Python API improvements

The following items in the previous to-do list will be postponed after the merge into the trunk:

  • Textured strokes
  • Steerable view map

Acknowledging an increasing number of requests for a better GUI, we should definitely consider providing a more intuitive and easy-to-use GUI specifically designed for artist-side users.  A major requirement for the GUI design is to maintain the high programmability of the Freestyle framework.  It is recalled that Freestyle is not only a bunch of predefined parameterized styles, but also a generic tool that allows you to define your own styles based on novel stylization ideas and new parameters.  SVGWriter is an example of many possibilities the extensible nature of Freestyle enables.  Keeping this requirement in mind, we have been considering several options.

  1. As discussed many times since the beginning of the Freestyle integration project, a node-based system would be an ideal GUI that most people could imagine.  However, this approach is too ambitious when the present limited resources (i.e., time and developers) are taken into account.
  2. A more feasible option is to provide a versatile style module equipped with a fixed set of stylization parameters that can emulate common style modules.  Implementing a universal style module of this kind would be a bit tricky, however, because of the present rigid interaction between the Freestyle renderer and a style module.  Basically a style module is just a call back function invoked from within the rendering pipeline, and there is no user interaction mechanism that allows style modules to build their own GUIs, as well as no persistent memory system for saving and loading style-specific parameter settings.  The design and implementation of these subsystems might require nearly the same amount of development costs with the node-based approach.
  3. Another option with a good cost-effectiveness ratio is to provide a fixed set of common stylization parameters through a built-in GUI (as part of the Layers tab in the Render buttons).  This approach can rely on the existing GUI and file I/O components of Blender.  Interactive parameter controls for non-programming users are offered through a “basic” mode, while user-defined style modules written in Python will be accessible through an “expert” mode.

As of this writing, the last option seems the most promising.  We are going to look into all these options in the next weeks.  As an attempt to implement a stylization preview window, we have successfully added strokes into the material preview window as shown below (please note that this is just a test from a technical perspective).

The idea here is to introduce a stylization preview window that shows a simple predefined scene (e.g., just a cube or Suzanne) in line with the material preview window.  More work on this specific GUI element is also anticipated in the following weeks.

Advertisements

12 Comments »

  1. Another awesome step in FreeStyle’s integration with Blender. Thank you all for your hard work and talent to bring Many blender artists a great new creative tool :-)!!!

    Comment by Blenderificus — June 7, 2010 @ 8:25 PM

  2. The preview looks fantastic! About the universal style module: Would it be fvery complicated to make a python GUI where you could tick common features on and off or whatever would seem appropriate, and then generate a style module. I am proposing to generate python code, which could then be saved and loaded as a normal style module. It would seem reasonable for features, but constants would be hardcoded, so tweaking would require to generate again…

    Comment by yoff — June 7, 2010 @ 11:16 PM

  3. Thanks for your work TK.
    So the Freestyle GUI would exists in the Material panel and in the Render one? I’m thinking out loud: In the Render panel one could enable the Freestyle render and it could work with Render Layers, that would be great. In the materials panel, use the preview window like your picture. Here we could then add modules, choose the color of the strokes (maybe make use of the colorramps), and define the width of the stroke? Two modes, one basic with some presets and an expert one where you could change the python code in the Text Editor is a good idea. I’m very interested in Freestyle, could I help you in the design of the GUI?

    Comment by Bupla — June 8, 2010 @ 2:02 PM

  4. Just wanted to say how pleased it makes me to see the Freestyle branch rocking along so consistently. The up-to-date 2.5 build(s) make it possible for me to use Freestyle whilst continuing to get used to the 2.5 interface. All in all, great work. I have found a project that certainly benefits from the flexibility of Freestyle (over the old Edges option, say), so your efforts are very much appreciated. My thanks to all involved.

    Once I have got something reasonably presentable, I will try to sort out a useful tutorial for other people new to Freestyle. It’s a bit of a challenge to get started at the moment.

    Comment by justposted — June 9, 2010 @ 1:33 PM

  5. Thanks everyone for your comments with a lot of kind words.

    yoff,
    Some other branch users also have the same idea of a style module generator. I think that is nice to include, because generated style modules are useful as a template from which custom style modules are derived.

    Bulpa,
    It was not my intention to give you an idea that the strokes preview window would be within the material buttons. As I mentioned earlier somewhere (in this blog or in the BA Freestyle thread), puttig UI elements in Material to control Freestyle does not seem to make sense for me, because materials work in a per-object basis, while strokes do not in general. Maybe putting color selectors and the preview window into the Render Layers tab in the Render buttons would make more sense. That said, I am open to suggestions and new ideas on GUI designs. Please, feel free to work on your own GUI design (possibly with a GUI mockup). I am more than willing to see yours.

    Comment by The dev team — June 12, 2010 @ 10:40 AM

  6. Hey, TK, I’m really looking forward to seeing how you put a GUI together, even something simple like your 3rd option. It will really help begin to open up the possibilities to artists, who, once they get their “feet wet”, will surely want to dive in deeper. Sounds like a great way to “bridge” this gap! Keep at it!

    Comment by mzungu — June 16, 2010 @ 12:27 PM

  7. Hey!

    I think this renderer is great.. well.. at least pictures I have seen are amazing.
    But could you please make a build for Intel Mac Blender?
    Somehow I could not make it work.. ahhh

    Comment by Karlis — June 17, 2010 @ 5:30 PM

  8. ou.. sorry.. found that you have it already on graphicall.org :)

    Comment by Karlis — June 17, 2010 @ 5:37 PM

  9. mzungu,
    I have been convinced that a user-friendly GUI is an indispensable part of the Freestyle integration into Blender. Since the last blog update, I have been investigating GUI designs of other 3D NPR software packages, which gives me a better appreciation of the importance of a well-designed GUI that makes a large set of stylization parameters tractable. Although I believe Freestyle has a comparable capability with its counterparts, now I think it’s too much to require general users to write style modules in Python to reproduce the effects that the rivals can offer without any programming efforts. I want to make Freestyle’s artisitic capability accessible for everyone. I am going to give the priority to the new GUI design.

    Comment by The dev team — June 17, 2010 @ 6:14 PM

  10. totally awesome!
    the preview is a life saver!

    Comment by Max Puliero — September 2, 2010 @ 1:46 AM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: