Model sometimes not rendering three js

Sometimes my model is not rendering correctrly depending on where my camera is positionned (I supposed) see the 3 screens. I don’t know why ??? Thank for helping.



I try to put the frustumCulled = false but nohing changed.

constructor()

{

    this.main = new Main()

    this.scene = this.main.scene

    this.resources = this.main.resources

    this.resource = this.resources.items.holo

    this.setModel()

   

}

setModel()

{

    this.model = this.resource.scene

    this.model.scale.set(2.5,2.5,2.5)

    this.model.position.set(-20,10,20)

    this.scene.add(this.model)

    this.model.traverse((child) =>

    {

        if(child.isObject3D)

        {

            child.frustumCulled = false;

        }

    })

}

@Mugen87 only you can save me I guess…

I guess the problem comes from the model, the ones that are completely filled are rendering normally but the models that have some holes in it do not render correctly, try different models

1 Like

Can you please share on of your models that produces the issue?

@Mugen87 thanks for replying. :slight_smile:

this two :

and when I put children transparency to true on this one : Wonderful World - Download Free 3D model by Tycho Magnetic Anomaly (@Tycho_Magnetic_Anomaly) [3b377d3] - Sketchfab, it produces the same issue

1 Like

I also had a seemingly random (but actually depending on viewing angle) visibility problem, where the mesh would either be completely shown or completely hidden.

I was able to resolve that by calling computeBoundingSphere() on the geometry.

2 Likes

I’ve tested with the “Earth hologram” asset but I’m not able to reproduce the issue in the editor. The bounding volumes look good so far so a wrong culling should not be the root cause of this issue.

Maybe you can share a live example that demonstrates the issue.

@Mugen87 the models looks fine in my editor too. You can try it online directly- : https://issammerikhi.vercel.app/ Just move you right or left arrow to do a full circle you will see the earth disappearing. You can notice that when the earth disappear, the movement are more smooth.