vtkPropPicker in VTK 9.1 is now returning wrong world coordinates.

In my case, “SetPreserveDepthBuffer” is not needed since I catch the z-buffer immediately just before it being cleared by the foreground renderer by hooking the “EndEvent”. It needs to know which screen position is working on, so I invoked an extra rendering and with current mouse position to pick the world position.
For the performance consideration, I believe this extra rendering can be avoided by catching the entire z-buffer, then every screen position is able to be picked, but it should be done along with every rendering invocation since it didn’t know when you need it. Compared to a single extra rendering, it doesn’t seem like a better choice.

1 Like