Search Unity

HDRP MaskMap Channels and Decals question

Discussion in 'Graphics Experimental Previews' started by Ziboo, Jul 12, 2018.

  1. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    326
    Hi,

    I have two simple questions for you devs ;)

    1. Why did you use the alpha channel to store the Smoothness instead of blue channel ? I'm pretty sure that smoothness will always be used compare to Detail (B).
      We have to use DXT5 over DXT1...
      Am I missing something ?
    2. Will you have the options to set Layers for decals ? I saw that materials have option "Enable Decal", but that is not enough. (ex: decal that affect only Characters and not Environment)
    Thanks
     
  2. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    516
    Because the alpha channel is compressed at a higher quality than the blue channel, which can make a large difference for smoothness maps.
     
  3. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    326
    bump

    Any news on supports for layers on decals ?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    299
    We should support decal gameobject beeing culled depending on the current camera layer mask (was missing, I filed a bug for it), but it's not possible to have a layer mask per decal projectors.
     
    BATTLEKOT likes this.
  5. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    326
    Yep I wasn't talking about culling.
    You know that without a layer system it's kind of useless.

    If I put decals for the environment, I don't really want them to project on characters.

    Is that on the roadmap though ?
     
  6. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    299
    @Ziboo: You can disable "support decals" on your character's material. To further more avoid bad projection of decals, you can use mesh decals (simply assign a decal material to a mesh).
    But a layer mask per decal project would raise the cost of the rendering, and is not on our roadmap for the moment.
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,185
    Use the tickbox on HDRP materials to prevent decals drawing on characters.

    For character "decals" we will probably go with some kind of shader graph to blend an effect at a location of some sort (undecided but that's what's needed for perf).
     
  8. hertz-rat

    hertz-rat

    Joined:
    Nov 3, 2019
    Posts:
    29
    Is this still the case in 2020? Its a bit of a large, error-prone task to go through every single material in the project and remember to tick that checkbox.

    Also, it would be nice to have a bullet hole decal we could place on a unit without needing to have that unit's selection indicator draw on it as well.

    Does anybody know of a good workaround for this? What about hot swapping out a unit's materials with ones pre-configured to have the effects showing? Eg, have 40 materials per unit, each with a different combination of damage patterns?
     
    Gooren likes this.
  9. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    170
    I second that question.
     
  10. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    613
  11. hertz-rat

    hertz-rat

    Joined:
    Nov 3, 2019
    Posts:
    29
unityunity