# OSPRay volume rendering slowness

**URL:** https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075
**Category:** ParaView Support
**Created:** [December 16, 2020, 3:17pm UTC](https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075 "2020-12-16T15:17:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 16, 2020, 3:17pm UTC](https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075/1 "2020-12-16T15:17:31Z")

</div>

@Dave_DeMarle

Using ParaView 5.8.1 and 5.9-RC2, Ospray Volume Rendering mode is slower than Raycast only.  
Is that expected, is this an issue ?

---

<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: [December 16, 2020, 3:21pm UTC](https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075/2 "2020-12-16T15:21:10Z")

</div>

The comparison is raycast vs raycast right? In that case not expected. What performance delta do you see?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 16, 2020, 3:27pm UTC](https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075/3 "2020-12-16T15:27:59Z")

</div>

Yes, here is how to reproduce very easily.

- Open ParaView binary release (5.8.1 or 5.9-RC2)
- Wavelet, -100, 100, -100, 100, -100, 100, Apply
- Edit -\> Settings -\> RenderView -\> Show Annotations
- Use Volume Rendering
- RayCastOnly -\> 20 fps
- OSPray based -\> 5 fps

---

<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: [December 16, 2020, 3:55pm UTC](https://discourse.paraview.org/t/ospray-volume-rendering-slowness/6075/4 "2020-12-16T15:55:35Z")

</div>

Ah that’s VTK’s CPU ray tracer vs OSPRay’s CPU ray tracer then. Last time I profiled that comparison was back in PV 5.2 or no longer have a good idea of what performance characteristics to expect in practice so I don’t know if this is a regression or not.

Instruction level parallelism should help OSPRay win but there are many other factors that can overwhelm that. Data representation and sample step differences come to mind. Note that in this specific mode (ospray volume rendering within GL as opposed to the whole view being ospray) there are depth buffer readback and pixel writeback costs too that slow it down.

@jfavre had a really good paper that looked at it closely a year or so ago.
