From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

GSoC 2008 - Week 7 report

This week

The first part of my week, I tried to make FBO-based offscreen rendering work in Blender's pipeline, both rendering to a renderbuffer or to a texture. I was able make rendering to texture work under a custom GLUT sample program, but when I transpose the same code in Blender, it somehow produces garbage (http://maximecurioni.com/gsoc2008/wp-content/uploads/2008/07/2008_07_08_render_error_2.png) and even corrupts the current back buffer. I have tried many different tutorials and I have tweaked with about every little detail, from the order the commands are sent to the different buffer internal formats. I am supposing that this is caused by GHOST. Having wasted enough time on it, I have decided to stop trying to implement this temporary feature: as strokes will eventually be rasterized without OpenGL, this is not a long term handicap.


I also worked on removing the SWIG dependency from the project. I studied the Python/C API in more detail and I learned how SWIG does most of its magic internally. I now understand how to incorporate the Freestyle Python API at the lower level. These past two days, I have worked on redefining the Freestyle API to make it easy to use: from about 150 original classes that I would have needed to port, I only have about 30 to implement using the Python/C API; I'll implement the rest directly in Python (SWIG also works this way). These 30 classes represent the bare essentials to link up the Python environment with the internal view map data structures. The API will reuse Blender's current submodules (for example utilizing Mathutils.Vector to represent Vec2f, Vec3f, Vec3d structures....). Iterators will be removed to have list-based traversal and all unnecessary class casting functions will be removed.


Next week

It's hard to estimate how long it is going to take to replace SWIG totally. I have implemented 5 classes today and I'll continue this week-end. Once this is done, even though I was supposed to work on removing lib3ds next, I want to concentrate my efforts on the OpenGL layer replacement. This is a major priority for the success of the project.


Issues

The main issue I faced was using render buffers under GHOST. I haven't been able to get it working.


Schedule

I am a week behind schedule. Frankly, I wasted a lot of time trying to make render buffers work. Looking back, that was not worth it at all. Jean-Luc and I are going to rework the project schedule this week-end. The last part of the project (providing visual tools to control the view map) may be affected.