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.

Question Possibility for URP Decal Projector to only affect certain objects?

Discussion in 'Universal Render Pipeline' started by Amarodil, Dec 6, 2022.

  1. Amarodil

    Amarodil

    Joined:
    Jan 25, 2019
    Posts:
    14
    Is it somehow possible for me to have a decal projector, that ignores some objects/ meshes in its projection and only projects the decal onto the one gameobject I want?

    For example I want the decal to only work on the ground but not on buildings or other objects in the area.

    Thank you very much for your help.
     
  2. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    216
    Not out of the box in LTS - unless you use 2022.2 Beta, URP 14 and up.
    This should have decal layers with which you can control what is affected and not.

    There might be other - more complex - workarounds though (stencil, render feature) - but I haven't personally looked into those.

    If you have a flat ground you can position the decal only slightly above it
     
  3. Amarodil

    Amarodil

    Joined:
    Jan 25, 2019
    Posts:
    14
    Yeah the Ground is flat in most cases. But the problem is that there is buildings and the decal is supposed to project a dirt texture or something under the buildings/ city. But if i put the projector up even slightly the lower part of the buildings will also be affected which i do not want.
    I will definetely look into decal layers in the beta if its not to unstable. Thank you alot!