How to change the shadow side color of a model

Hello everyone,

I’m looking for a way of changing the shadow color of the shadow side of a model, I know this seems to be an odd desire, but it is a workaround that I figure out to fake a floor light emission, like neon or hot lava.

Another way would be to create a spotlight under the floor pointing upwards that only affects the player model, but not the floor, I did not check if it is possible at the moment.

In the last case scenario, I was also thinking about digging through the toon material implementation to see if it’s possible to tweak something and customize the model shadow side color since it seems to use gradient maps, but I’m probably overthinking =(

Thanks for your time folks.

-Escobar

Do you mean something like this ? As for the shadows - afaik it’s not possible to change the color of the shadowmap (ex. as mentioned here )

This hemisphere light might be what I’m looking for if that works will totally diminish the dark side on the model, I’m just afraid that it will mess up the light composition from the rest my scene, I was looking for a way of affecting only selected models

I’ll give it a shot

One thing that may help - if you set the light from above to 0x000000 you will get only a highlight from below.

As for highlighting only specific models - I’m not sure of that’s possible without a separate material with a separate set of shaders (one that ignores the hemisphere light influence.) Haven’t really played with custom shaders in three enough to help with that though.

1 Like

Thanks, mjurczyk that was the best approach,

Today I found this https://github.com/mrdoob/three.js/issues/5180 may help anyone looking for different approaches

Before

Hemisphere light (sky: blue, ground: pink)

Hemisphere light (sky: black, ground: pink), exactly the way I was looking for =D

Bonus, the animated version xD

1 Like