# Parts of model popping in/out (glTF)

**URL:** <https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523>\
**Category:** Questions\
**Created:** [September 29, 2020, 1:20pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523 "2020-09-29T13:20:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![efsjouw](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@efsjouw](https://forum.babylonjs.com/u/efsjouw)\
**Post date:** [September 29, 2020, 1:20pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/1 "2020-09-29T13:20:42Z")

</div>

I’ve noticed that some 2d planes in my viewer keep popping in and out all the time when the camera get’s too close, they don’t appear to have this problem in the sandbox.

Could this be something to do with the minimum clipping plane or something? I can’t really share a playground because I am not allowed to share the models.

I’ve tried adjusting camera.minZ but it doesn’t seem to help.

I do have this warning in the console:  
GL\_INVALID\_OPERATION: Feedback loop formed between Framebuffer and active Texture.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 29, 2020, 5:28pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/2 "2020-09-29T17:28:24Z")

</div>

Hey can you provide a repro in the playground  
cc @bghgary

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 29, 2020, 8:14pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/3 "2020-09-29T20:14:02Z")

</div>

> [@efsjouw](#):
>
> I can’t really share a playground because I am not allowed to share the models.

Do you need to share the models? It sounds like this issue will exist even with simple models. It’s difficult to help if we can’t repro the problem.

---

<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:** [September 30, 2020, 12:44pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/4 "2020-09-30T12:44:21Z")

</div>

Yup the feedback loop issue would normally not come from the model but the fact you are rendering in an Render Target via a post process or a mirror but using this exact texture during the rendering creating a loop.

---

<div class="post-metadata">

**Author:** ![efsjouw](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@efsjouw](https://forum.babylonjs.com/u/efsjouw)\
**Post date:** [September 30, 2020, 12:59pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/5 "2020-09-30T12:59:23Z")

</div>

No it’s not an issue with the models, don’t really have enough time right now to set something up properly but maybe you can see something wrong in this scene setup?

> **[babylonjs3333 - Pastebin.com](https://pastebin.com/8YneZFgP)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<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:** [September 30, 2020, 1:16pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/6 "2020-09-30T13:16:41Z")

</div>

The code is rather large, I ll wait for a tiny repro in the PG as it might be easier to isolate the issue.

---

<div class="post-metadata">

**Author:** ![efsjouw](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@efsjouw](https://forum.babylonjs.com/u/efsjouw)\
**Post date:** [October 16, 2020, 10:11am UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/7 "2020-10-16T10:11:45Z")

</div>

Thing is I am not allowed to share the models so I am having issues reproducing this behaviour.

[https://streamable.com/3aiqk7](https://streamable.com/3aiqk7)

There are some flat geometries present for rotors ed. which have alpha textures but the rest of the geometry that is popping in and out are not.

Anyways, when I drag this model into the babylon sandbox it works fine.

This is sort of my setup minus the loading of the model, nothing fancy really…

> **[Babylon.js Playground](https://playground.babylonjs.com/#000LZW)**

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [October 16, 2020, 4:31pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/8 "2020-10-16T16:31:01Z")

</div>

After loading the model, if you call scene.createDefaultCamera(…), does it work? I’m thinking the size of the model might be the issue.

---

<div class="post-metadata">

**Author:** ![efsjouw](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@efsjouw](https://forum.babylonjs.com/u/efsjouw)\
**Post date:** [October 19, 2020, 12:02pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/10 "2020-10-19T12:02:35Z")

</div>

> [@efsjouw](#):
>
> When I tried to use default camera and environment it also did this behaviour, and yes also when using default the model appears to be quite small.
> 
> Does the sandbox scale it?

When I tried to use default camera and environment it also did this behaviour, and yes also when using default the model appears to be quite small.

Does the sandbox scale it?

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [October 19, 2020, 9:34pm UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/11 "2020-10-19T21:34:20Z")

</div>

The sandbox oddly does something different:

> <https://github.com/BabylonJS/Babylon.js/blob/b9bd620a9252d8d310797e2b3e29127d406cfba7/sandbox/src/components/renderingZone.tsx#L118-L132>

There may be an issue with `scene.createDefaultCamera`.

---

<div class="post-metadata">

**Author:** ![efsjouw](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@efsjouw](https://forum.babylonjs.com/u/efsjouw)\
**Post date:** [October 20, 2020, 8:47am UTC](https://forum.babylonjs.com/t/parts-of-model-popping-in-out-gltf/14523/12 "2020-10-20T08:47:33Z")

</div>

Huh okay, it appears I was using some other version of babylon.js that broke a lot more things under the hood than would be apparant at first glance 😑 . I found out my bounding boxes were also broken somehow and was really confused as to how the sandbox would be able to properly set the min/max to world bound values.

But now I just copied over the version that was referenced in the sandbox script tags and everything appears to work fine now 😃

Also weird git shows no changes, maybe it had something to do with the babylonjs.loaders I was using…
