Combining ofxVolumetrics and ofxSlitScan

Hi all,

I’m trying to combine two addons - ofxVolumetrics and ofxSlitScan - to render a sequence of buffered frames (from the slit scan addon) as a 3D volume (using volumetric rendering). Since the frames from the slit scan are always changing, I’m currently updating a 3D texture every frame, which is super slow, as you can imagine. I’ve seen some very similar experiments online and was wondering if there was a better way to accomplish this effect?

For reference, here’s something similar to what I’m after (from the creator of the volumetrics addon!): https://vimeo.com/14532759

reply
Hi, I created ofxVolumetrics, I’m glad to see you using it!

I’m not quite sure how you are using ofxSlitScan, or what your volume looks like, but I can give you some pointers on updating the volume efficiently.

Normally, the effect of the volume moving or changing constantly would require updating the entire volume every frame.
However, to create the video you linked to, as well as this and this, I am only updating one slice of the volume every frame, and the rest of the data is just sliding around. This is achieved by setting a zOffset when rendering the volume, which basically moves the volume’s texture around in the z plane, so it appears as though the entire volume is moving, even though only one slice is updated per frame.

I hope that helps, but if you have any other questions feel free to ask away!