# Rendering artifact

**URL:** https://discourse.slicer.org/t/rendering-artifact/24065
**Category:** Development
**Created:** [June 27, 2022, 2:07pm UTC](https://discourse.slicer.org/t/rendering-artifact/24065 "2022-06-27T14:07:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)
#### Post date: [June 27, 2022, 2:07pm UTC](https://discourse.slicer.org/t/rendering-artifact/24065/1 "2022-06-27T14:07:43Z")

</div>

Hi,

I am experiencing rendering artifacts in a custom vtk renderer/render window in a dialog box.  
I manually load an obj and a texture and want to display this. The result is as follows:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/6/b687fb4736208eb813627268305e7c6b4beeff0c.png)  
When I use the same code, but add the actor to one of the standard slicer 3d views, the result looks like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/c/8c4c65061bb428d54ae237d57a0b07af4aed66dd.png)  
Does anybody know where this difference could come from?

thanks in advance

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 28, 2022, 3:30am UTC](https://discourse.slicer.org/t/rendering-artifact/24065/2 "2022-06-28T03:30:43Z")

</div>

The artifact does not look familiar. If the problem is not reproducible in Slicer views but it is reproducible in a stock VTK renderer outside Slicer then it may be better to report it on the VTK forum.

---

<div class="post-metadata">

### Author: ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)
#### Post date: [June 29, 2022, 2:41pm UTC](https://discourse.slicer.org/t/rendering-artifact/24065/3 "2022-06-29T14:41:49Z")

</div>

I didn’t find the root-cause for the artifact, but I managed to remove it.

The object in question basically only has two colors. So I initially created the texture mapping such that triangles of the same color would map to the same texture coordinates. This means that texture coordinates of the same-color triangles overlapped. This is when I saw the artifact.

I changed mapping such that each triangle now has its own space on the texture (i.e. no overlap anymore), and the artifact was gone.

I will post this also in the VTK forum.
