# How to make a translucent model suitable for scientific publication

**URL:** https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635
**Category:** Support
**Tags:** segmentation
**Created:** [September 9, 2023, 5:36pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635 "2023-09-09T17:36:28Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 9, 2023, 5:36pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/1 "2023-09-09T17:36:28Z")

</div>

Hello,

How to make a translucent model which I will then be able to export as a semi-transparent model.  
And I know the “opacity” option but after exporting the stl model this model is still opacity. I want semi-transparent model.  
Example figure with random article. I would like to do similar effect.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/4/448b48b9089b5de6da73884d61de1cd11ce16adb.jpeg)

---

<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: [September 10, 2023, 1:29am UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/2 "2023-09-10T01:29:37Z")

</div>

We usually just set the view background color to white for publications.

But if you want to capture a screenshot with transparent background then you can do that by copy-pasting [this script](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#capture-3d-view-into-png-file-with-transparent-background) into the Python console.

---

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 10, 2023, 8:18am UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/3 "2023-09-10T08:18:57Z")

</div>

Thanks for the answer  
I understand that I cannot export a transparent model. Directly in 3D slicer,I need to take a screenshot “3d view” with translucent model skull with brain cast and then change the background in Photoshop, etc or maybe is there a suitable tool for making a white background directly in 3D slicer?  
How option “opacity” is better in “Segmentations” or “Models”.

---

<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: [September 10, 2023, 12:38pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/4 "2023-09-10T12:38:41Z")

</div>

> [@pawel](#):
>
> I understand that I cannot export a transparent model

You can actually export a transparent model, directly in Slicer, using the script that I linked above. You can copy that image over content in Word, PowerPoint, etc. and the background will be visible wherever the view content is transparent.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/fa2ad0c502fb59ac6cad21dded0da22f77c9255f.png)

You can also set the view background to white if you know that you’ll show the content over white background and then you don’t need to copy-paste a script.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/7/17710f8d56aa17f3744b12b9e6674b53aee591e2.jpeg)

> [@pawel](#):
>
> How option “opacity” is better in “Segmentations” or “Models”.

There is no difference, they are both equally good for making a 3D object semi-transparent.

---

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 10, 2023, 1:53pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/5 "2023-09-10T13:53:32Z")

</div>

Thank you for your answer.Your answer is very helpful:)

I see that also turning off the “3D cube” and “3D axis label” options will allow me to get an effect like in the attached image.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/c/5cf233cc3108673213a404f1aad915c8cfb8498d.jpeg)  
Best,

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [September 10, 2023, 3:33pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/6 "2023-09-10T15:33:37Z")

</div>

Also, explore the Lights module in Sandbox extension for better control over shadows.

---

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 11, 2023, 4:12pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/7 "2023-09-11T16:12:31Z")

</div>

Thank you for answer.  
I understand that the only option to take a screenshot is the “3D View” is the "Annotation Screenshot option?  
Is there a 3d view rendering option?  
Best,

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [September 11, 2023, 5:28pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/8 "2023-09-11T17:28:09Z")

</div>

You can use that (and simply switch to 3D layout option for 3D rendering only screenshot). Or you can follow the contents of this thread to create a high-resolution capture via little bit of python scripting:

> [@Higher resolution for screen captures of 3D view?](https://discourse.slicer.org/t/higher-resolution-for-screen-captures-of-3d-view/8880/30):
>
> You made me curious, so I tried [offscreen rendering](https://kitware.github.io/vtk-examples/site/Cxx/Utilities/OffScreenRendering/) and it basically works, although it sometimes leads to a crash when interacting with the view after rendering. But something like the code below could be added as a feature if someone wants to play with it. It could use more tweaks, but if it’s useful for people we could put it in the script repository for now. Here’s the full res 5kx5x version: vtk.vtkGraphicsFactory() gf = vtk.vtkGraphicsFactory() gf.SetOffScreenOnlyMode(1) gf…

---

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 11, 2023, 9:41pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/9 "2023-09-11T21:41:21Z")

</div>

Thank you  
I have one more question.  
I made a model in 3D slicer with a semi-transparent human body model and non-transparent bone model.  
I have a problem because there is a strange overlap between the human body model (white model) and the bone model (red).  
Can this be fixed?

 ![image190](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/1/a1b6df984e111be74da51fc0f28644b50a6d6005.jpeg)

---

<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: [September 12, 2023, 10:48pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/10 "2023-09-12T22:48:38Z")

</div>

This looks like “z fighting” - almost equal surface mesh elements are rendered on top of each other.

Do you still display the original segmentation and the exported model? Hiding the segmentation or the model will fix the issue then.

Have you enabled “depth peeling” in the 3D view controller? That option is required for correct rendering of transparent surfaces.

---

<div class="post-metadata">

### Author: ![pawel](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pawel](https://discourse.slicer.org/u/pawel)
#### Post date: [September 13, 2023, 10:52am UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/11 "2023-09-13T10:52:17Z")

</div>

Thanks for help.  
Yes, “depth peeling” function is enabled.

I first exported “the human body” segmentation as a model then bone (red) segmentation exported as a model and I see that there is no longer a problem. First I did white model then a red model.

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [September 13, 2023, 6:22pm UTC](https://discourse.slicer.org/t/how-to-make-a-translucent-model-suitable-for-scientific-publication/31635/12 "2023-09-13T18:22:54Z")

</div>

To me this looks like you have a “negative” of the vertebra as part of the body model. One option is to segment the body first (with threshold say), close any connections to the outside air and remove islands to get a homogeneous block. Then add the vertebra segment.
