# Dropping an ambient shadow on ground

**URL:** <https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896>\
**Category:** Questions\
**Tags:** geometry, shadow\
**Created:** [October 13, 2023, 9:25pm UTC](https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896 "2023-10-13T21:25:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![evidanary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evidanary/32/26170_2.png) [@evidanary](https://forum.babylonjs.com/u/evidanary)\
**Post date:** [October 13, 2023, 9:25pm UTC](https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896/1 "2023-10-13T21:25:33Z")

</div>

What’s the recommended technique to create mesh accurate ambient shadows of GLB models on ground like sketchfab does.

 ![Screenshot 2023-10-13 at 2.16.16 PM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/b/6bf866980787e4debf7e86ca6fe6391a90bddcfc.jpeg)

I can think of one technique but not sure if there are better ways to achieve this:

1. Use blender to create a ground shadow and ship a separate ground shadow image. Create a rectangular Plane immediately below the placed item and apply the shadow texture. The is doable but cumbersome.

My wishful thinking is that there’s a better way to achieve this. Is there?

P.S.: Not creating a playground to know if there’s any other technique.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 13, 2023, 11:57pm UTC](https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896/2 "2023-10-13T23:57:33Z")

</div>

You can use the SSAO2 rendering pipeline to achieve something similar (search for SSAO in the forum, I think you will find plenty of references). But faking it with a ground shadow in a pre-generated texture is better for performance, if your use case allow for it.

---

<div class="post-metadata">

**Author:** ![brightMoon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brightmoon/32/9959_2.png) [@brightMoon](https://forum.babylonjs.com/u/brightMoon)\
**Post date:** [April 1, 2024, 7:05am UTC](https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896/3 "2024-04-01T07:05:17Z")

</div>

> [@Evgeni\_Popov](#):
>
> pre-generated texture is better for performance

How to use program pre generation？

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 1, 2024, 9:18am UTC](https://forum.babylonjs.com/t/dropping-an-ambient-shadow-on-ground/44896/4 "2024-04-01T09:18:02Z")

</div>

I think you can use Blender (or Maya, 3DSMax, etc) to generate the shadow and bake it into a texture.

You can also use a shadow plane:

> [@Shadow Contact in Babylon - ambient occlusion](https://forum.babylonjs.com/t/shadow-contact-in-babylon-ambient-occlusion/47704/9):
>
> Here’s how you can do it on a plane with an opacity texture: I think we should discuss how we can package it so that it’s easy for users to take advantage of it…
