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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Object revealed by light

Discussion in 'High Definition Render Pipeline' started by joss51, Feb 18, 2023.

  1. joss51

    joss51

    Joined:
    May 6, 2016
    Posts:
    15
    Hello,
    I want to have an object revealed by a spotlight like here :

    or here :

    But these shader are not compatible with HDRP.
    how can I adapt them ?
    Thanks a lot !
     
  2. joss51

    joss51

    Joined:
    May 6, 2016
    Posts:
    15
    I have found a simple solution :
    - Create an HDRP Lit Material
    - Surface Type > Transparent
    - Base Map > your map or your color WITH 0 value for alpha
    - Convert the texture with alpha as a greyscale map (with black as transparent)
    - Mask Map > put this new texture
    - Put Smoothness remapping and AO remapping to the lowest

    Create your object
    MeshRender>additional Settings >rendering Layer Mask > choose a specific layer

    Create the light which reveals your object
    Light>General>Light Layer > add the layer of your object
     
    impheris likes this.
  3. iLollipop

    iLollipop

    Joined:
    Jan 19, 2023
    Posts:
    3
    can you explain a little more how do it