# Problem in building Paraview with Ospray

**URL:** https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922
**Category:** ParaView Support
**Tags:** vtk
**Created:** [July 22, 2020, 12:30pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922 "2020-07-22T12:30:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jerry](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@Jerry](https://discourse.paraview.org/u/Jerry)
#### Post date: [July 22, 2020, 12:30pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922/1 "2020-07-22T12:30:41Z")

</div>

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`](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:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/8/83591d23782ecc6c3569f9314ff2dd9c12fbbdc6.png)

And then I download Ospray1.8.2 from its [github](https://github.com/ospray/OSPRay/releases). 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)

 ![image](https://discourse.paraview.org/uploads/default/original/2X/3/3695749475ad71d663f31087802f1cba3fd5abfb.png)  
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.  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/64a88f63bc8c97b5816503ed7167bb39157a7fa9.jpeg)  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/b/ba7958ac2b395d652670ad90e507a28661eff33c.jpeg)  
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??

---

<div class="post-metadata">

### Author: ![nate\_develder](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nate_develder/32/4380_2.png) [@nate\_develder](https://discourse.paraview.org/u/nate_develder)
#### Post date: [July 22, 2020, 1:54pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922/2 "2020-07-22T13:54:36Z")

</div>

Would the superbuild be an option for you?

[https://gitlab.kitware.com/paraview/paraview-superbuild/](https://gitlab.kitware.com/paraview/paraview-superbuild/)

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

---

<div class="post-metadata">

### Author: ![Dave\_DeMarle](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dave_demarle/32/27_2.png) [@Dave\_DeMarle](https://discourse.paraview.org/u/Dave_DeMarle)
#### Post date: [July 22, 2020, 2:35pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922/3 "2020-07-22T14:35:19Z")

</div>

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](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](https://discourse.paraview.org/t/large-ospray-material-database/2708)

---

<div class="post-metadata">

### Author: ![Jerry](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@Jerry](https://discourse.paraview.org/u/Jerry)
#### Post date: [July 24, 2020, 10:18pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922/4 "2020-07-24T22:18:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Jerry](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@Jerry](https://discourse.paraview.org/u/Jerry)
#### Post date: [July 24, 2020, 10:19pm UTC](https://discourse.paraview.org/t/problem-in-building-paraview-with-ospray/4922/5 "2020-07-24T22:19:37Z")

</div>

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