# Render large Babylon files

**URL:** <https://forum.babylonjs.com/t/render-large-babylon-files/51225>\
**Category:** Questions\
**Created:** [June 11, 2024, 9:37am UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225 "2024-06-11T09:37:08Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Rohith\_K](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rohith_k/32/40623_2.png) [@Rohith\_K](https://forum.babylonjs.com/u/Rohith_K)\
**Post date:** [June 13, 2024, 6:56am UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225/21 "2024-06-13T06:56:16Z")

</div>

now check [PIPES-Babylon.zip - Google Drive](https://drive.google.com/file/d/1rNFq0F7YoornaG549UAw3dCb4R-t8vF4/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Post date:** [June 13, 2024, 7:18am UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225/22 "2024-06-13T07:18:04Z")

</div>

Ok I see, indeed there is room for optimisation !  
Question : How are you modeling these ? Blender ? Anyway, you have some opti todo before exporting :

 ![Screenshot from 2024-06-13 09-07-03](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/8/989fb9a0862028f6dcbadea96e1bca6eee21c490.jpeg)  
TONS of meshes are the same, and should be instanciated. It means that only “one” mesh is written to the file, as well as sent to GPU for render. And then the duplication is done at render time, given transform (position, rotation, scale)  
For example, these red stuffs are the same and could be instanciated :  
 ![Screenshot from 2024-06-13 09-08-46](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/0/908d75b8da3e9772dbe50328d803ffd9c3c04abe.jpeg)

Same for these green stuffs :

 ![Screenshot from 2024-06-13 09-10-09](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/1/a11f630ef4000cf8c05d57d641d342c6f1aa0cc0.jpeg)

And even the pipes, all linear parts are separate meshes while they are exactly the same topology, it would be one mesh only, instanciated, with various transforms (position, rotation, scale)

Also, the vertices density is too high given the scene size :

 ![Screenshot from 2024-06-13 09-16-21](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/c/0c41c6348e1cf725a837c012c47b1cddf290aa5f.jpeg)  
Here the selected central bar is 64 vertices, it could be way less, etc…

* * *

So, to sum it up, given your modeling tool (Blender, or whatever), you need to instanciate a LOT in this scene, and reduce some polycounts where not necessary. Before exporting 🙂

++  
Tricotou

---

<div class="post-metadata">

**Author:** ![Rohith\_K](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rohith_k/32/40623_2.png) [@Rohith\_K](https://forum.babylonjs.com/u/Rohith_K)\
**Post date:** [June 13, 2024, 7:36am UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225/23 "2024-06-13T07:36:00Z")

</div>

Brother I have said ,my task is to create a code for rendering this kind of large Babylon files ,so I have to use many optimisation techniques like index db,octree, occlusion culling,ray tracing, progressive loading,lod

I should implement all these techniques in to my code and you know I’m a beginner,  
If you know this techniques and any other techniques your own pls help

I have shared my git hub code link above you can clone it and do whatever techniques you know ,so I can study that code tooo

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [June 13, 2024, 7:43am UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225/24 "2024-06-13T07:43:33Z")

</div>

Sorry but as has been mentioned a few times by a few people already, your first and best option is to optimise the models/meshes before you export them, using tools in Blender or whatever 3D software you are using to create the files.

You cannot easily optimise such large files in Babylon.js. It’s a case of “garbage in, garbage out” - ensure the files are optimised as much as possible following the advice of @Tricotou above, and only then will you be able to efficiently load them using Babylon.js and apply other optimisation techniques.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [June 13, 2024, 4:08pm UTC](https://forum.babylonjs.com/t/render-large-babylon-files/51225/25 "2024-06-13T16:08:33Z")

</div>

> [@inteja](#):
>
> If it’s just pipes, then chances are you don’t need anywhere near the amount of detail in a typical CAD export that would result in a 5Gb file

I am wondering too wtf can result in 5 gigs for such a simple model 😃

[Previous page](https://forum.babylonjs.com/t/render-large-babylon-files/51225.md?page=1)
