Generating a 3D animation with cutting planes and rotations


I’m looking into the best tool to create 3D animations with rotations and cutting planes.

I’ve looked into Sciview in the past and have recently been playing with Napari. A google search for ‘Napari non-orthogonal slice’ or ‘Napari cutting plane’ leads to some github issues, some of which have been resolved, but it doesn’t seem arbitrary cutting planes are implemented yet. Is that correct?? Is there anything bleeding edge on a non-merged branch I could look at?? How hard would it be to implement this if I’m willing to dive into the code?

I’m also interested to hear people’s experience with other tools (SciView/Big Volume VIewer etc.) that have support for non-orthogonal slices/cutting planes.



1 Like

Hey Brian @bnorthan,

did you consider 3D Script?



Hi Brian, as for napari, you’re correct: arbitrary cutting planes aren’t implemented yet. (Though we’d love to have you dive into the code! :smile:)

It’s always been something everyone wants to see implemented, so there’s definitely motivation. I’m not sure how other devs (@sofroniewn, @jni) feel about it, but I think it will not be trivial.

There are kinda two different approaches/applications here:

  1. Simply restricting the rendering of a 3D volume to an arbitrary plane/slab. In this case, the entire 3D volume might be loaded into texture memory on the GPU, and we’re just cherry picking what gets rendered on screen. This probably wouldn’t be too terribly hard to get done with a little bit of digging into the shader code in the volume visual… but it’s probably not a super-quick job either.
  2. Actually restricting what gets read from disk (ala big data viewer, using some sort of chunked pyramidal data store). This would be awesome & obviously more scalable, though the realtime rendering would likely take a hit, and it might require data transformation first. This would require some deeper surgery to the way that the layer._data_view is extracted from the nD layer data.

Hi @bnorthan i’ve played with a little bit of the “approach 2” that @talley described in some scratch places (not even a branch yet!) but I can see how we would implement it and could happily team up to bring you up to speed if you want to work on it. The main issue is that it might be quite slow.

“Approach 1” might be much better [EDIT: for small data], but I’d need to give more thought on how everything gets glued together.

Finally, both of these current approaches would be limited to non-multiscale data (i.e. the individual volumes couldn’t be huge) as we don’t have any support for multiscale 3D rendering yet, though we’d like that to come at some point. Once that does come it might supplant whatever we implemented here. [EDIT: maybe only the first approach would be limited and would could make the second one work in a limited way]

We’re also still planning to make some improvements to our animation support over the coming months too.

Curious how this sounds to you @bnorthan and if you’re interested in pursuing more. If so I’m game to help!


I think this might actually be implemented in a way that would also be useful for napari/napari#1774. basically: we need to figure out how to restrict nearpos and farpos in the shader code such that it wasn’t projecting a ray through the full volume, but rather through a very small restricted slab around the camera center (“focal”) plane. Then, we’d expose a way for the camera center point to be easily moved (which might be easier if we use a FlyCamera instead of an ArcballCamera)


I’ve used Paraview for stuff like this in the past, it’s quite powerful.



Upps, I hadn’t seen this thread. @bnorthan please note that there is a world of difference in Sciview since the Moscow hackathon.

The BDV slicing planes aren’t finalized yet, but if you need something quick there is the ImagePlaneDemo. Our person power on sciview has more than doubled now, so BDV slicing should come to the top of the queue soon.

Note that we do have direct coupling between BDV and volumes in sciview for time points, so the slicing is right around the corner.


I need this kind of function for a very long time. Be able to import a set of µ-CT jpg/tiff images, do a 3D rendering, change CLUT, segmentation, etc., then, 3D animation with cutting planes and free rotations. If this can be provided for ImageJ/Fiji, it will be a god-sent.
Hoping to see this soon.

1 Like

Hi @DinoDragon

I am still in the process of trying out all the suggestions in this thread. The 3DScript plugin that @haesleinhuepf suggested is fairly easy to use. I would suggest giving it a try. It supports cropping planes and rotations via a GUI and also simple script language. I don’t think it has iso-surfaces, advanced LUTs or textures so I am still also looking at the other solutions suggested.



Hi @kephale

It looks like the ‘add volume’ for raw image data and iso surface are working much better now. I played with both and was able to generate some nice views. Is there a good place to find documentation especially on how to use the interactive console?

I also noticed that the demos (and most other menu items) are commands. I assume any command with the “SciView” as the menuroot would get added to the sciview menu. Is that true?