[Help] Creating a light vector from blueprint?l [Cel Shader]

Hello guys. I’m trying to create a light vector for a self shadowing material. I’m currently using the same technique that’s used on the clouds in the styalized showcase. What it basically does is that it creates a fake light vector from a Material Parameter Collection. This works great for creating cel shading with no noticable artifacts(very similar to UDK), the only probem is that it isn’t affected by shadows or other light sources.

As shown here:

I’ve read other threads discussing how to create a light vector similar to UE3/UDK by using a blueprint to calculate the vector, like here, here and here. I’m too much of a novice when it comes to blueprints to understand how to use these techniques in my own shader, so I’m asking you guys if you have the time to help me out.

Here’s my material setup so far:

From what I’ve understood in the threads I’ve read is that they use a Vector Parameter that gets changed by a Blueprint to create an actual Light Vector from the lights in the scene instead of a Collection Parameter using a Material Parameter Collection to create a fake Light Vector from an imaginary light (which is the method I’m currently using).

Any help regarding this will be much appreciated!

Here’s some bonus screenshots of the current shader used in a scene:

Thanks for your time.


You’re on the right track by placing the light vector in a parameter collection. You don’t want to replace that with a blueprint: you want to update that vector parameter from your blueprint instead.

Take a look at the skysphere blueprint that comes with the engine, this uses a similar approach to transfer the sunlight direction.

If you want to have your shader influenced by multiple light sources you have to add multiple light vectors and a weighting factor to you parameter collection.

Finally note that this approach won’t really work with shadows at all.

Alright, thanks! I will try it out.