In AR application, there are needs for projecting shadows on invisible plane to blend shadows and real image. It can be done by setting a transparent plane in the scene, but rendering an invisible transparent plane and rendering shadows on all the area of the plane have too much overhead. I would like to introduce a better way which uses our Fast Shadow Receiver.

As a tutorial, I will use Basic sample scene to explain how we can use Fast Shadow Receiver to project shadows on an invisible plane.

First, remove the MeshRenderer component from Plane object to make it invisible. If you don’t need a collider component as well, you can replace Plane object with an empty game object.

Create an Empty GameObject under BlobShadowSample/BlobShadowProjector object and rename it ‘Plane Shadow Receiver’ (the position in Hierarchy and name of the empty game object do not matter at all).

Add ‘Scripts > FastShadowReceiver > Infinite Plane Shadow Receiver’ component to the empty game object created above.

Set BlobShadowProjector object to Projector field and set Plane object to Target field.

Do the same thing to HardShadowProjector and SofrShadowProjector.

That’s it!

Links

2 thoughts on “Project shadows on invisible plane

Leave a Reply

Your email address will not be published. Required fields are marked *

Anti Spam Code *