Search Unity

Resolved HDRP Terrain details meshes lighting problem

Discussion in 'High Definition Render Pipeline' started by JGiguere, Jun 7, 2022.

  1. JGiguere

    JGiguere

    Joined:
    Jun 7, 2022
    Posts:
    2
    Hello guys,

    I am working with HDRP 12.1.5 and using the Terrain tool, I am using the "Paint details" tool to place various prefabs such a grass and rocks. I have a problem where the prefabs placed on the terrain with the paint detail tool seems to receive no lighting/shadows. The terrain itself receive shadows, but not the detail meshes.

    Here I made a prefab with basic white boxes, those with the correct lighting were placed by hand, those with the broken lighthing are placed with the terrain details tool. It is very clear there's a problem when you compare them:

    Capture32.PNG

    The terrain settings:

    upload_2022-6-6_21-44-18.png
     

    Attached Files:

  2. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Enable contact shadows and turn it on.
    You have to enable it in a few places (as usual with HDRP)
    enable in active HDRP asset, Directional light, post processing global volume

    default distance is 50, you can increase it and mess with the other settings

    Also try disabling light layers in your HDRP asset. There used to be a bug that messed up detail visuals when light layers were enabled. It's fixed in some version but not sure if yours was one of them or not.
     
    JGiguere likes this.
  3. JGiguere

    JGiguere

    Joined:
    Jun 7, 2022
    Posts:
    2
    Thank you! The problem was indeed coming from the light layers, fixed as soon as I disabled them.
     
  4. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    in case anyone else stumbles on this.
    The light layer bug is fixed from HDRP 14.0.3 ( 2022.1+) only.

    Great catch as always @PutridEx :D