Search Unity

Question HDRP material that ignores indirect lighting

Discussion in 'High Definition Render Pipeline' started by kromblite, Nov 28, 2022.

  1. kromblite

    kromblite

    Joined:
    Mar 19, 2014
    Posts:
    72
    So I'm fairly new to HDRP, and despite the rather steep learning curve, I'm really liking what I see.

    One thing I'm struggling with, though, is creating a material for a bottomless hole in one of my objects. It's just a square hole with a black bottom, and a gradient on the sides so that the top of the hole fades into the blackness.

    Problem is, the indirect lighting makes it REALLY clear that there's just a black material rather than an actual hole. Plus, I have to worry about light glaring off the material. I tried using a mask map, but either I'm not using it right, or that's not the solution. I also tried a pitch black unlit shader, but then I have no way of using a seamless gradient on the sides, so it just looks like a black square.

    What's the correct way to create an HDRP material to create the illusion of a hole?
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    I don't know if it is a "correct" way (I am learning too!), but what I did was put dark localized fog to absorb light. See
    around 1:55 for example.
     
  3. kromblite

    kromblite

    Joined:
    Mar 19, 2014
    Posts:
    72
    Fog didn't work out, but I WAS able to take the hole, apply a regular material to it, and then apply a second, semitransparent, unlit shader over it. That did the trick.
     
    akent99 likes this.