Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Decal problem in HDRP

Discussion in 'High Definition Render Pipeline' started by Velo222, Sep 6, 2019.

  1. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    I'm on an HDRP kick right now, so I'm having lots of questions, but here's another one. I am using the decal component on some of my characters in my game, and I can see the decal perfectly fine in the "Scene" view. But in the "Game" view it doesn't show up at all. The decals don't show up in play mode either. But they are visible and seem to work fine in the Scene view...... which seems really odd.

    Here are some pics:

    The decal shows up in the Scene view
    Unity_HDRP_DecalProb1.png


    Doesn't show up in Game view
    Unity_HDRP_DecalProb2.png

    At first, I was thinking it might be the render queue order issue, because I'm using a 3rd party terrain shader, which I thought might override the decal render order. However, it is properly drawing over the terrain in my Scene view, but just doesn't appear in the Game view or play mode.

    Any ideas on why this might be?
     
    Last edited: Sep 6, 2019
  2. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    362
    I think you should provide HDRP version and editor version for the devs to even begin looking into this.
     
  3. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    176
    What shader are you using for it?
     
  4. Hexane

    Hexane

    Joined:
    Jan 23, 2018
    Posts:
    1
    I'm having the exact same issue. I'm using Unity 2019.2.2f1 with HDRP 6.9.1 (upgraded from 6.9.0 just a minute ago). I'm using a material with an "HDRP/Decal" shader for the decal. My other materials with HDRP/Lit shaders have "receive decals" enabled and show up fine in the Edit view, but nothing ever in the Game view.
     
    Velo222 likes this.
  5. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    I am using the HDRP/Decal shader for my material. Unity 2019.2.0f1. High Definition RP package version 6.9.0.

    Still the same problem. It shows up fine in the scene view, but nothing in the Game view or during runtime. I havn't tried HD package 6.9.1 yet.
     
  6. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    Still the same problem as my original posts.

    Is there anything in the HD Asset settings themselves that I need to enable to get this to work. I upgraded my project from Unity 2019.2 to 2019.2.6 recently. Still using HDRP package version 6.9 and the decals will not show up in the game view still. I've tried switching the decal material from HDRP>Decal to HDRP>Lit but it throws errors because the Lit shader does not have decal draw distance properties.

    Are other people not having this problem?
     
    Last edited: Oct 9, 2019
  7. Batuhan13

    Batuhan13

    Joined:
    Apr 9, 2017
    Posts:
    74
    I had a little bit same problem with you decal projector was working perfectly in editor but when I build project there was no decal projector in my builded version I updated unity version and hdrp version that solved my problem.
     
    Velo222 likes this.
  8. MihajloNen

    MihajloNen

    Joined:
    Dec 7, 2015
    Posts:
    14
    @Velo222 Any solution so far? I'm experiencing the same Problem. No decals in game view but it works fine in scene view… Unity 2019.2.5f1 (latest HDRP)
     
  9. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    I still havn't found a fix yet. But I think I read a thread with an official Unity person that said it might be fixed in HDRP 7.3 or something like that. I think it was a shader issue, but I can't remember exactly. They had a link to a github download for the latest version.

    The problem is, I have another 3rd party asset that only supports HDRP 6.9 and 6.9.1 right now, so I have to wait for them to update that to the newest HDRP version in order to upgrade to the latest HDRP. I was just going to wait until I could utilize HDRP 7.3+ basically.

    I've kind of given up on trying to fix it for now. HDRP is still in it's infancy and has a lot of problems.
     
  10. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    557
    Last edited: Oct 24, 2019
  11. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377

    Hi SebLagarde,

    Thanks for responding :)

    I upgraded to HDRP 6.9.2 per your suggestion, but unfortunately the decals still do not show up in the Game view. But they still show up just fine in the Scene view. I built the game as well and tested them in a Standalone build and the decals didn't show up in an actual build either.

    I also tried enabling the "Metal and AO" options in the HD pipeline asset Decals section. But that didn't do anything either. So unfortunately it still doesn't seem to be working.

    I have not tested in 7.1.3 yet, but honestly I'd rather not upgrade my project to a higher version yet until this 3rd party asset I have (CTS for terrains) upgrades their HDRP support to support higher HDRP versions as well.

    If you have any more suggestions until I'm able to upgrade to higher Editor and HDRP versions, I'm all ears.

    Thank you!
     
  12. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    557
    Hey,

    Our Qa have try to repro your issue with 6.9.1 and 6.9.2 but it work for us. We will need more information to be able to localized the issue if you do't mind:
    - is it mac or windows ?
    - is it a mesh decal, projector decal ? Does it use the shader graph?
    - What option are you suing on the decal? (Maybe export a package with the decal so we can repro)?

    we know that your version is 2019.2.2f1 on HDRP 6.9.2

    thanks
     
  13. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377

    Hi SebLagarde,

    Ok, I did some more testing tonight, and I don't know why I didn't think to do this earlier, but I simply recreated a scene, and instead of using the 3rd party (Asset store) terrain shader I was using, I used the default Unity terrain shader instead. And the decals showed up in both the Scene view and the Game view using the default Unity terrain shader.

    Given this information it makes me think it's a problem with the 3rd party terrain shaders I'm using (I'm using the CTS Complete Terrain Shader from the Asset store), and not a problem on your end. So I think it's the terrain shaders I'm using.

    I will contact this Asset's developer and see if we can fix the problem. I'm sorry to have wasted your guys' time if it ends up being the assets fault. I'm sorry. And if by chance it ends up not being the problem, I'll contact you again.

    Thank you so much for taking the time to help me! I really appreciate it. Again, I'll let you know if it ends up not being the 3rd party terrain shaders fault -- but it seems like it is for now.
     
  14. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    24
    Hi Velo22,

    I've tried reproducing with the terrain you are using according to your description on 2019.2.2f1 with 6.9.2 and to my surprise, the decals are still not disappearing on my end. Do you encounter this issue using the CTS terrain on a new project created? Would you be able to file a bug report with repro project demonstrating the issue (post the ticker number here)?
     
  15. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    Hi Tomas,

    I tested the decals in a brand new project (using HDRP) with the CTS terrain and the decals do work as you said. So the decals are working in a new project using CTS shaders.

    I am using Unity 2019.2.6f1 right now, as I upgraded to the newer Unity version a week or so ago. I am using HDRP package version 6.9.2 as you said though. All of my tests are now using Unity 2019.2.6f1.

    This is somewhat perplexing. I can file a bug report, no problem. But the repro project might be difficult for me. My game is a large game with a lot of 3rd party assets (which might contribute to the problem actually). I'd have to think about how to clear as much out of it as I can while still producing the problem. Any suggestions for that?

    Also might there be any settings I could try checking or unchecking that might affect the Decal rendering on the terrain?

    Thanks again for your time!
     
  16. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    Hi Tomas,

    Ok, I just discovered something. I have two cameras in my game. One is a main camera, and the other is a "minimap" camera. I just disabled my minimap camera and the Decals appeared in the game view once again!

    For some reason, when I have this second camera enabled, it won't show the decals in my main camera. I'm not sure why.

    So, it's not Unity's problem, or CTS's problem either. Which is great :)

    I don't have time to test further today, but I'll work with it more later.

    Thanks for your help! And again, I hate to waste people's time, especially official Unity personnel, but you guys just helped me work through it, think about it, and discover something to solve this problem, so I really appreciate it.
     
  17. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    24
    Hey!

    Thanks for the additional info! You are using decal projectors, right? Are you culling any layers on your minimap camera? Or are there additional cameras besides your main one and the minimap one? If I exclude default layer(decals were on this layer checking on my project) from Culling Mask section on a second camera - decal projectors get culled on both cameras, I'm pretty sure it's the issue you are facing. Only Decal Projectors seem to be affected, regular mesh decals are still working fine.

    Filled a ticket for this issue here: https://issuetracker.unity3d.com/is...set-to-cull-the-layer-decal-projectors-are-on
     
    Subliminum likes this.
  18. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,377
    Hi Tomas,

    Yes I am using decal projectors for my decals. I only have the two cameras in my scene. My main camera and my minimap camera. I am culling every layer on my minimap camera except for three of them.

    You are correct, in order for the decals to show I have to tell my 2nd camera (minimap camera) to render/view the layer my decals are set to be on. Otherwise the decals do not show up. I tested it with other layers and that is the behavior I'm observing. Whatever layer I put my decals on, both cameras have to have those layers visible in the Culling Mask settings on the camera in order for the decals to show up.

    Basically, what you described seems to be the problem. I'm glad I know that now. Thanks for filing a ticket for me on this issue :)

    Let me know if you want me to test anything more or if you need anymore information.
     
    Subliminum likes this.
  19. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    73
    Increase the far clipping pane of your main camera
     
unityunity