I’m experiencing a bug where the camera angle is resetting to a default value inbetween object modifications (I’m taking a slice), and image rendering. has anyone experienced a similar issue/ has a fix?
Please share ParaView version, OS and steps to reproduce the issue.
I am using Paraview version 5.10.0, the OS details can be seen below:
$ cat /etc/os-release
NAME=“Red Hat Enterprise Linux”
VERSION=“8.10 (Ootpa)”
ID=“rhel”
ID_LIKE=“fedora”
VERSION_ID=“8.10”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“Red Hat Enterprise Linux 8.10 (Ootpa)”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:redhat:enterprise_linux:8::baseos”
HOME_URL=https://www.redhat.com/
DOCUMENTATION_URL=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8
BUG_REPORT_URL=https://bugzilla.redhat.com/
REDHAT_BUGZILLA_PRODUCT=“Red Hat Enterprise Linux 8”
REDHAT_BUGZILLA_PRODUCT_VERSION=8.10
REDHAT_SUPPORT_PRODUCT=“Red Hat Enterprise Linux”
REDHAT_SUPPORT_PRODUCT_VERSION=“8.10”
A brief summary of the steps i took can be seen below:
- Before any operations are applied to objects i first set a plane as “vertical” for the camera using camera.SetViewUp() and passing it the required parameters for X,Y and Z.
- I am then applying certain functions/ filters to Objects (taking a slice, changing the colour ect.), and rendering the object to the output window using Render(render_view) followed by render_view.Update().
- Once all operations/functions have been applied to an object the camera angle and position is set based on the object’s location. A snippet of the code can be seen below:
-
`camera_position = [ view.position.x + center_x, view.position.y + center_y, view.position.z + center_z ] render_view.CameraPosition = camera_position render_view.CameraFocalPoint = [center_x, center_y, center_z] render_view.CameraViewAngle = view.fov.horizontal render_view.CameraParallelProjection = True render_view.CameraParallelScale = diagonal * distance_factor / 2 render_view.OrientationAxesVisibility = True `
- Render(render_view) and render_view.Update() are then called again to render the final view and it is saved to a png.
I am unsure why but the camera seems to be reset to a default value after the angle and position has been set. Based on printing values to the terminal the camera should be in the right position but each output image shows the same camera angle no matter what I set it to. I’m aware that Render can reset the camera but I was under the impression that this can only occur the first time it is called, please correct me if I’m wrong. Should I be using a different function for rendering or is the error due to something else?
Is this a pvpython only issue ?
Please update to the last release of ParaView, 5.13.1