Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question HDRP Custom Trees

Discussion in 'High Definition Render Pipeline' started by XDrakewolf, Oct 30, 2020.

  1. XDrakewolf

    XDrakewolf

    Joined:
    Jul 21, 2019
    Posts:
    5
    As the title says im going through a problem with custom low poly trees on unity. These have their normals edited (spheric foliage) but ends having really weird lightning with specularity and not proper shadows. I saw people doing this method and having really good results and im not searching any fix for it :(
    Is someone have some tips how to approach this problem i will be more than grateful, dont have too much experience with the engine.
     

    Attached Files:

    • Tree.png
      Tree.png
      File size:
      286.1 KB
      Views:
      359
  2. RogueCode

    RogueCode

    Joined:
    Apr 3, 2013
    Posts:
    230
    I also had weirdness with something like this (not sure if the same) and turning on subsurface scattering with the default foliage diffuse helps a bit to even it all out. But I still get horrible specular even with smoothness on zero.
    This isn't a problem with most objects but because the leaves are a flat plane, it means you see large areas of lighter ones.
     
  3. XDrakewolf

    XDrakewolf

    Joined:
    Jul 21, 2019
    Posts:
    5
    Tried that but suddenly the trees are overcolored, i think they are even worse. :(
     
  4. RogueCode

    RogueCode

    Joined:
    Apr 3, 2013
    Posts:
    230
    Make sure you set the diffusion profile on the material.
     
  5. XDrakewolf

    XDrakewolf

    Joined:
    Jul 21, 2019
    Posts:
    5
    Doesnt work for me, im running out of options, dont know how to approach this.
     
  6. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,751
    Hi I'm currently trying to figure out how to make trees look good with custom normals, also I realize this question is 3 years old by now but I would like to give you what I know. The reason you get bad specular is because of the normals obviously, so far you can't have custom normals and tangent plane specular at the same time unless you add another pass in the shader for specular separately. To be honest, the only way to do this I found with the help of a friend is that, you can remove the shading from the normals completely, have the same amount of light from front to back, then just use vertex AO for shading. If you want to have custom normals on foliage, you will need to live with the broken specular. Also, you can't get rid of the fresnel in Unity, especially if you use custom normals. Hope that helps in some way.
     
  7. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    546
    You're absolutely correct regarding the 0.5 Fresnel specular clamp; it's not possible to remove it inherently, especially for leaves. However, by turning off the 'Affect Specular' option ( on the Directional light), you can eliminate it, though this will affect the entire scene and may result in zero specular, which might not be ideal, there is also and option in the project settings for the entire project, but again, you may not want this.

    I strongly suggest experimenting with your full lighting pipeline in place.

    In many of our test scenarios (attached), utilizing medium-distance fill contact shadows helped fill in gaps, reducing the noticeable and glaring Fresnel effect.

    It's important to note that while this is still a workaround and not a perfect solution, evaluating your final lighting process can help fix, obscure, or tame much of the issue.

    Be sure to use lighting debuggers in the render pipeline debugger to identify the lighting pass(es) affected by Fresnel. Remember to preview lighting workflows before applying post-processing effects.
     

    Attached Files:

    florianalexandru05 likes this.