# Weird render error

**URL:** https://discourse.vtk.org/t/weird-render-error/12902
**Category:** Support
**Created:** [December 14, 2023, 2:18am UTC](https://discourse.vtk.org/t/weird-render-error/12902 "2023-12-14T02:18:00Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![liuzhongshu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/liuzhongshu/32/6921_2.png) [@liuzhongshu](https://discourse.vtk.org/u/liuzhongshu)
#### Post date: [December 14, 2023, 2:18am UTC](https://discourse.vtk.org/t/weird-render-error/12902/1 "2023-12-14T02:18:00Z")

</div>

I’m using vtk9. I drew some blue and white tubes using vtkTubeFilter on a separate layer of vtkRenderer, and sometimes the following render error occurs. (Those small aligned rectangles shouldn’t be there)

 ![image](https://discourse.vtk.org/uploads/default/original/2X/a/a1e819e71e1a844ef4426d90a38c342d7f869c5d.png)

I observed several strange things:

1. This problem only occurs on Intel UHD graphics cards, Nvidia cards do not have this problem.
2. If there are other transparent objects in the scene, this problem will disappear.
3. This problem will also disappear if the blue and white tubes are not placed on a separate vtkRenderer.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 14, 2023, 7:12am UTC](https://discourse.vtk.org/t/weird-render-error/12902/2 "2023-12-14T07:12:56Z")

</div>

> [@liuzhongshu](#):
>
> This problem only occurs on Intel UHD graphics cards, Nvidia cards do not have this problem.

Sounds like a driver bug to me

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [December 14, 2023, 7:06pm UTC](https://discourse.vtk.org/t/weird-render-error/12902/3 "2023-12-14T19:06:24Z")

</div>

It seems the blue and white tubes are coincident i.e. the faces are within a tolerant depth of each other. When that happens, the graphics pipeline cannot correctly resolve primitive depth and such artifacts occur. Take a look at [vtkMapper::SetResolveCoincidentTopology](https://vtk.org/doc/nightly/html/classvtkMapper.html#ab93c3652abaad9ec53b636bb63073cd8) and set polygon offset.

---

<div class="post-metadata">

### Author: ![liuzhongshu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/liuzhongshu/32/6921_2.png) [@liuzhongshu](https://discourse.vtk.org/u/liuzhongshu)
#### Post date: [December 15, 2023, 2:16am UTC](https://discourse.vtk.org/t/weird-render-error/12902/4 "2023-12-15T02:16:20Z")

</div>

I have updated the driver(windows 10) to the latest version and the problem still there.

---

<div class="post-metadata">

### Author: ![liuzhongshu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/liuzhongshu/32/6921_2.png) [@liuzhongshu](https://discourse.vtk.org/u/liuzhongshu)
#### Post date: [December 15, 2023, 7:05am UTC](https://discourse.vtk.org/t/weird-render-error/12902/5 "2023-12-15T07:05:19Z")

</div>

I tried SetResolveCoincidentTopology, but not fix.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [December 18, 2023, 8:56pm UTC](https://discourse.vtk.org/t/weird-render-error/12902/6 "2023-12-18T20:56:40Z")

</div>

Hello,

It looks like some alpha blending/translucency issue to me. Do you set or handle alpha channel values anywehere in your code? If so, do make sure you set valid values and set the correct alpha blending operation for the expected result. Many people think of alpha blending as a synonym of transparency/translucency setting and often they end up with unwanted effects if configured incorrectly.

best,

PC

---

<div class="post-metadata">

### Author: ![liuzhongshu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/liuzhongshu/32/6921_2.png) [@liuzhongshu](https://discourse.vtk.org/u/liuzhongshu)
#### Post date: [January 3, 2024, 9:45am UTC](https://discourse.vtk.org/t/weird-render-error/12902/7 "2024-01-03T09:45:41Z")

</div>

I found a fix, for the tube, set opacity to 0.999, then rendering will be no problem.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [January 3, 2024, 11:28am UTC](https://discourse.vtk.org/t/weird-render-error/12902/8 "2024-01-03T11:28:57Z")

</div>

I think that’s odd. Why does it work with 0.999 and not with 0.99999 or 0.99999999 or 1.0? Please, report the issue as a defect here: [Issues · VTK / VTK · GitLab (kitware.com)](https://gitlab.kitware.com/vtk/vtk/-/issues) .

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [January 3, 2024, 11:33am UTC](https://discourse.vtk.org/t/weird-render-error/12902/9 "2024-01-03T11:33:54Z")

</div>

Values \<1.0 likely trigger a different path through the rendering engine.

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [January 3, 2024, 3:23pm UTC](https://discourse.vtk.org/t/weird-render-error/12902/10 "2024-01-03T15:23:35Z")

</div>

@liuzhongshu If changing the opacity fixes it, means you **are** running into coincident geometry issues. Did you try changing the coincident topology offset parameters?

---

<div class="post-metadata">

### Author: ![liuzhongshu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/liuzhongshu/32/6921_2.png) [@liuzhongshu](https://discourse.vtk.org/u/liuzhongshu)
#### Post date: [January 4, 2024, 1:54am UTC](https://discourse.vtk.org/t/weird-render-error/12902/11 "2024-01-04T01:54:46Z")

</div>

> [@Paulo\_Carvalho](#):
>
> I think that’s odd. Why does it work with 0.999 and not with 0.99999 or 0.99999999 or 1.0? Please, report the issue as a defect here: [Issues · VTK / VTK · GitLab (kitware.com)](https://gitlab.kitware.com/vtk/vtk/-/issues) .

I think that this is a driver bug. any opacity value \<1.0 can fix it.  
and I tried SetResolveCoincidentTopology, but not working.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [January 4, 2024, 8:03pm UTC](https://discourse.vtk.org/t/weird-render-error/12902/12 "2024-01-04T20:03:56Z")

</div>

Hello,

Have you made sure your graphics drivers are up-to-date?

best,

PC
