VTK volumetric rendering issue upgrading from MESA 20 to 21
When I build a complicated scene with volumetric rendering plus surfaces plus glyphs (as VTK calls them) on Ubuntu 18.04, which has
OpenGL 3.3 (Core Profile) Mesa 20.0.8 via llvmpipe (LLVM 10.0.0, 256 bits)
on CircleCI, I get a correct rendering. But on Ubuntu 20.04, which has
OpenGL 4.5 (Core Profile) Mesa 21.2.6 via llvmpipe (LLVM 12.0.0, 256 bits)
I get on CircleCI an incorrect rendering (ignore the bottom quarter, that's matplotlib
-- the top brain is VTK+Mesa):
Mesa 20.0.8 (Ubuntu 18.04) | Mesa 21.2.6 (Ubuntu 20.04) |
---|---|
I have tried setting MESA_GL_VERSION_OVERRIDE=3.3
on the Mesa 21 / Ubuntu 20.04 build, and forcing it to use vtkFixedPointRayCastMapper
(rather than vtkSmartVolumeMapper
variant, which might have decided to use vtkGPUVolumeRayCastMapper
under the hood with Mesa 21) but neither made any difference. Both 20.04 and 18.04 make use of the same Python 3.8 VTK 9.1 wheel.
My plan to continue diagnosis is:
- Create a minimal example that uses just Python3.8+VTK to reproduce
-
git clone
Mesa locally, get it built+installed, reproduce withxvfb-run
, and then bisect (including one with the latestmain
to make sure it's not fixed there)
But I'm happy for other advice, or to hear about other potential workarounds (if any) here!