# Optix Pathtracer messes with line width (5.11.0)

**URL:** https://discourse.paraview.org/t/optix-pathtracer-messes-with-line-width-5-11-0/12134
**Category:** ParaView Support
**Created:** [May 22, 2023, 2:43pm UTC](https://discourse.paraview.org/t/optix-pathtracer-messes-with-line-width-5-11-0/12134 "2023-05-22T14:43:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flotus1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/7ea924/32.png) [@flotus1](https://discourse.paraview.org/u/flotus1)
#### Post date: [May 22, 2023, 2:43pm UTC](https://discourse.paraview.org/t/optix-pathtracer-messes-with-line-width-5-11-0/12134/1 "2023-05-22T14:43:45Z")

</div>

As seen in the images below.  
When using ray-tracing with Optix, Scenes that contain lines (e.g. surface with lines) are completely messed up with the default line width setting of 1.  
A workaround I found in a pinch is reducing the line width to something like 0.1, in order to get a similar image to the non-RT Renderer.

Is this intended behavior? Any way to prevent it, without having to touch the line width setting?

 ![linewidth1](https://discourse.paraview.org/uploads/default/original/2X/5/5a62622d998ff29196ec412860672fbd18057aaa.jpeg)  
 ![linewidth01](https://discourse.paraview.org/uploads/default/original/2X/1/1114134eafe45a0a1efd0e5c5c936d161b9b46d6.jpeg)

---

<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: [May 23, 2023, 3:17pm UTC](https://discourse.paraview.org/t/optix-pathtracer-messes-with-line-width-5-11-0/12134/2 "2023-05-23T15:17:39Z")

</div>

Your line width setting is the right approach to adjust this.

– more detail –

The rasterizer (OpenGL) draws lines as image space, well lines. Being in image space the pixel width is an exact match.

The ray tracers implement lines by drawing world space cylinders. Therefore look big close to the camera and small farther away. The cylinder radius corresponding to N pixel wide lines is [a heuristic](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/RayTracing/vtkOSPRayPolyDataMapperNode.cxx#L890) I made up long ago that looks “about right” in many, but not all, scenes.

---

<div class="post-metadata">

### Author: ![flotus1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/7ea924/32.png) [@flotus1](https://discourse.paraview.org/u/flotus1)
#### Post date: [May 24, 2023, 6:49am UTC](https://discourse.paraview.org/t/optix-pathtracer-messes-with-line-width-5-11-0/12134/3 "2023-05-24T06:49:00Z")

</div>

Thank you for the explanation.  
So it’s not something I did wrong, but technical reasons with RT being a completely different beast than rasterization.
