Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question How to handle light in trees?

Discussion in 'High Definition Render Pipeline' started by FrostLars, Jan 19, 2024.

  1. FrostLars

    FrostLars

    Joined:
    Dec 19, 2022
    Posts:
    2
    I am having some problems with trees in Unity, getting them look very blown out by lights when the camera is facing a light source behind the treet.

    I have trees created both by hand in Blender and with SpeedTree. The issue persists no matter where the tree is made. The shader also does not appear to matter either, as both the standard HDRP Lit shader has the problem and I'm also having the issue while using TVE Plant Shaders.

    I've made sure my normals are not too strong in the normal maps and this does not seem to resolve the issue either. Adjusting smoothness does not resolve the issue and it is definitively not an issue with SSS.

    I'd love to have some input on how to resolve the issue as I'm really at wits end on how to tackle the problem at this point. I'm not a programmer so if the issue requires knowledge of coding I might need an extra clear explanation on how to proceed.

    I've attached some pictures of the issue, as well as a picture of what the trees look like when not facing the light source in the scene.
     

    Attached Files:

    soleron likes this.
  2. FrostLars

    FrostLars

    Joined:
    Dec 19, 2022
    Posts:
    2
    Bump - No one has any ideas for how to tackle this? It really makes it impossible to have an outdoor environment in Unity.
     
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,334
    What effects are used in the scene volume ?

    Also if possible post images of the full shader and post effects settings for reference
     
  4. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,652
    tbh it looks like an sss problem, also, which version of Unity are you using?
     
  5. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    579
    Looks like crap. I agree.
    I have not seen it ever look good in Unity. Sorry.
    Chances are we have to live with that OR have someone do some special shader.
     
  6. agriffin

    agriffin

    Joined:
    May 10, 2012
    Posts:
    20
    It looks like the issue may be related to the normals of the leaves meshes. A common art technique for trees is to project smoothed normals onto the leaves so that they don't look like flat cards, but it does not translate well in HDRP.

    You can confirm this by changing the "Normals Mode" on the mesh import from "Import" to "Calculate". If this is indeed the issue then you may want to update the normals on the mesh itself instead of the importer.

    Here is a simple example using the Lit shader. Adding translucency and occlusion to the end result will make it look better and not so flat like in my screenshot.
    tree-normals.png
     
    Jack_Martison likes this.