3D object cloned mesh shadow

Hello, i try to clone 3D imported object and add shadow to it. I don’t know how to do it properly.

Can you help me ?

Thank you


or with the 3D object inside (github)


Hey @thomas_e

Here’s some great documentation that talks through the basics of how to do shadows in Babylon.


Most simple answer is that after your assets are loaded into the scene, you need to do the following actions:

  1. add a shadow generator and attach it to the a light
    var shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
  2. then you specify which objects in the scene should cast shadows from that light source:
  3. and finally you need to specify which objects in the scene should receive shadows (shadows cast onto these objects)
    ground.receiveShadows = true;

Hope this helps a bit!


I already done this thank you. But when i clone a mesh with .clone();
I can’t add shadow to the cloned mesh…

Hmm check this out.


In this playground, I created the sphere on the left with meshbuilder, and then I the I cloned it to create the sphere on the right.

After adding both of the spheres to the shadow list, they both generate shadows.