OpenChemistry / tomviz

Cross platform, open source application for the processing, visualization, and analysis of 3D tomography data
https://tomviz.org/
BSD 3-Clause "New" or "Revised" License
325 stars 87 forks source link

Exporting a movie issue #2297

Closed IsaacTieu closed 4 months ago

IsaacTieu commented 5 months ago

Describe the bug I was having issues with animations for my tomogram reconstructions. When I run my animations, the reconstruction is orbiting a different origin causing me to only see my background.

This image set has been binned 3 times (Bin Tilt Images x2). I was thinking my new reconstruction was orbiting a different axis for the original image.

I was also wondering if there's a way to crop only a certain part of the image to animate.

The goal of this animation is to eventually export it as a movie

ercius commented 5 months ago

Why do you think that the new reconstruction would orbit a different axis? The camera's orbiting axis is generated when a dataset is loaded, and it might not be regenerated when a reconstruction is finished. Here are some ideas to try: 1) Try saving the reconstruction data to disk and thenreloading it. Right click on the child dataset to access this option. When you reload the data, the camera axis will be set to the current vertical axis in the 3D viewer. 2) You can try deleting the current camera and inserting a new one. In the animation toolbar click the red X next to "camera." Then in the dropdown menu below that (screenshot shows Outline) select "camera" and then press the plus sign. A new camera will be added with the current vertical axis in the viewer as the rotation axis. image

You can also access the camera path by double clicking on the box containing the words "camera - RenderView1" in my screensho above. A new window will pop up. Double click on the word "Path ...". Click on the words "Camera Position" and the path will show up in the RenderViewer. You might have to zoom out to see the path image

If those do not work then can you provide the first PNG? That might help figure out what is going on.

Also, knowing the OS and computer and video card you are using would be really helpful.

I was also wondering if there's a way to crop only a certain part of the image to animate.

The viewer window will be what is exported to the PNG. You need to play with that (zoom and center) to get the camera path to be as you like it in order to get it all right. Alternatively, you can export an animation as series of PNGs (instead of an AVI movie). Then crop all the images equally outside of Tomviz using an image processing program. Then you can encode the images to video using FFMPEG or even do the cropping there as well. This is somewhat involved, but provides a lot of flexibility on the final result.

IsaacTieu commented 4 months ago

Deleting and inserting a new camera worked. Thanks so much!