Freestyle integration into Blender

August 23, 2008

A few remarks

Filed under: Update — The dev team @ 9:27 AM

After meeting Ton at SIGGRAPH, elements of further development seem clearer:

  • due to Freestyle’s internal geometric data format and the calculations based on it, there is no easy solution for using Freestyle on strands. I’ll have to study more into detail if a conversion to triangles is possible.
  • strokes will be rendered by Blender’s internal renderer in separate layers, with one style module per Freestyle layer.  Hopefully, this limitation will be eased when the node-based system is in place.
  • a lot of user feedback needs to be gathered about how to ease using and tweaking style modules. Either a front-end to important style modules could be built (therefore having the corresponding parameters configurable in a Blender panel), or style modules could be gathered on a web site and tested on simple scenes (similarly to http://www.blender-materials.org), made by more “technical” Blender users.

Usability is no doubt a big challenge to make Freestyle accessible to a larger array of users. I would therefore appreciate receiving more feedback on how to improve the current model and propositions.

I am also looking for someone to create a Windows build of my branch. I am wishing to collaborate closely with that person to get it working for all of the Blender users who have requested a Windows version of my GSoC work. I received some code patches during the summer from a couple of you but I am not sure I can use them with my last revision. I wish to incorporate them now. The summer program being over, I think it is important to make sure this type of integration is done to allow a bigger pool of users to test the code. While I am it, I am open to resolving any bug you might encounter using my branch.

Going back to school and settling to a new place these next few days, I cannot work on these issues right away. I should be able to start working on the project again later next week.

Advertisements

August 8, 2008

lib3ds removed

Filed under: Notes, Update — The dev team @ 9:23 AM

As of today, the integration is technically achieved: Freestyle runs natively in Blender without the use of any of its former libraries (Qt, SWIG, lib3ds). There are still remnants of libQGLViewer in the code, but they can considered part of Freestyle. This is great news as you should now be able to compile and test my branch on about every platform that Blender runs on. One thing to note is that only vlak-based shapes are supported. That means that strands or halos cannot be rendered by Freestyle yet (sorry, no BBB rendering this month…). I’ll see with Ton how to support these shape types.

Because I am going to SIGGRAPH tomorrow for a whole week and the Google Summer of Code ends on August 18, this is all that I would have been able to produce this summer. Looking back, I greatly underestimated the amount of work needed to replace SWIG. Removing SWIG and lib3ds took me about 5 weeks altogether, while I had only planned for 2-3 weeks. I also wasted two weeks trying to make renderbuffers work within Blender, which wouldn’t have been useful for the project anyway (strokes are to be rendered by Blender’s internal engine eventually).

I am proud of how far the project has gone but I am not totally satisfied. A lot more needs to be done:

  • a good amount of code needs to be refactored.
  • the last remaining style modules have to be supported.
  • Stéphane’s corrections have to be incorporated.
  • it would great to support a list of style modules, rather than just one.
  • the background paper texture should be removed eventually.
  • removing the need for an environment variable would be appreciated by non-technical users.

I’ll start making these changes today and I’ll continue again starting on August 18. Once I have strokes rendered by the Blender’s internal engine, I’ll continue implementing the original project proposal’s features, which will allow Freestyle to be manipulated and tweaked directly in the compositor via Python nodes.

Finally, due to requests, I have opened up comments on the blog. I won’t be able to monitor it much for a week so I hope it won’t get bogged down by spam…

August 2, 2008

Towards stabilization

Filed under: Other, Update — The dev team @ 8:49 AM

The past two days have been important in stabilizing the SWIG replacement. I have had to face many issues while testing. Style modules with Python shaders would not “hold” the stroke attributes and some valid modules would not show up at all. By carefully studying which data structures needed to be given by reference rather than value and by making sure that the most important methods were available from the Python interpreter, I was able to correct most problems. Here is an example of a tractor model rendered using the latest revision (the style modules are respectively thickness_fof_depth_discontinuity.py, split_at_highest_2d_curvatures.py and cartoon.py):

I tested all of the original style modules tonight, comparing the results produced by Blender with the one created by the native Freestyle application:

Style module Status
anisotropic_diffusion.py WORKS
apriori_and_causal_density.py NOTHING: steerable ViewMap level doesn’t exist
apriori_density.py NOTHING: steerable ViewMap level doesn’t exist
backbone_stretcher.py WORKS
blueprint_circles.py INCOMPLETE: wrong shape (incorrect getPoint support ?)
blueprint_ellipses.py INCOMPLETE: wrong shape (incorrect getPoint support ?)
blueprint_squares.py INCOMPLETE: wrong shape (incorrect getPoint support ?)
cartoon.py WORKS
contour.py WORKS
curvature2d.py WORKS
external_contour.py WORKS
external_contour_sketchy.py NOTHING: GetTimeStampCF is not implemented
external_contour_smooth.py WORKS
haloing.py NOTHING: TypeError: an integer is required
ignore_small_occlusions.py WORKS
invisible_lines.py WORKS
japanese_bigbrush.py WORKS
long_anisotropically_dense.py NOTHING: TypeError: an integer is required
multiple_parameterization.py NOTHING: getFEdge(i1, i2) is not implemented
nature.py WORKS
near_lines.py WORKS
occluded_by_specific_object.py NOTHING: can’t select object with id
polygonalize.py WORKS
qi0.py WORKS
qi0_not_external_contour.py WORKS
qi1.py WORKS
qi2.py WORKS
sequentialsplit_sketchy.py INCOMPLETE ? stroke issue
sketchy_multiple_parameterization.py NOTHING: GetTimeStampCF is not implemented
sketchy_topology_broken.py NOTHING: GetTimeStampCF is not implemented
sketchy_topology_preserved.py NOTHING: GetTimeStampCF is not implemented
split_at_highest_2d_curvatures.py INCOMPLETE ? color/stroke issue
split_at_tvertices.py INCOMPLETE ? color/stroke issue
stroke_texture.py WORKS
suggestive.py NOTHING: no warning either
thickness_fof_depth_discontinuity.py WORKS
tipremover.py WORKS
tvertex_remover.py WORKS
uniformpruning_zsort.py WORKS

I consider the system stable enough to work on replacing lib3ds now. Hopefully, the job won’t be as tricky as getting SWIG out was. I’ll keep you all updated on that progress soon.

Create a free website or blog at WordPress.com.