[Bf-python] low level C access to RenderLayer's or RenderPass' rect?
Bram de Greve
bram.degreve at bramz.net
Mon May 16 19:58:04 CEST 2011
Hi all, I'm new to this list.
I'm writing a small renderer LiAR http://liar.bramz.net/ as an C++
extension module for Python (nothing fancy, it's just for an exercise
for my own pleasure). So, naturally, I'm also seeking to integrate my
renderer into Blender 2.5. I must say, Blender 2.5 looks very good from
an integrator point of view.
So far, I got my "exporter" up and running again, but I would like to
render the results in Blenders window. Here I'm running into
performance issues. I'm getting back individual samples from an
external process over a socket (perhaps from multiple renderers), and I
would like to aggregate them within the Blender process. However,
receiving these samples from a socket and adding them to the RenderLayer
seems too intensive to do in pure Python. So, here I'm thinking of
running some C extension module to do the hard work. Although I can get
a C pointer to the RenderLayer or RenderPass, there seems to be no way
to get a C pointer to the actual rect buffer inside however.
In this light, I got some questions that I hope some on this list may be
able to answer:
1. Am I on a reasonable track, or should I make a 180 and take a
completely different approach to get my renders in Blender?
2. Can I get to that buffer? or picking in on the Render API
improvements, is this something that might be possible in a future version?
3. Or, picking in on the Cython thread (which btw, I haven't used
before!), would I be able to make my addon using Cython? I'm interested
in what Cython can do here ...
Thanks in advance,
Bram
More information about the Bf-python
mailing list