Problem in building Paraview with Ospray

Before I build a Paraview with Ospray, I has successed in building a version without ospray follow the instructions in this webpage: https://github.com/Kitware/ParaView/blob/master/Documentation/dev/build.md.
But when I add -DPARAVIEW_ENABLE_RAYTRACING=ON into the cmake parameters I got the errors as follow:

And then I download Ospray1.8.2 from its github. I cmake again and add -DCMAKE_PREFIX_PATH=/home/jerry/pv/ospray1.8.2 into the cmake parameters. Though configuring done successed this time, some warnings occured like as follow:
(the full warnings are too long, over 300 lines)


I still typed make to compile it. Some time later, I got “the new Paraview with Ospray”. Actually I doubt if ospray has successed embed in this version. Then I had a test.


Though the Enable Ray Tracing box can be checked, the Material can’t be choosed.
Can you tell me why I got these problems and what should I do to build a paraview with ospray??

Would the superbuild be an option for you?

https://gitlab.kitware.com/paraview/paraview-superbuild/

You can then pass cmake flags to build dependencies (like ospray) before building paraview.

What you did was correct. And it appears that you do have OSPRay in your build. One way to verify is to change from Surface to Wireframe representation and toggle Enable Ray Tracing. The ray tracers draw lines as cylinders so the appearance is noticeably different when you zoom in.

You do not have any Materials to choose from because a ParaView build by itself does not include any. The superbuild path that @nate_develder recommends does and it puts them in a location that the ParaView executable looks for by default.

The superbuild’s 8 sample materials come from here: https://gitlab.kitware.com/paraview/materials
download those some where on your machine and use File -> Load Path Tracer Materials…" (Load OSPRay Materials in older versions) to make them available in your build. @Marston’s more comprehensive set of materials can be found here:
Large OSPRay Material Database

Thank you Nate! I’m trying in this way now.

Thank you Dave! Your reply is really helpful! I’ve solve the problem follow your reply.