Announcement

Collapse
No announcement yet.

Shadows & Shadow Tint

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Only way is to change the ambient light colour.

    Comment


      #3
      Originally posted by jonimake View Post
      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.

      Click image for larger version

Name:	939a93755cbbb47c266026b4f0ea3d0b.jpg
Views:	1
Size:	154.4 KB
ID:	1461685
      Click image for larger version

Name:	9330d909b681c541e0f6261f6fae1995.jpg
Views:	1
Size:	151.7 KB
ID:	1461686

      Comment


        #4
        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.

        Comment


          #5
          Originally posted by Kalle_H View Post
          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

          So by default Unreal is not unreal :P

          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

          Comment


            #6
            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/UnrealE...ommon.ush#L473

            Comment


              #7

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

              Click image for larger version

Name:	amplifyoutput.png
Views:	1
Size:	103.1 KB
ID:	1462570

              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 :/

              img 01

              Click image for larger version

Name:	tommat.jpg
Views:	1
Size:	141.3 KB
ID:	1462571

              img 02

              Click image for larger version

Name:	shadowcolorglitch.jpg
Views:	1
Size:	134.4 KB
ID:	1462572


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

              Click image for larger version

Name:	uamplifyshadowcolor.jpg
Views:	1
Size:	152.1 KB
ID:	1462573

              Comment

              Working...
              X