It’s quite a mystery how to build VTK python with OSPRay. I couldn’t find proper information for building it (in my case on Ubuntu LTS 20).
I first tried to clone VTK release branch and compile it with OSPRay. The compilation worked but it didn’t find/use ospray so I suppose that it’s only supported in later VTK versions (correct me if I’m wrong). I found that some work was done to support OSPRay 2 nine months ago and that was merged in master branch.
So I cloned a recent nightly-master (6000c2d7, because the latest one doesn’t compile) and I downloaded the latest compiled OSPRay 2.5 on Intel website. Then in vtk_build folder, I added with ccmake the options
After the config was done, I ran make and it all compiled, I saw some info that OSPRay was found and used:
83% Generating Python wrapper sources for vtkOSPRayVolumeInterface 84% Building CXX object CMakeFiles/vtkRenderingVolumePython.dir/CmakeFiles/vtkRenderingVolumePython/vtkOSPRayVolumeInterfacePython.cxx.o
The rest of the compilation ended but no mention of vtkOSPRayPass.
So obviously, when I try:
ospray = vtk.vtkOSPRayPass() plot.renderer.SetPass(ospray)
I get an error
AttributeError: module 'vtkmodules.all' has no attribute 'vtkOSPRayPass'
Any pointer as to how to have OSPRay in VTK Python is really welcome.