Announcement

Collapse
No announcement yet.

high-res real time shadows

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

    high-res real time shadows

    Is there anything I can do to make the real-time shadows of the directional light look sharper/have more resolution?Click image for larger version

Name:	a0.jpg
Views:	244
Size:	357.6 KB
ID:	1801090

    #2
    increase shadow map resolution?
    use raytracing?

    Comment


      #3
      Combine regular CSM with Distance Field Shadows. This way you can use more of the cascade for close resolution.

      https://docs.unrealengine.com/en-US/...ing/index.html
      https://www.casualdistractiongames.com

      Comment


        #4
        Originally posted by OptimisticMonkey View Post
        Combine regular CSM with Distance Field Shadows. This way you can use more of the cascade for close resolution.

        https://docs.unrealengine.com/en-US/...ing/index.html
        ok you mean add this?Click image for larger version

Name:	b1.jpg
Views:	220
Size:	212.9 KB
ID:	1801100

        Comment


          #5
          Originally posted by YuuJin View Post
          increase shadow map resolution?
          use raytracing?
          turned on ray-tracing but still having issues, for instance the shadow is not projected correctly due to Bias as you can see below there is no shadows (green arrows) at the corner of each building:
          Click image for larger version

Name:	t1.jpg
Views:	226
Size:	248.4 KB
ID:	1801117

          Comment


            #6
            Originally posted by Heavy Metal Fox View Post

            turned on ray-tracing but still having issues, for instance the shadow is not projected correctly due to Bias as you can see below there is no shadows (green arrows) at the corner of each building:
            Click image for larger version

Name:	t1.jpg
Views:	226
Size:	248.4 KB
ID:	1801117
            None of those settings do anything to raytraced shadows. If changing them changes the shadows, then you're not using raytraced shadows. You're using cascaded shadow maps.

            Comment


              #7
              There already are a ton of threads covering this, you can just google it, But, heres a little suggestion not a lot of people know, lower shadow bias to 0.3 and increase shadow filter sharpen to 0.2, This looks better, but costs literally nothing to use, and works on any light you put in your scene. You may want to sharpen further if you get mild artifacting though.

              Comment


                #8
                Originally posted by Bits360 View Post
                There already are a ton of threads covering this, you can just google it, But, heres a little suggestion not a lot of people know, lower shadow bias to 0.3 and increase shadow filter sharpen to 0.2, This looks better, but costs literally nothing to use, and works on any light you put in your scene. You may want to sharpen further if you get mild artifacting though.
                Tried both values, unfortunately it didn't change anything.
                I should mention that the camera is faraway from the buildings with a high focal length of 100 (I am going for a semi-orthographic look)
                Also note that this happens even when raytraced is turned onClick image for larger version

Name:	z2.jpg
Views:	182
Size:	41.1 KB
ID:	1802033
                Attached Files
                Last edited by Heavy Metal Fox; 08-17-2020, 05:36 PM.

                Comment


                  #9
                  That raytracing toggle does nothing unless your project has raytracing enabled.

                  see here: https://docs.unrealengine.com/en-US/...ing/index.html

                  Raytraced distance fields requires you have distance fields enabled, but it will probably produce bad results for this scene. It is intended for far shadows, where cascaded shadow maps become too expensive.

                  Comment


                    #10
                    Raytracing is activated in project settings.
                    So how can I fix the bias issue here? Normally in raytracing you don't worry about that (only in shadow maps) so I don't know why my shadows don't start from the bottom of each building?

                    Comment


                      #11
                      Set your directional light's source angle to 50, what's it look like?

                      Comment


                        #12
                        Originally posted by Arkiras View Post
                        Set your directional light's source angle to 50, what's it look like?
                        shadows get super blurry

                        Comment


                          #13
                          I managed to make the shadows look sharper, but in terms of bias is still not rendering "complete" shadows because the camera is too far.Click image for larger version

Name:	bias.jpg
Views:	182
Size:	441.6 KB
ID:	1802084

                          Comment


                            #14
                            Originally posted by Heavy Metal Fox View Post
                            shadows get super blurry
                            No idea what to tell you then. AFAIK with raytraced shadows, it shouldn't make any difference how far away you are. I am not able to reproduce your problem either.

                            Literally the only thing I can think of that could be wrong is that your mesh is not actually on the floor.


                            Comment


                              #15
                              You have the wrong values for Distance Field Shadow Distance and Dynamic Shadow Distance Movable Light. Both of those shadows are rendered between point A (camera) and point B (set distance from camera). Your DF shadows are set to render between 0 and 20,000 Unreal Units, and your camera is way farther than 20,000 from the buildings and the ground. Set the DF distance to at least 200,000, and the CSM Movable Light distance to the same, simply to see if it renders the shadows. Another thing I notice is the angle of the directional light in reference to the building tops and ground is so sharp that it's producing short shadows. The shadows are much shorter than the height of the buildings. So, any shadows rendered for the buildings that shadows aren't at corners or the base of those buildings for...are going to be rather short when they do appear.

                              Note: When Movable Light Distance (in CSM settings) is set to 0, it disables that shadowing.

                              The issue could be worse if Shadow Bias is set too low or too high, but it's likely not affecting it yet visibly due to the shadows not rendering at the particular camera distance in the screenshot. For the other CSM settings, increase the cascade count higher to get sharper, more defined shadowing at distances. Set exponent to distribute the shadows closer to the camera, and transition fraction to 0.01. 0.3 is transitioning between shadow cascades at 30% of the distance for each cascade, so a looong, noticeable transition...especially if the shadows have a rendering problem or artifacts.

                              Comment

                              Working...
                              X