[Bf-committers] blender 2.5 render api

Brecht Van Lommel brecht at blender.org
Fri Jul 24 16:06:25 CEST 2009


Hi,

During Blender 2.5 development, we've been keeping external render
engines in mind, and recently I added a simple mechanism to plug in
render engines into the pipeline. Here's the status regarding the render
api in 2.5.


Given that 2.5 is still heavily work in progress, important things are
missing still, the python api is quite small, nearly all data is
accessible, but the functions to manipulate it are sparse. Also
impossible still is to do opengl drawing or create ID properties.

What is possible however is to plug right into the rendering process and
write out pixels to all layers and passes, and print status text while
rendering. Also possible is to create own "RNA" properties on ID blocks
(boolean, int, float, string for now, enum, pointer and collection will
follow). These properties then become directly accessible in the python,
api docs, animation system, and outliner, i.e. they behave just like
real blender properties.

Further it is possible to create own panels with these properties, to
replace existing ones specific to Blender.

This is all done through python, however the RNA system will also allow
access from c++ to exactly the same functions and properties, but
faster. The RNA c++ support is still incomplete at this point, but it is
not that much work to get it further. I don't know if python performance
is a bottleneck currently, but I guess at some point python optimization
tricks are no longer sufficient.


I know render exporter writers have invested much time and effort in
getting them working well in 2.4x, and getting it working again in 2.5x
will be a big task, however it will also allow much better integration
that does not feel like a foreign system due to the limited extension
capabilities. So I don't expect everyone to jump on this immediately,
but if you don't mind some things being missing and rough around the
edges, we could use feedback.

Further, here are two example render engine scripts:
http://www.pasteall.org/6635/python
http://www.pasteall.org/6671/python

And the API documentation (a few weeks outdated at the time of writing):
http://www.graphicall.org/ftp/ideasman42/html/class-tree.html


If anyone working on external render engines is at SIGGRAPH, we can
discuss things there.

Brecht.




More information about the Bf-committers mailing list