Camera is incorrect for insitu images
When creating an insitu script in ParaView that generates an image, and using that script insitu, the resulting image has the data extremely zoomed out, and it seems the camera settings are wrong. For example, the image should look like image_good.png, but the result when running insitu is image_bad.png (see images at bottom).
I looked into this a bit, and for this particular dataset, when you load it into ParaView, and immediately get the camera coordinates, the z-position of the camera is always 1000. When you press the reset camera button (), the camera z-position is set to 65.18, though it doesn't look like any camera settings have changed.
So the problem occurs when you load the data, don't change any camera settings, and export the state as an insitu script. Then the camera z-position will be set to 1000. When running insitu, this results in an image that looks extremely zoomed out. If you instead loaded the data, reset the camera (), and then created an insitu script, then the camera z-position is set to 65.18, and the image looks fine.
Here is the data I am using: shapedcharge.tar.gz
To reproduce these effects:
- Load it in ParaView
- Bring up the Python shell (Tools -> Python Shell)
- Type 'GetActiveCamera().GetPosition()', the z-position of the camera should be 1000.
- Press camera reset ()
- Type 'GetActiveCamera().GetPosition()' in the Python Shell again, the z-position of the camera should be 65.18.
This camera problem of the z-position automatically being set to 1000 doesn't happen with every dataset, but I have one other dataset that this happens on.
Another strange thing is that if you have a pvpython script which loads the same data, and sets the camera z-position to be 1000, the image looks fine (image_pvpython.py). But if you have an insitu script with the exact same camera position, the resulting image looks zoomed out (image_insitu.py).
How to fix this? I think the easiest way is to set the camera z-position correctly when this data is initially loaded in ParaView. The camera z-position being 1000 seems like a bug.
I understand there's lots of workarounds for this, like clicking camera reset before exporting a script, but I would like a proper fix.