Edit - Correction: The near plane clipping problem is not yet fully fixed, but it has improved somewhat - the volume in the example code above is shown correct until the HMD gets close to the volume borders. When very close or in the volume, the clipping plane is quite far away from the eyes (nearly on the opposite side of the volume, but at least not in the wrong direction anymore).
@codeling Thanks a lot for the feedback. I think this is the corresponding VTK issue : https://gitlab.kitware.com/vtk/vtk/-/issues/19123.
There I proposed a fix, but did not open any MR as I thought something cleaner could be done. However, this might be better than the current bug for now if you want to open a MR for it, I’ll be happy to review.
I confirm the camera near plane clipping issue was fixed in VTK!10783. It might also help with the RemoveCuller workaround, I would be curious to see if the “right eye” issue is also fixed by this MR.
Does anybody know whether the merge mentioned above has any chance of making it into the next VTK release (probably 9.3.1, right?)? I tried to check in git but am not sure how to determine this… is there an easy way to determine the commit with which the request was merged? and what is the branch that will turn into version 9.3.1 - probably “release”?
Testing our application with VTK 9.3.1 and vtk master (decd60aaf1f975d9264a9fd05445d60eaee1d6c9), I still noticed culling issues; with 9.3.1, the right eye is still blank; under master, under some circumstances (for some viewing positions), some actors completely disappear - but only from the left eye this time.
The workaround as proposed above, namely renderer->RemoveCuller(renderer->GetCullers()->GetLastItem());, makes things work in both cases!
Haven’t had chance to try and reproduce with a small example program, I doubt I’ll have time in the next weeks, but I’d thought I’d report it here anyway, maybe somebody else has an idea of how to “really” fix it instead of a workaround…?
Thanks @codeling for following up on this. From your previous posts I understood that the MR mentioned above is fixing the need for the RemoveCuller workaround. Now it’s not true anymore? It would be great to try the merge commit (
e6aeaedf) of the MR to double-check and see if a regression was introduced in 9.3.1 and master after that.
Seems that way, yes. Though I don’t remember if back then I extensively tested our application with a VTK version with that MR applied; I just put the workaround in there (as we typically use release versions of VTK, and there wasn’t one yet with the MR applied), with a preprocessor check for more recent VTK versions; so now when I tested with vtk master where the preprocessor check disabled the workaround, it popped up.
If I find the time I’ll do that, thanks for the hint!