# Problem rendering mesh wireframe using OSPRay raycaster with transparent background

**URL:** https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129
**Category:** ParaView Support
**Created:** [October 5, 2021, 1:40pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129 "2021-10-05T13:40:50Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![BrunoP](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/58956e/32.png) [@BrunoP](https://discourse.paraview.org/u/BrunoP)
#### Post date: [October 5, 2021, 1:40pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/1 "2021-10-05T13:40:50Z")

</div>

Hi,

I have problem when rendering mesh wireframe with transparent background using OSPRay raytracer. If image is rendered with background everything is rendered correctly, problem appears when setting transparent background. Here is an example:

 ![test_wire_frame_small](https://discourse.paraview.org/uploads/default/original/2X/a/ab43986f863927b1065cf6f82e15d80fbcdce8ae.png)  
 ![test_wire_frame_small_transparent](https://discourse.paraview.org/uploads/default/original/2X/1/1c1d50780b74ad58aa7862f5971b9006b82ebb34.png)

Am I missing some general settings to fix this problem?

Thanks,  
All the best,  
Bruno

---

<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: [October 5, 2021, 1:54pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/2 "2021-10-05T13:54:53Z")

</div>

@timothee.chabat

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [October 5, 2021, 2:24pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/3 "2021-10-05T14:24:43Z")

</div>

No issue here. So you’re exporting your scene in PNG using the `Use Transparent Background` option, as well as OSPRay raytracer (and not the pathtracer) right ?

Could you please tell your ParaView version ? (and your OSPRay version if you build it yourself)

---

<div class="post-metadata">

### Author: ![BrunoP](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/58956e/32.png) [@BrunoP](https://discourse.paraview.org/u/BrunoP)
#### Post date: [October 5, 2021, 2:30pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/4 "2021-10-05T14:30:14Z")

</div>

Hi,

I rendered couple more examples to check.  
Wireframe - surface overlay using OSPRay raycaster:

 ![test_surf_wire_overlay_small](https://discourse.paraview.org/uploads/default/original/2X/1/1d21f7492f8889ba1f28e51468f0ff4869996d17.png)  
Using OSPRay pathtracer it gets even worse:  
Both background mode:  
 ![test_path_trace_enviroment_small](https://discourse.paraview.org/uploads/default/original/2X/6/60a7653433e26ff17789aaa9860f9ba7015a677b.png)

Backplate mode:

 ![test_path_trace_backplate_small](https://discourse.paraview.org/uploads/default/original/2X/1/1ade8ffdb27b29a7d0836cbaa593525e26398c57.png)

---

<div class="post-metadata">

### Author: ![BrunoP](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/58956e/32.png) [@BrunoP](https://discourse.paraview.org/u/BrunoP)
#### Post date: [October 5, 2021, 2:36pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/5 "2021-10-05T14:36:45Z")

</div>

Hi timothee,

Yes, I am saving screenshot using transparent background option. As you can artefacts are appearing using both OSPRay raytracer and pathtracer.

I am using Paraview 5.9.1. for mac. I haven’t build it myself.

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [October 5, 2021, 2:49pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/6 "2021-10-05T14:49:27Z")

</div>

Ok thanks for the precision! Since I cannot reproduce locally could you please write explicit steps to reproduce ? If it works with procedural sources (eg the `Sphere` source) you could share a state file, else if possible share the dataset you’re showing in your screenshots.

Note that camera position is not shared in state files so if you think it is relevant you can also share it (either write it or export it using the custom viewpoint dialog)

---

<div class="post-metadata">

### Author: ![BrunoP](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/58956e/32.png) [@BrunoP](https://discourse.paraview.org/u/BrunoP)
#### Post date: [October 5, 2021, 3:54pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/7 "2021-10-05T15:54:33Z")

</div>

Hi timothee,

Here are state files, camera parameters and renders (both with and without transparent background) for sphere as surface mesh and wireframe.  
[sphere\_example.tar.gz](https://discourse.paraview.org/uploads/short-url/dDLAVPxBW0Xn26HGStMFFcU15Go.gz) (1.3 MB)

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [October 6, 2021, 7:38am UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/8 "2021-10-06T07:38:49Z")

</div>

Thank you for taking the time of producing these files! I can reproduce on 5.9, 5.10 RC1 and master.

This is definitely a bug but I don’t know where it comes from so far, I’ll try to take a look at it when I can. Maybe @Dave_DeMarle has an idea here ?

---

<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: [October 7, 2021, 7:47am UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/9 "2021-10-07T07:47:02Z")

</div>

Could you open an issue on gitlab @timothee.chabat ?

---

<div class="post-metadata">

### Author: ![BrunoP](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/58956e/32.png) [@BrunoP](https://discourse.paraview.org/u/BrunoP)
#### Post date: [October 8, 2021, 8:49pm UTC](https://discourse.paraview.org/t/problem-rendering-mesh-wireframe-using-ospray-raycaster-with-transparent-background/8129/10 "2021-10-08T20:49:04Z")

</div>

Hi,  
Thanks, the same artefacts appear in 5.9.0 and 5.9.1, haven’t tried 5.10 release candidate yet. On the other hand 5.8.1 renders it fine.  
Could you please let me know when you create gitlab issue so I can track progress on this?

Maybe I should open new topic for this, I came across another bug when rendering textured mesh using ambient occlusion. Missing/transparent pixels present also with increased SSAO number of samples and blurring of ambient occlusion. Here is an example:

 ![Example](https://discourse.paraview.org/uploads/default/original/2X/6/67a94e7614c41e2f09289a2d64549f5667de74d5.png)

I have created state file to reproduce this with wavelet source.  
[wavelet\_example.tar.gz](https://discourse.paraview.org/uploads/short-url/i7ND2Ocd5xb5F6DYNhz3SMlgoNp.gz) (870.5 KB)  
Render of wavelet isosurface using default scivis backend and AO on:

 ![wavelet_iso](https://discourse.paraview.org/uploads/default/original/2X/0/01a6e5971853c8f7cc12446e621b389ba08ee4cd.png)
