# Line width (tube diameter) is not controllable with OSPRay

**URL:** https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183
**Category:** ParaView Support
**Created:** [August 26, 2020, 11:51am UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183 "2020-08-26T11:51:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 26, 2020, 11:51am UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/1 "2020-08-26T11:51:11Z")

</div>

I am visualizing lines loaded from `vtu` files as tubes and I don’t succeed at controlling their diameters.

The diameter somehow varies from file to file even though the display settings are the same.

 ![Screenshot from 2020-08-26 14-06-32](https://discourse.paraview.org/uploads/default/original/2X/f/f52e5d10f76bd0ac56d6f1b1b3c3bb3f59c8d037.png)

This is super weird and annoying.

I tested Paraview 5.7.0, 5.8.0 and 5.8.1.  
The issue is observed with OSPRay raycaster and OSPRay pathtracer; when disabling Ray Tracing all lines have the same width.

Am I missing a setting?  
Is it a known bug?  
Is there a workaround?

Here are the sample files and a state file (Paraview 5.8.0) illustrating the issue:  
[collision\_dry\_distances\_000012.vtu](https://discourse.paraview.org/uploads/short-url/ukPkkFFjJ0DTVjyVgQ63ylhfOBO.vtu) (844 Bytes)  
[collision\_dry\_distances\_000013.vtu](https://discourse.paraview.org/uploads/short-url/gS02rBQePTMGh1tZ9jXjObMSo5T.vtu) (844 Bytes)  
[state.pvsm](https://discourse.paraview.org/uploads/short-url/e5eQQvABZo9XiWAg2KC9vKZW00O.pvsm) (246.6 KB)

I am pretty sure now that the diameter scales with the total length of all line segments. This can easily be demonstrated by applying a transform filter:

 ![Screenshot from 2020-08-26 14-29-40](https://discourse.paraview.org/uploads/default/original/2X/9/9216e91bde09dbbd33ebc2290e95de223b349190.png)

**So … where can I assign the absolute, exact tube diameter?**

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 27, 2020, 6:48am UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/2 "2020-08-27T06:48:51Z")

</div>

Similarly, the diameter of arrow glyphs depends on their length.

Not being able to specify the actual diameter of these tubes makes it impossible to render network-like structures, … think of a spider web.

---

<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: [August 27, 2020, 12:50pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/3 "2020-08-27T12:50:22Z")

</div>

This is a [known bug](https://gitlab.kitware.com/paraview/paraview/-/issues/18236). As you have surmised, the point=\>sphere and line=\>cylinder radius for the ray tracers is, by default, set via a function of the object’s bounding box and the vtkProperty.pointsize/linewidth control. A workaround for you might be to use the “Scale Array” control, which lets you choose a point aligned array to set the radius at each point, but the weird way that goes through a lookup table, may be problematic.

I’ve started on a fix [here](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7064/commits).

---

<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: [August 28, 2020, 12:53pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/4 "2020-08-28T12:53:06Z")

</div>

@bastian - as described over [on this post](https://discourse.paraview.org/t/particle-size-increasing-with-time-with-ospray-on/4681/6) the merge request is now going through review. I expect it to appear in 5.9.rc1 in a week or two.

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 28, 2020, 12:58pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/5 "2020-08-28T12:58:38Z")

</div>

@Dave_DeMarle Awesome! I will wait for it to be released then and mark this thread as solved once that is the case.  
Thanks a bunch for your work.

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [May 19, 2021, 12:51pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/6 "2021-05-19T12:51:55Z")

</div>

It looks like this feature has not made it into ParaView yet ☹,  
[https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/4335](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4335)  
yet it would be such an improvement!

To underline why it would be really helpful to be able to precisely assign line/tube diameters consider a viualization of wireframes. Let me give you an example:

So I set up a state for the visualization of 8 falling rings:

 ![0001](https://discourse.paraview.org/uploads/default/original/2X/3/30347d896b8c0b28328ae9ff0149f8ff86267856.jpeg)

Looks good to me. However, using the exact same state for 24 falling rings of which each is identical to the eight above is less pleasing to my eyes:

 ![0001](https://discourse.paraview.org/uploads/default/original/2X/2/24886bd9b12548909aa3a62d6091aa7c4c9f1402.jpeg)

But even the line widths of the eight rings look thicker later in time and I have no clue why:

 ![1609](https://discourse.paraview.org/uploads/default/original/2X/9/9cb791776a8270f9f810fc0dacb5e4850b17f2a6.jpeg)

For the visualization of e.g. arrows it’s a good thing to have the tubes scale with length, but in case of wireframes I don’t think it is.

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [May 19, 2021, 12:57pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/7 "2021-05-19T12:57:20Z")

</div>

Ahh never mind I must have been blind! There is “Each Exact” now. Will check it out!

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [May 19, 2021, 1:39pm UTC](https://discourse.paraview.org/t/line-width-tube-diameter-is-not-controllable-with-ospray/5183/8 "2021-05-19T13:39:15Z")

</div>

@Dave_DeMarle - “Each exact” does not seem to work for wireframes. It has my CPU go crazy until I eventually shut down the non-responding ParaView instance.

Here is a video demonstrating the issue:  
[peek\_scaling\_each\_exact\_simpleexample.mp4](http://wwwpub.zih.tu-dresden.de/~s4080143/issues/peek_scaling_each_exact_simpleexample.mp4)
