Freestyle integration into Blender

September 29, 2008

No more environment variable

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

As of today, Freestyle runs without having to set the FREESTYLE_BLENDER_DIR environment variable: style modules and data files are now stored in the standard .blender/scripts/freestyle directory. This should allow all of you to compile and use the branch for your own tests.

I also generalized the glBlendEquation function verification to all platforms, not just for the Win32 build. Depending on your card and driver, glBlendEquation might not be supported or might only be accessible through glBlendEquationEXT.

I hope that these changes will make the program more robust and will allow a greater amount of people to use Freestyle. Let me know if you are experiencing problems with the latest revision. I am (finally…) moving on to an essential addition: strokes are going to be rendered by Blender’s internal engine (rather than by OpenGL).

13 Comments »

  1. Thanks for the work making it easier to self-compile builds :-). thanks again for the glBlendEquation work. And of course… I’m really looking forward to Blender’s internal renderer integration with freestyle… of to have freestyle on its own render layer… sooo great.

    Thanks Maxime

    Comment by 3D — September 29, 2008 @ 9:31 PM

  2. Thanks again for your awesome work :D

    Comment by JeanR — September 29, 2008 @ 10:03 PM

  3. Good news again, thanks Maxime!

    Comment by yorik — September 30, 2008 @ 2:12 PM

  4. Hi thanks for the update, I built from svn last night, replaced my .blender folders with those from the svn build and every time I try to render with freestyle, blender crashes outright when it gets to finally displaying the finished render, it does all the computation, then i see the white render window, then crash. Linux Hardy Heron 32bit.

    Comment by yellow — October 1, 2008 @ 8:25 AM

  5. yellow,
    Could you send me your log by email ? I’ll try to work with you to resolve the problem.
    Thanks.

    Comment by maxime — October 1, 2008 @ 1:35 PM

  6. Maxime

    Thank you, I didn’t have much time to test the svn build last night but everything I threw at it crashed blender which prompted me to post previously, the crashes are occurring with imported 3D DXF meshes. The console says:

    Compiled with Python version 2.5.2.
    Checking for installed Python… got it!
    GLEW initialized: using glBlendEquation
    Shape loading
    Scene loaded

    Mesh cleaning : 0.010000
    Epsilon computed : 0
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Warning: degenerated triangle detected, correcting
    Segmentation fault

    And then crash.

    With previously tested models, some free 3DS robot models from turbosquid, no crashing occured as before but still only getting blank white renders with the default contour.py and this in the console:

    Compiled with Python version 2.5.2.
    Checking for installed Python… got it!
    GLEW initialized: using glBlendEquation
    Shape loading
    Scene loaded

    Mesh cleaning : 0.040000
    Epsilon computed : 1.37012e-08
    WEdge building : 0.060000
    Grid building : 0.040000
    Cells nb : [20, 20, 29]
    Cell size : [0.506523, 0.514668, 0.525111]
    Origin : [-4.38751, -4.98417, -0.954404]
    Occluders nb : 10760
    Triangles nb : 10760
    Bounding Box : 19.0796
    Module: /home/yellow/.blender/scripts/freestyle/style_modules/contour.py
    Feature lines : 0.280000
    ViewMap edge count : 2235
    ViewMap building : 0.160000
    Adding Python path: /home/yellow/.blender/scripts/freestyle/style_modules
    Warning: strip vertex 0 non valid
    Warning: strip vertex 0 non valid
    Warning: strip vertex 0 non valid
    Warning: strip vertex 0 non valid

    Lots of the warning message above, then:

    Strokes drawing : 0.07

    And blank renders.

    I understand using random imported models is not perhaps ‘fair’ at this point in development but..

    Hope that’s of use.

    Comment by yellow — October 1, 2008 @ 9:16 PM

  7. Hello Yellow,
    Based on your log, I am wondering if you are setting the camera properly: you will definitely get an empty render if your scene is empty. Double check that the render layer in question has access to the model at hand.

    Since the removal of lib3ds, Freestyle is format-agnostic: it uses Blender’s “native” geometrical data structures to import the meshes into its pipeline. A priori, you shouldn’t be facing any issue with imported models.

    Could you send me your test .blend files ? That will help me determine whether the problem is due to your configuration or to Freestyle intrinsically. Thanks.

    Comment by maxime — October 1, 2008 @ 9:59 PM

  8. Maxime

    Thanks, In the process of trying to solve the problem myself I had checked that I had enabled the freestyle render pass option and that the correct layers were activated, but isn’t that the default anyway, when you add to a layer and it’s visible in the 3D view, that the layer is also on in the render settings? Anyway i’ll send the .blends.

    I have been getting one other error and that is if I set the render resolution to HD, 1920×1080 I get the render window rendered within the render window, a render showing blank white with the black header of statistics on it at the top.

    I did manage to get some renders out last night, from sketchup imported models, but any of the projects that I have on the go which are complex, crash blender or give only a white screen.

    Imported Max projects crash blender outright for example.

    Anyway better to send .blends I know. :-)

    Thanks

    Comment by yellow — October 2, 2008 @ 8:37 AM

  9. Finally got to sending the blends to you with some notes. :-)

    Comment by yellow — October 6, 2008 @ 9:28 PM

  10. Spurred on by finding a way to get renders out of freestyle. I’ve tried a bigger blend derived from a sketchup model. Rendering crashes blender with the following error.

    After a long list of the Warning: edge….. errors the last few lines in the console are:

    Warning: edge 0 – 1 appears twice, correcting
    Warning: edge 7 – 6 appears twice, correcting
    Warning: edge 5 – 7 appears twice, correcting
    WEdge building : 0.080000
    Grid building : 0.030000
    Cells nb : [133, 126, 1]
    Cell size : [18.4327, 18.388, 15.3328]
    Origin : [-990.527, -1127.01, -0.766642]
    Occluders nb : 13903
    Triangles nb : 13903
    Bounding Box : 3066.52
    Module: /home/yellow/.blender/scripts/freestyle/style_modules/sequentialsplit_sketchy.py
    Feature lines : 0.060000
    Warning: point is out of the grid for fedge [3, 351]
    blender: source/blender/freestyle/intern/geometry/FastGrid.cpp:48: virtual Cell* FastGrid::getCell(const Geometry::Vec3u&): Assertion `(_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0])<_cells_size’ failed.
    Aborted

    Comment by yellow — October 6, 2008 @ 10:04 PM

  11. And this crash with another blend:

    Warning: edge 14 – 11 appears twice, correcting
    Warning: edge 13 – 14 appears twice, correcting
    Warning: edge 17 – 11 appears twice, correcting
    WEdge building : 0.080000
    Grid building : 0.030000
    Cells nb : [63, 63, 4]
    Cell size : [2.54658, 2.54658, 2.25481]
    Origin : [-80.9757, -107.266, -0.450966]
    Occluders nb : 13944
    Triangles nb : 13948
    Bounding Box : 206.425
    Module: /home/yellow/.blender/scripts/freestyle/style_modules/contour.py
    Feature lines : 0.220000
    Warning: intersection out of range for edge [2041, 0] – [2042, 0]
    Warning: intersection out of range for edge [2996, 0] – [2997, 0]
    Warning: intersection out of range for edge [2997, 0] – [2998, 0]
    Warning: point is out of the grid for fedge [100, 7]
    blender: source/blender/freestyle/intern/geometry/FastGrid.cpp:50: virtual Cell* FastGrid::getCell(const Geometry::Vec3u&): Assertion `p[1]<_cells_nb[1]’ failed.
    Aborted

    Comment by yellow — October 6, 2008 @ 10:11 PM

  12. any new developments coming soon? The blenderartists are so very anxious. :-) thank you greatly

    Comment by 3D — October 21, 2008 @ 10:38 AM

  13. Same as 3D comment, hope you’re fine too.

    Comment by JeanR — October 29, 2008 @ 12:41 PM


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: