# Opacity issues with model exported from segmentations module

**URL:** https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237
**Category:** Support
**Created:** [May 1, 2017, 11:44pm UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237 "2017-05-01T23:44:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mfolson](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mfolson](https://discourse.slicer.org/u/mfolson)
#### Post date: [May 1, 2017, 11:44pm UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237/1 "2017-05-01T23:44:15Z")

</div>

Hi all,

I am attempting to create skull models from MR data in both the editor and  
segment editor modules. So far, I’ve had better luck using the segmentation  
tools to accomplish this. The problem I’m having now is that I would like to  
export the segmentation to a model node for quick viewing, however the  
exported models have odd transparency features. For example, the outside of  
the skull will be semi-transparent but the inside of the skull will appear  
solid even though it is made from a single segment. Thus when viewing the  
overall skull model, I see the inside curvature instead of the outside.

I have tried changing opacity settings before and after exporting to a model  
node, but the results have so far been the same. Am I missing a setting or  
is this just a drawback to exporting the segmentation? I’ve attached some  
sample images showing the correct model (using the create surface feature)  
and the problem model.

Thanks,  
Matt

 ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/1X/f09069fdc761b2ac60671c20e270f93cb44099ce.JPG) ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/1X/1d6d5fe40d852fbedb06932de97a6f8844dcc7fd.JPG)

---

<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: [May 1, 2017, 11:50pm UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237/2 "2017-05-01T23:50:32Z")

</div>

Have you set the opacity to a value \<1.0?

This is a known limitation of VTK OpenGL rendering backend (due to displayed triangles are not ordered based on viewpoint).

In the short term you can use lower opacity values, which makes the artifacts less prominent. You can also save the model as an STL or PLY file and render in ParaView or other software.

We plan to switch to OpenGL2 rendering backend very soon (in a few weeks?). In this new rendering backend, rendering of transparent models works well (it uses depth peeling method).

---

<div class="post-metadata">

### Author: ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)
#### Post date: [May 2, 2017, 10:12am UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237/3 "2017-05-02T10:12:16Z")

</div>

@lassoan @cpinter isn’t that a problem of flipped normals? I think I have already (very rarely) got meshes from a segmentation that looked _inside out_, so I had to flip the normals using the `Surface Toolbox`.

---

<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: [May 2, 2017, 4:04pm UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237/4 "2017-05-02T16:04:29Z")

</div>

I haven’t seen flipped normal in segmentations. Do you have a data set that has this issue?

The key question is if opacity was set to a value smaller than 1.0 - if yes, then most likely it’s related to rendering; if it’s exactly 1.0 then it is probably be caused by wrong ordering of triangles (and backface culling).

---

<div class="post-metadata">

### Author: ![mfolson](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mfolson](https://discourse.slicer.org/u/mfolson)
#### Post date: [May 2, 2017, 6:11pm UTC](https://discourse.slicer.org/t/opacity-issues-with-model-exported-from-segmentations-module/237/5 "2017-05-02T18:11:41Z")

</div>

Thank you both for the quick replies!

Andras, I have played with the opacity values \<1.0 and =1.0, but anything less than 1 renders in such a way that the outside and inside surfaces switch depending on orientation. This must be the issue with VTK OpenGL you mentioned.

Fernando, based on your suggestion I flipped the normals in the surface toolbox, but this yielded the same model. However, if I then unchecked the “flip normals” box and ran it again (so that no options were even used in the surface toolbox module), the correct model was created. Perhaps just running it through recomputes and fixes whatever odd ordering/opacity problems I’m seeing.

Anyways, this will work for me. Thanks for the help!

Best,  
Matt
