# Surface triangulation in Models

**URL:** <https://discourse.slicer.org/t/surface-triangulation-in-models/21045>\
**Category:** Development\
**Tags:** 3d-model\
**Created:** [December 14, 2021, 4:09am UTC](https://discourse.slicer.org/t/surface-triangulation-in-models/21045 "2021-12-14T04:09:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [December 14, 2021, 4:09am UTC](https://discourse.slicer.org/t/surface-triangulation-in-models/21045/1 "2021-12-14T04:09:51Z")

</div>

Hi.  
I am using Slicer 4.11.20210226 in ubuntu 20.04  
I have written a module that takes input a volume and markups and outputs a Model (surface). When I look at the Model it appeares smooth, but if I save it as an .stl file and reload it back into Slicer, it appeares triangulated. I have observed that in general, when I give triangulated surface as input to my other module, it gives better results than when the surface is not triangulated. So it is important for me to understand what the triangulation does. The surface also appears to be inflated once I save and reload it back again.

This is original surface (Model) in 3d view

 ![before saving](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/e/ce79dbbf4eda06c8d1e10f284dab9b5852f79bd3.png)

This is after saving as .stl and relading back into Slicer as Model in 3d view

 ![after saving and reloading](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/c/8c3253c40a06da749f9f6f598ec040e9834f4e64.png)

Why does triangulation happen when I just save and reload the file?  
What difference does this make to the surface object?  
Is this only a visible difference or is there some change in the data?

---

<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:** [December 14, 2021, 2:23pm UTC](https://discourse.slicer.org/t/surface-triangulation-in-models/21045/2 "2021-12-14T14:23:42Z")

</div>

The faceted appearance due to using flat shading, because smooth Gouraud or Phong shading would requires surface normals. STL files cannot store surface normals, therefore when you save your mesh into this format then surface normals is lost.

You can either use a different file format (ply, vtk, obj, …) or recompute the normals using the Surface Toolbox module.
