Here is something cool that I only just found out about and wanted to share with you all!
Did you know you can control what a specific asset’s shadow looks like?
If you would prefer to watch my video version, check it out here
Below I have a square mesh plane with a simple material applied to it creating a square shadow.
First off lets head into our material and change our Blend Mode to Masked.
This will activate the Opacity Mask pin, which we then need to plug in a Texture Sample and assign a texture to it. In my case a circle.
If we go back to our level you can see we have a circle mesh from the masked material and its shadow is based on it
Now let’s go back to our material and create a new node called Shadow Pass Switch. Plug in a circle texture into the Default pin and then make a new Texture Sample with a different shape (in my case a square) and plug it into the shadow pin.
If we go back to our level you can see we have a circle mesh but with a square shadow!
Now that we can get access to this shadow we can do more interesting things with it like playing around with the texture we are using for the shadow mask.
Or adding movement to the shadow using a paner node.
There are so many possibilities…
And this works in exactly the same way in Unreal Engine 5 as well!, just look for that Shadow Pass Switch node.
You can have a lot more control over the shadow of an asset. Hopefully, you can see the potential usefulness of this and go ahead and make some cool stuff with it!
If you want more quick tips & tricks FOLLOW ME ON TWITTER @cbGameDev
Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/