# How can I dynamically load part of my model?

**URL:** <https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595>\
**Category:** Questions\
**Tags:** tutorial, material, camera, glb, babylon\
**Created:** [April 4, 2023, 5:41am UTC](https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595 "2023-04-04T05:41:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Vishwakarma](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_vishwakarma/32/30900_2.png) [@Krishna\_Vishwakarma](https://forum.babylonjs.com/u/Krishna_Vishwakarma)\
**Post date:** [April 4, 2023, 5:41am UTC](https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595/1 "2023-04-04T05:41:41Z")

</div>

Hi, there! Can someone help me with this?

I’ve my glb model loaded on the scene. Now, I want to load the part of continents dynamically as per the camera frustum and zoom level. My use case is like -

1. The model loaded and only the part that are inside the camera frustum should be visible and as I move my camera, I need to dynamically load the other parts of continents.
2. After a certain camera zoom level, I want to dynamically load other models like boxes, and buildings over my continents and write text over it.

I search a little things, like `camera.onViewMatrixChangedObservable` event or adding LOD level which can help me to achieve little things. The main part is I’m stuck into dynamic loading part on certain camera movement or zoom level.

Here is my playground link you guys can refer -  
[https://playground.babylonjs.com/#G95938](https://playground.babylonjs.com/#G95938)

Here I’ve commented on the other model “medium-light-new.glb”, which is a sample building the I want to dynamically load over my continents.

Please, help me with your guidance!!! Thanks!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 4, 2023, 6:28am UTC](https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595/2 "2023-04-04T06:28:28Z")

</div>

You would need several glb for this I believe or do you mean loading in the scene only ?

cause the hot path on glb is about network + parsing once done aside of a bit of memory culling and such is already handled for you.

---

<div class="post-metadata">

**Author:** ![Krishna\_Vishwakarma](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/krishna_vishwakarma/32/30900_2.png) [@Krishna\_Vishwakarma](https://forum.babylonjs.com/u/Krishna_Vishwakarma)\
**Post date:** [April 4, 2023, 6:53am UTC](https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595/3 "2023-04-04T06:53:47Z")

</div>

Hey, @sebavan, I mean loading in the scene only. So, by default I have my continent model loaded. And as I move my camera or zoom I need to dynamically load building models and place them over the loaded continents.

And I want only those parts should be visible which are inside the camera frustum. As I move the camera and it appears inside the camera frustum it should be loaded/visible.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 4, 2023, 7:05am UTC](https://forum.babylonjs.com/t/how-can-i-dynamically-load-part-of-my-model/39595/4 "2023-04-04T07:05:40Z")

</div>

I guess you could try [Asset Containers | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/importers/assetContainers) so that all your models are ready there and you dynamically pick what is loaded in the main model ?
