Freestyle integration into Blender

July 14, 2008

Midterm report

Filed under: Update — The dev team @ 12:38 AM

I uploaded my GSoC midterm report on the Blender wiki. It is nothing really new, just a summary of the areas that are complete, those that still need to be worked on and what challenges the project is facing.

On the SWIG replacement front, I will explain how it’s working when I am done with it. I do not want to dilute my efforts into documentation while there are still essential features that need to be implemented. I’ll also have the last two weeks of August to focus on documentation.


  1. A quick note concerning the OpenGL-free rendering discussed in the report: the solution where Blender ray tracer is used to rasterize the strokes is conditional to how user-customizable this ray tracer is. For instance, because of the particular nature of strokes (eg they live in image space) we can’t just use the regular light sources of the scene to define their shading. Also, it would be nice to support blending modes similar to OpenGL to simulate the different types of media (dry, wet, …). So, in theory, we can use a ray tracer to do the job but we have to keep in mind the specificity of our geometry.

    Comment by stephane — July 15, 2008 @ 12:23 AM

  2. Thank you for your insight, Stéphane. I am not sure it is possible to enable/disable a lamp for a particular primitive in the internal render. That’s something that I will have to ask Ton and Brecht, who are the maintainers of the rendering code.

    Maybe a quick solution would be to overlay two render results:
    – the first representing the original scene
    – the second representing the “Freestyle” scene made up of strips converted to renderer-level triangles and a (directional ?) lamp placed properly behind the camera.

    I have come across code in Blender that supports blending in the ImBuf module (which is Blender’s internal image module, used for IO and operations on images. I wonder if the candidate function we are looking for is IMB_rectblend, at source/blender/imbuf/intern/rectop.c:316) with different types of blending mode (an enum type IMB_BlendMode is available with the following choices: IMB_BLEND_MIX, IMB_BLEND_ADD, IMB_BLEND_SUB, IMB_BLEND_MUL, IMB_BLEND_LIGHTEN, IMB_BLEND_DARKEN, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_ADD_ALPHA, IMB_BLEND_COPY, IMB_BLEND_COPY_RGB, IMB_BLEND_COPY_ALPHA).

    I’ll give you some feedback on the blog as soon I know.

    Comment by maxime — July 15, 2008 @ 5:55 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: Logo

You are commenting using your 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

Create a free website or blog at

%d bloggers like this: