Drop shadow on a 3D scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bashan

I have a simple 3D scene constructed from cubes. The scene runs in a viewport. I would like to show a shadow of the scene on the background (like there is some endless wall behind the scene and the shadow drops on the wall. Any easy way of accomplishing it?

:bust_in_silhouette: Reply From: Magso

An easy way to do this is to create a shadow effect using an outline mesh.
Select the mesh and click create outline mesh in the QuickHull (top panel of the scene view). Create a SpatialMaterial and tick the transparent and use point size flags. Make a gradient in the albedo and turn on proximity fade.
No doubt there’s more in depth ways of doing it using shaders though.

Thanks for your answer. I tried it and it gives some interesting result, but I don’t think it is in the direction of what I need.
What I need, for example, is if I have a simple cube, is to show a shadow of the cube falling on a wall behind it.
One pretty straight forward way of achieving it, is simply putting some very big cube stretched as a wall behind my cube, set a direct light and turn the shadow of the direct light on.
The problem is that I have many levels and in each I will have to set the wall in a different place which is not idea. I though there is en easier and faster way of achieving the same effect without an actual wall.

bashan | 2020-02-23 21:09