In my investigations of PV 5.11 I stumbled upon an issue that has been there before, but seems to be getting worse. The shortest description that I can give is that vtkViewNode objects (typically generated by a vtkViewNodeFactory, such as within the raytracing backend) don’t seem to have their visibility/lifetime maintained in a way that corresponds to the visibility of their renderables in a typical render view, especially right at the start of creating a new renderview. This results in for example the 3D widgets of a slice plane not being hidden when I open a new view and enable the ray tracing backend:
- Open any example dataset in a standard renderview
- Attach a slice filter with ‘Show plane’ disabled (click apply)
- Enable raytracing
- Open a new standard renderview (Making the pipeline visible is optional)
- Switch back to the old renderview
Now you can see that a lot of elements of the slice widget are visible again, plus there now appears to be a second set of slice widget elements of a slightly different scale. Turning off ray tracing still shows no widget elements rendered, so in the regular representation everything is still fine.
It seems like this particular issue is related to the vtkPVMetaSliceDataSet, which populates two different vtkPVDisplaySizedImplicitPlaneRepresentation instances, one for the standard cut plane widget, and another for a Hyper Tree Grid Slicer widget. Visibility of the first one seems to be initialized badly on creation of a new view, whereas visibility of the hyper tree cutter seems to never be modified (I guess the controls are hidden?), so the viewnodes remain in memory all the time. Somehow when creating a new render view, they then pop back up in the old one along with the regular 3D cutter widget, but I haven’t been able to pinpoint the exact location of that issue in the PV source.
I’m not using the raytracing backend myself, but the plugin I work on is similarly relying on the scenegraph nodes to correspond with what’s visible in the view (for widgets) / added to the pipeline (for actors). Hopefully this can be investigated further based on the leads above.