Shadow malfunction on mesh change?

When I change the shape of the geometry it seems that the shadow misbehaves
(there is a slight gap on the bottom of the poles, but I assume that is my shadowbias not being set properly.)

The initial state of the mesh is as follows, which is correct. In the code behind the generation of the mesh, I am resizing the parameters and generating a new object to render using threejs.

As you can see, the resulting mesh after resizing has a wrong shadow, and the way it seems to me this has nothing to do with shadowbias. Does anyone know what could be going on?

Strange. Do you mind demonstrating the glitch with a live example?

This looks like maybe the lights shadow camera render volume is clipping the model. Try moving the directional light further back along its look vector.

1 Like

Iā€™m afraid a live sample would be hard, considering the meshes are generated at runtime and the system is owned by the company I work for and I cannot publicize the method. @Mugen87

@gkjohnson I will try this tomorrow when I get back into the office :slight_smile: