from time to time I need 2D vector output from a 3D modell, so I can easily use it for postprocessing and compositing in programmes like Illustrator or Inkscape.
Basically what I need is a clean vector rendering, which I can take apart, edit and recompose in some way. Vector format is also helpful because it is easily scaleable.
There is a library called GL2PS (http://www.geuz.org/gl2ps/), which can capture openGL commands into PS or PDF files.
Essentially it works by wrapping gl2psBeginPage and gl2psEndPage around the normal openGL rendering.
My idea is now that I could do the modelling in Blender, start the game engine, move the camera around, press a key and get a Postscript file.
Do you think it would be possible to integrate this as an option into Gameblender?
I had a look at the source and believe that a possible integration should go somewhere here: blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer ,
but I certainly could not do It myself, since I don’t understand enough of blender source/ opengl/ c programming.
Maybe vector capturing could be enabled and disabled from python with something like GameLogic.Rasterizer.enableCapture(filename=’…’, …)?
today i made some quick hacks and compiled gl2ps into blender.
To my great surprise it actually worked.
I can render shaded SVG versions of our favourite monkey.
For the time beeing, all the parameters are hardcoded into
the source, rather than being accessable from python, but still
i am quite happy with the result.
I hope i can do some further work on this on the weekend or so.