Search Unity

Best shadow quality/Character light setup

Discussion in 'High Definition Render Pipeline' started by originalemanuel2, Nov 21, 2019.

  1. originalemanuel2

    originalemanuel2

    Joined:
    Mar 4, 2015
    Posts:
    21
    Hi,

    I would like your thoughts about the best shadow quality/shading a character that can be achieved without raytracing in an outdoor environment with just 1 directional sunlight (or any other light). 1 light because the main light source should make the scene already look nice. Additional lights can be added later, but I'd like to have a nice version with 1 main light first.

    When I create a new HDRP Project with Unity 2019.3b10 the shadows honestly look only "ok" but not great.



    I imported a regular DAZ character and tried to have it look as nice as possible.

    What I did to have nice shadows (but only for the first 2m or so...)
    • I increased the shadow resolution to 4k in the HDRenderPipelineAsset and of course the light itself
    • I decreased the shadows max distance to 5m. That way there are also shadows showing for the eyelashes. But when I move the camera back they are disabled at some point. but not fading out but rather popping out. Looks very nasty
    • I added contact shadows


    And a comparison of the 2:


    What I need are nice shadows from a very close distance but also up until, let´s say 10m. Then the shadow cascades can do their job and reduce the resolution. But up until 5-10m I really need very high-quality shadows so all the details of small objects (like eyelashes) are also showing.

    How can that be done? What if I want to reproduce something like the Heretic Demo with a nice shadow on the character? Is that even possible with an out-of-the-box setup of Unity?

    I do think raytracing would be nice, but that is not really working on my end. I used the wizard and went step by step through the manual guide. Ambient occlusion, raytraces reflections are working but raytraced shadows are simply not working. And also it´s still experimental.

    I want to use something that is final and not experimental. So once HDRP with Unity 2019.3 is final and not experimental anymore, I want to start working with it for projects like that.

    What are your thoughts? I don´t need to have a great framerate in first place. I just want to replace rendering in Maya (with Redshift3D) with Unity as good as possible.

    Many thanks for your help/input!

    PS: I created a video showing the setup I did:
    https://www.dropbox.com/s/9cyjt8k12sn55br/Character_Lighting.mp4?dl=0

    PPS: I also archived the project, you can have a look if you want:
    https://www.dropbox.com/s/3wqni5ksdngti7l/2019.3_Lighting.rar?dl=0

    PPS: How do light layers work? I did not find a tutorial online. I'd really like to add a light for the character's eyes like they do it here: https://blogs.unity3d.com/2019/11/1...w-to-create-cinema-quality-lighting-in-unity/
     
  2. originalemanuel2

    originalemanuel2

    Joined:
    Mar 4, 2015
    Posts:
    21
  3. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    What you can do to get the best image:

    1. Use a high poly model.
    2. Use a Lit shader and deliver as many different maps as possible. Occlusion and Bent maps give you better results. Also do not forget a Detail map for things like skin pores. Really important for a close up. Also make use of a layered material.
    For details: https://blogs.unity3d.com/2018/12/19/unity-2018-3-shader-graph-update-lit-master-node/
    3. Use the highest shadow map quality.
    4. Use post processing with a high sample quality. Use Ambient Occlusion.
    5. Better shadows can be archived with real time raytracing. Currently early in preview. Also try out screen space shadows.
    6. Contact shadows might help. But in same cases they look broken. You have to find the best settings.
     
  4. originalemanuel2

    originalemanuel2

    Joined:
    Mar 4, 2015
    Posts:
    21

    Thanks a lot for your reply!

    I did all you said already in that project. Detail maps are not so much of my concern right now, I am trying to get the shadows right. But it seems that it's still dependent on the max shadow distance.

    I hope they get raytraced shadows implemented properly soon.

    Thanks again!
     
  5. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    What do you mean by "getting the shadows right"? Are you only concerning about the shadow cast by geometry? Because that is not enough. The fine details laying into the texture part. Without them you cannot have so much detailed shadows. Also you modell looks very clean and shiny. Make it hard to achieve the desired occluded look you may want to achieve. It needs more pores and wrinkles to catch the shadow quality.
    Also, your eyebrows could benefit from an extra shader. Right now they look flat.
     
  6. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633