Parts of model popping in/out (glTF)

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.

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

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.

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.

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?

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

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

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…

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

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?

The sandbox oddly does something different:

There may be an issue with scene.createDefaultCamera.

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 :expressionless: . 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 :smiley:

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

1 Like