Babylon animation blinks when rendering pixi animation o top of it

Hi @Deltakosh and the rest of the engineers of the new world.
I am rendering Pixi container behind and in top of Babylon scene. But when i animate pixi sprite in container that is on top of the Babylon scene (at that moment gltf animation is played), that babylon animation blinks.
So, just in that moment, when i Start to animate pixi sprite, gltf animation blinks for a moment.
Do someone know to tell me how to fix this?

Hello, this is really hard to tell without a repro, is it possible to share something ?

1 Like

I can share, but everything is just ordinary.
I followed the example given here Edit fiddle - JSFiddle - Code Playground
And also this Babylon.js and Pixi.js | Babylon.js Documentation

I will try to reproduce this in sandbox to share with you. Tommorow morning.

But i think that i am rendering well containers, and also animations works fine. Just that moment when pixi animation (i read it from the spritesheet using JSON) starts on top of the gltf animation that is already started, that gltf blinks for a moment.

Sorry for trouble.


@sebavan After a lot of unsuccessful attempts to fix this, before i share this with you in playground, i fixed my bug.

engine.runRenderLoop( ()=> {
            scene.autoClear = false;

So, what i made. I rendered secondContainer before i called wipeCaches(true).
If you could, please explain to me your opinion, why this happened?

I partially succeeded in finding a logic why can this fix the bug so, i tried, but i dont know exactly why that was the problem?

Thanks a lot for your time!

wiping the cache helps babylon to be starting on a fresh gl state my guess is that the second container was setting a state we needed to reset somehow in babylon.

1 Like