Download

Shadows & Shadow Tint

Hello guys,

Anyone knows how or if is possible to change the cast shadow colour using bp, like in the gif below? Or only using C++

Link to the gif. (I couldn’t post the gif direct cause size and the forum only will show the link or give me a 404 error … ).
Its from the game Röki, made with Unity, here the link to the blog post about the shader they are using.

I know I could use modulated shadows but they only works with stationary light.
Also I dont think the post processing (Color Gradient > Shadows) is the best option, I tried before.

Only way is to change the ambient light colour.

If u mean Lower Hemisphere Color, the only shadow color changed are the shadow of one object over another object, like in the image below.


UE4 use physical based lighting setup. Shadows are just blocked light. So shadow can’t have any color them self.In shadowed areas you see indirect lighting. This is coming from skylight and bounce lighting. If you want to go away of PBR then you can hack some shader and do what you want but engine isn’t designed for that.

Hi Kalle :slight_smile:

So by default Unreal is not unreal :stuck_out_tongue:

Other engines also use physical based lightning. I’m asking it cause in Unity u dont need to go into the engine code modification / compile engine again, all this stuffs… its, lets say… friendly to create a new “shader model”… I just want know if/how its possible to change shadow color through material editor or its only possible through engine modification even with Forward rendering?

Thanks :slight_smile:

You can’t do that in material editor because lighting and material are decoupled in UE4. It’s simple to just change shadow color if you have single light. But what happen if you have multiple directional light. Does shadow color depend on light color? How do shadows stack? Does that affect static lighting and indirect light? Things get complicated in general case when you hop of PBR wagon.

If you have some special case that seems to be simple then it’s usually easy to do by modification right shader file. In this case you should look here. https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Shaders/Private/DeferredLightingCommon.ush#L473

Hi Kalle :slight_smile:
Yeh, thats kind sad, will be so good if the UE material editor was like the Amplify Shader / Shader Forge <3 …

So, I found this material done by Tom Looman… I tried, and this is what I got. Dont work with Directional Light, only with Spot and Point…
And I dont know what happen, when I go to work in any other material in the scene, the “colored shadow” gets bad, as u can see in the second image, I need to close the project and when I open again, its all like the first image :confused:

img 01

img 02

And below what I got with another engine, img 1: using opacity mask l img 2: light color value = green.