Asbjørn
2013-01-31 22:36:16 UTC
Hi,
in LuxBlend25 we're returning combined rgba + z (depth) data as follows:
result = self.begin_result(0, 0, xres, yres)
lay = result.layers[0]
lay.rect, lay.passes[0].rect = combinedResults()
self.end_result(result)
where combinedResults() returns a tuple of two lists, the first a list
of rgba values, each rgba value also stored as a list), and the second a
list of floats. This function is implemented in a binary module.
This method is very slow. It seems the overhead of converting the
internal data to lists is quite high. Returning an iterator for the
outer list of rgba pixels did not improve the situation noticeably.
Are there better (API) ways of doing this directly, that is, without
loading files from disk?
Cheers
- Asbj?rn
in LuxBlend25 we're returning combined rgba + z (depth) data as follows:
result = self.begin_result(0, 0, xres, yres)
lay = result.layers[0]
lay.rect, lay.passes[0].rect = combinedResults()
self.end_result(result)
where combinedResults() returns a tuple of two lists, the first a list
of rgba values, each rgba value also stored as a list), and the second a
list of floats. This function is implemented in a binary module.
This method is very slow. It seems the overhead of converting the
internal data to lists is quite high. Returning an iterator for the
outer list of rgba pixels did not improve the situation noticeably.
Are there better (API) ways of doing this directly, that is, without
loading files from disk?
Cheers
- Asbj?rn