I am attempting to create a material that self shadows. It's a brick wall and it uses bump offset for parallax. The one thing it is missing it self shadowing bricks. I couldn't find any resources on it except an old UDK/UE3 tutorial which I tried: http://oliverm-h.blogspot.de/2012/09/how-to-create-self-shadowing-materials.html
When I plug it all in though I get this message: "Error [SM5] (Node LightVector) LightVector can only be used in LightFunction or DeferredDecal materials"
The self shadowing part of my material is exactly like his, but here is an image anyway: http://grab.by/zBMc
Since we can't use the light vector node like this anymore, does anyone have any idea how to achieve these same results? Any help is appreciated.
Hey joshezzell -
You can achieve this effect but it can be costly from a performance standpoint becuase you are having to create a dynamic material instance for the object you want to use that calls for the forward vector of a light actor. The material setup is exactly as in UDK with the exception of changing the Light Vector to a Vector Parameter which we adjust in a blueprint. In the blueprint I run a check for a specific type of light (in my case spotlight) and find the closest then get its forward vector.
Hope this gets you started -
answered Aug 22 '14 at 06:41 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here