# Slicing a 3D object into 2D

**URL:** <https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316>\
**Category:** Questions\
**Created:** [October 31, 2020, 11:12am UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316 "2020-10-31T11:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![puia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/puia/32/12398_2.png) [@puia](https://forum.babylonjs.com/u/puia)\
**Post date:** [October 31, 2020, 11:12am UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316/1 "2020-10-31T11:12:05Z")

</div>

Hello

I’m recently started to get familiar with babylon js and want to use it as a feature in my web application in order to firstly ,display an 3d image ( STL Viewer ) and secondly , somehow convert this 3d into a collection of 2d images . either slicing the 3d onject into n layers or , having for example , 20 , 2d images from Different angles of the object.  
I need to know if it is possible to do this task using babylon js and if the answer is yes, where should start from .  
Thanks

---

<div class="post-metadata">

**Author:** ![LeJohn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lejohn/32/35093_2.png) [@LeJohn](https://forum.babylonjs.com/u/LeJohn)\
**Post date:** [October 31, 2020, 5:45pm UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316/3 "2020-10-31T17:45:32Z")

</div>

Hi @puia and welcome!

In addition to the information from @Necips , this may also be of interest to you:

> **[Render a Scene to a PNG - Babylon.js Documentation](https://doc.babylonjs.com/how_to/render_scene_on_a_png)**

---

<div class="post-metadata">

**Author:** ![puia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/puia/32/12398_2.png) [@puia](https://forum.babylonjs.com/u/puia)\
**Post date:** [November 1, 2020, 10:58am UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316/4 "2020-11-01T10:58:20Z")

</div>

what i’m looking for is to produce a collection of 2d images from a 3d object .  
think of it like , the user provides a 3d stl image , and the app should convert is into a collection of 2d images . as an example :  
#1 something like what we have in MRI pictures . the 3d MRI can be seen as a collection of 2d images .  
#2 we’ve got a 3d object . now we want to have 20 , 2d images from each side , one from front , one from right side , one from left side , one from top , one from bottom , etc

---

<div class="post-metadata">

**Author:** ![puia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/puia/32/12398_2.png) [@puia](https://forum.babylonjs.com/u/puia)\
**Post date:** [November 1, 2020, 11:08am UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316/5 "2020-11-01T11:08:15Z")

</div>

This would work for me .  
as I replied to @Necips , I need a collection of 2d images from different angles from a single 3d object in order to use that to train a machine learning model .  
or also it can better to have a 3d object slicer .

.

---

<div class="post-metadata">

**Author:** ![puia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/puia/32/12398_2.png) [@puia](https://forum.babylonjs.com/u/puia)\
**Post date:** [November 4, 2020, 8:47pm UTC](https://forum.babylonjs.com/t/slicing-a-3d-object-into-2d/15316/8 "2020-11-04T20:47:35Z")

</div>

I have seen this before , but does it provide an API service ?
