Search Unity

Stencil - see through effect

Discussion in 'Shaders' started by VitioPax, Mar 26, 2020.

  1. VitioPax

    VitioPax

    Joined:
    Nov 3, 2019
    Posts:
    4
    Hello, iam trying to make the see through effect similar to the one in the Divinity original sin 2. Snímek obrazovky (286).jpg

    So i created stencil and now i can see through the wall but from both direction if player is in front or behind

    Snímek obrazovky (285).jpg



    I tried to work with custom forward renderer it works right for any other material but the one with Stencil. I tried everything i could find on the internet. I dont have any experience with writing shaders so some tutorials were just to advanced for me to follow. PLease if there is some one who knows ho to make it. It would be fantastic.

    Thank you.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
  3. VitioPax

    VitioPax

    Joined:
    Nov 3, 2019
    Posts:
    4

    Thank you. I already tried to download and implement the github Project but when i put it in the Unity materials are pink and have tons of errors. Since as i said am no programer i have no idea what to do with it. And the tutorial above i tried as well but got stuck on casting texture on the mesh as they do that it works on whatever mesh they put it on. Am going to try some seperat tutorials on that and give it another go. Again thank you but if you or anyone else has any more help i would be greatfull.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Yeah, not sure what's up with that github project. You'll have to follow that tutorial (both pages of it) and implement it on your own.
     
  5. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi
    If your still looking for a solution check our Asset as this is a custom made shader for this use case.
    It can handle multi user and multi buildings, walls ( obstructions ) and is available for Standard RP , URP and HDRP .

    https://forum.unity.com/threads/rel...isible-within-buildings-std-urp-hdrp.1182130/

    Asset:
    https://assetstore.unity.com/packag...1.1782839353.1631897836-1270869709.1615288349

    WebGL Demo:
    https://www.shadercrew.com/Home/Demo

    Documentation:
    https://www.shadercrew.com/Content/See_throughShaderDocumentation_v1_7_5.pdf

    YouTube:

    https://www.youtube.com/channel/UCSUByHGkKOpoLmWHTWEJWBg

    Greetings
    Toorican
    splash5_.png
    splash6_.png
    splash14.PNG splash10_.jpg
     

    Attached Files:

    Last edited: Jan 20, 2022
  6. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16