# Exporting Segmentation to OBJ and 3D Viewer

**URL:** https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404
**Category:** Support
**Tags:** segmentation, web
**Created:** [March 9, 2022, 1:04pm UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404 "2022-03-09T13:04:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Eserval](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/eserval/32/14650_2.png) [@Eserval](https://discourse.slicer.org/u/Eserval)
#### Post date: [March 9, 2022, 1:04pm UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404/1 "2022-03-09T13:04:25Z")

</div>

Hello everyone,

Hello everyone,

I’m having a problem exporting the slicers to OBJ file. I believe there is an error in the lighting and transparency settings during the creation of the OBJ file.  
When loading the file in the Online 3D Viewer, the 100% opaque parts appear transparent and the transparent ones appear opaque but with very bad lighting. Is there any way to configure these settings before exporting?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/8/d86457b340167f00d59f1d6f8711f3c4801b05c7.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: [March 9, 2022, 2:58pm UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404/2 "2022-03-09T14:58:09Z")

</div>

I would recommend to use SlicerOpenAnatomy for web viewer export. See detailed instructions [here](https://github.com/PerkLab/SlicerOpenAnatomy/).

If you export in glTF format (supported by [3dviewer.net](http://3dviewer.net) that you show in your screenshot above) then not just transparency is correct but all segment names and even the hierarchy. See some more information and example in this post:

> [@Open source Human Anatomy Atlas](https://discourse.slicer.org/t/open-source-human-anatomy-atlas/17734/15):
>
> Exactly! I would also add that since we discussed this we spent some more time with gltf and available web viewers and improved the SlicerOpenAnatomy extension. As a result we now have a very good workflow for creating and share models: Create/edit segmentation using Segment Editor Export segmentation to glTF format using SlicerOpenAnatomy extension. The glTF file stores segment names, hierarchy, and display properties. We use simple shading and no texture, but we could specify more interest…

Example segmentation exported from Slicer: [https://3dviewer.net/#model=https://raw.githubusercontent.com/lassoan/Test/master/SPL-Abdominal-Atlas.gltf](https://3dviewer.net/#model=https://raw.githubusercontent.com/lassoan/Test/master/SPL-Abdominal-Atlas.gltf)

[![](https://github.com/PerkLab/SlicerOpenAnatomy/raw/master/Screenshot02.png)](https://3dviewer.net/#model=https://raw.githubusercontent.com/lassoan/Test/master/SPL-Abdominal-Atlas.gltf)

---

<div class="post-metadata">

### Author: ![Eserval](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/eserval/32/14650_2.png) [@Eserval](https://discourse.slicer.org/u/Eserval)
#### Post date: [March 10, 2022, 5:02am UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404/3 "2022-03-10T05:02:20Z")

</div>

Hello Andras,

Thanks so much for your fast answare.  
For some reason, exporting as gITF does not bring the opacity configurations and segment names.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/1/2149fffd1c8a919cf4bbc909ba048bdf9804c72f.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/f/8fdd3c7bf0b1de4fa583b316f9b7082071f767a8.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: [March 13, 2022, 5:56am UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404/4 "2022-03-13T05:56:02Z")

</div>

You need to use the latest Slicer Preview Release.

---

<div class="post-metadata">

### Author: ![Eserval](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/eserval/32/14650_2.png) [@Eserval](https://discourse.slicer.org/u/Eserval)
#### Post date: [March 13, 2022, 10:48pm UTC](https://discourse.slicer.org/t/exporting-segmentation-to-obj-and-3d-viewer/22404/5 "2022-03-13T22:48:49Z")

</div>

Thanks a lot Andras!
