Shadows arent updated

Hey, im trying to include images of my scene to the print document for printing.
Im making a scene and add lights once, replacing the model, taking a image of each one. I made a queue, that waits for each one to load, then renders and saves the image.
My problem is that the first model looks fine, but the second has the shadow of the first model and does not have a shadow of its own. So the shadow is not updated. I tried to update everything in my scene like so

  this.camera.updateProjectionMatrix();

  this.directionalLight.updateMatrix()
  this.pointLight.updateMatrix()

  this.directionalLight.shadow.camera.updateProjectionMatrix();
  this.pointLight.shadow.camera.updateProjectionMatrix();
  
  this.scene.traverse(o => o.updateMatrix())

  this.imageRenderer.setSize(thumbWidth, thumbHeight)
  this.imageRenderer.setPixelRatio(window.devicePixelRatio)

  // Render
  this.imageRenderer.render(this.scene, this.camera)

  // Saving

How do I update my shadows?

I may be wrong, but that’s kinda totally not possible. They update automatically on render (unless these are baked shadows.) :sweat_smile:

Shadow of the first model is still there probably because the first model is still there (looking at the screenshots, that’s seems true.) The second model may not have castShadow enabled - but it’s hard to tell from that part of code.

Okay you’re right. I guess the callbacks that were called when finished loading we’re not right. Cant really figure out how it happened exactly, but I got it working by creating a new scene, camera, renderer, each time. Have to fix the callbacks first till I can say more.
Thanks!