How to blend materials in horizontal direction

Hi, I managed to block shader from light direction in anime style. And I try to blend 2 materials together in horizontal direction like in genshin impact. I searched all over google but no luck. Is there any way to do that? I want to do something like this.

This is my genshin impact model now:

349567-ezgifcom-gif-maker.gif

And this is what I want.

This is my simple node that use direction to change material for each degree:

You’re switching when the angle reaches a certain amount, which is what we see. You need to lerp between the two values depending on angle of the camera ( I guess, if you’re not using light ).

It’s a bit unclear to me what’s happening. It all hinges on the direction variable? What values can that variable take?

Then you seem to have a normal face and a slightly darker face, and you want to fade between them based on the direction?

Is that right?

Hi, thank you. So which values should I lerp here? Sorry I’m very new to material. I’m using light for angle here.

Hi! Direction parameter come from actorBP that get value direction from Light Source in level. So now somehow I can manage to do transition but I don’t want this. From picture below, I want to it to fade in arrow direction instead of fade out entire material. Is this possible?

349603-ezgifcom-gif-maker.gif

And yes, I want it to fade base on light direction. Thank you very much.

Something along the lines of ( this will not work out of the box ):

Sorry, didn’t have much time earlier.

What I’m saying is, just use the lerps, don’t use IFs.

Like this:

349634-lerp.gif

Much easier if you map the angles to 0-1 in the character BP.

1 Like

Excellent :slight_smile:

1 Like

Hi! Thank you very much for your help! I did it but the result is not as I expected. However I tried remap value range node around so I solved this by using it.

Here is the result I want. I blend 2 alpha together by node above. Thank you again!

349647-ezgifcom-gif-maker.gif