-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Depending on camera params set, if done in a particular order, could break the camera we pass to VTK-m/Viskores.
Examples: I have a slice along the y-axis. I adjust the camera elevation to be 90, the camera does not automatically adjust the up, so I also set this to be [0,0,1].
Here is what happens to the camera we pass to VTK-m depending on the order we parse the input camera params and apply them to each render's (VTK-m) camera.
Elevation is 90 and not setting up:
Camera: 3D
LookAt: [-5.5,-10,-5.5]
Pos : [-5.5,2.7279224395752,-5.5]
Up : [0,1,0] //UH OH!!!!!
FOV : 60
Clip : [1.27279222011566..127.279220581055]
XyZ : 0 0 1
PM:
1.73205065727234 0 0 0
0 1.73205065727234 0 0
0 0 -1.0202020406723 -2.57129740715027
0 0 -1 0
VM:
-nan -nan -nan nan
-nan -nan -nan nan
0 1 0 -2.7279224395752
0 0 0 1
Elevation is 90 and set up before elevation in parse_camera:
Camera: 3D
LookAt: [-5.5,-10,-5.5]
Pos : [-nan,-nan,-nan]
Up : [0,0,1]
FOV : 60
Clip : [1.27279222011566..127.279220581055]
XyZ : 0 0 1
PM:
1.73205065727234 0 0 0
0 1.73205065727234 0 0
0 0 -1.0202020406723 -2.57129740715027
0 0 -1 0
VM:
-nan -nan -nan nan
-nan -nan -nan nan
-nan -nan -nan nan
0 0 0 1
Elevation is 90 and set up after elevation in parse_camera:
Camera: 3D
LookAt: [-5.5,-10,-5.5]
Pos : [-5.5,2.7279224395752,-5.5]
Up : [0,0,1]
FOV : 60
Clip : [1.27279222011566..127.279220581055]
XyZ : 0 0 1
PM:
1.73205065727234 0 0 0
0 1.73205065727234 0 0
0 0 -1.0202020406723 -2.57129740715027
0 0 -1 0
VM:
-1 0 0 -5.5
0 0 1 5.5
0 1 0 -2.7279224395752
0 0 0 1
ascent/src/libs/ascent/runtimes/flow_filters/ascent_runtime_conduit_to_vtkm_parsing.cpp
Line 93 in d441993
| parse_camera(const conduit::Node camera_node, vtkm::rendering::Camera &camera) |
Fix: parse and add the params that adjust the position of the camera before the params that are based off of position.