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!
Hi, i have some strange rendering issue in URP on invisible planes, when receivers are overlaps each other as you can see on picture:
https://gitlab.com/JanVrabel/shadowtest_overlaps/-/wikis/home
is there some way, how to avoid this overlaps? I did it based on your description above, how to render shadows on infinity plane, thnx a lot
Hi, to avoid this issue, please use a unique layer for each receiver and the associated projector must ignore the other layers.
Projector Manager
component does this automatically:https://nyahoon.com/products/fast-shadow-receiver/setup-projector-manager