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?