Will it be possible to call Krakatoa to render from a script? I’m looking for some way to leverage Krakatoa’s excellent sorting and rasterizing speed to convert PRT’s to structured data. At the simplest level, we would have a script ask Krakatoa to sort the particles and render them out to files based on the sorting order, which is nearly what it does now.
We would use the script to render a depth-sorted slice of particles to files with a user-defined number of slices and clear the buffer between slices so that we don’t get the “painters algorithm”. Voila! A voxel array!
In general, it is possible to call Krakatoa from a script (in fact, both Partitioning and Deadline Partitioning use MXS calls to Krakatoa ).
At this point, there is just no way to get the sorting included into the file, but I assume that would be relatively easy to implement in a future point release. Right now, all particles are read and dumped to disk without even keeping them in memory. Thus, it is possible to dump large amounts of particles to disk even with very limited memory since Krakatoa does not need much memory to do the saving and leaves all the memory to PFlow or whatever is making the particles.
What you propose would require a different saving mode where the particles would be loaded like for rendering, sorted relatively to the camera and then dumped to disk in sorted order.
I am sure this is doable, just not for 1.0 (we are in full bug squashing mode now)
We’re in the process of experimenting with ways to move more of the high level control of some of our applications into scripting languages. With the right exposure to script, this kind of approach in Krakatoa could allow you to accomplish what you’re requesting.