Dropping an ambient shadow on ground

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

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.

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.


How to use program pre generation?

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: