Search Unity

[RELEASED] See-through Shader: Make your playable characters visible within buildings (Std URP HDRP)

Discussion in 'Assets and Asset Store' started by toorican, Oct 12, 2021.

  1. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    [RELEASED] [ASSET LINK] [DOCUMENTATION] [WebGL Demo] [PUBLISHER WEBSITE] [Standard URP HDRP]
    upload_2021-10-12_23-25-29.png
    The “See-through Shader” lets you see your playable characters inside any mesh without being obstructed by it. It doesn't matter if it is a building, a bridge, a cave or whatever else you can imagine. Just apply the shader to it and it works. The best thing about it: It doesn't need any additional changes to your mesh!
    It does boost Microplay to its best.


    In the most simple setup, just a GameObject with the “See-through Shader” assigned to its
    material and the playable characters position manager script is added and the area of the effect of the shader ist controlled by setting the effect radius. For more complex buildings
    you can either supply a collider to your building and let the auto-detection script find out if
    the player has entered the building or not.
    For the most precise control, which is highly recommended, you could also use dedicated
    enter- and exit-triggers (pair of cubes at the entrance) for the buildings so just when
    passing the triggers the effect is applied.
    “See-through Shader” does not need colliders to work generally but for some dedicated
    triggers you need colliders on those objects so players can pass through and activate the
    enter and exit function of the shader or allow the auto detection algorithm to work.

    Feature list:

    • Clearing obstruction by angle, cone, cylinder or circle, with combinations
    • Multi playable Character and Buildings
    • Automatic adjustable height of clearing based on player position
    • Manual and automatic adjustable height of clearing
    • Shadow feature
    • Custom texture and colour feature of the borders of dissolve area
    • Activation from start or during runtime
    • Application to a Layer possible
    • Simple Setup
    • Many ways of applying and interacting with the shader

    Please feel free to contact us for support or feedback .
    support@shadercrew.com
    https://www.shadercrew.com




















     
    Last edited: May 16, 2022
  2. Veydron

    Veydron

    Joined:
    Nov 25, 2012
    Posts:
    4
    Question, i only see buildings, but does this work with everything ? Trees, Vegetation, etc ?
     
  3. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi Sorry for the late reply ,
    This shader is meant for use with the standard shader/ lit shaders. ( so Unity Standard and Lit )
    It will work with vegetation and trees based on cutout rendering for example but not with tools like speedtree and so on because they use their custom shader.
    Here you can find a video where vegetation is also cleared.
    https://twitter.com/shadercrew/status/1511659098760175621
     
  4. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
  5. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    New screenshots
     

    Attached Files:

  6. PierreNS

    PierreNS

    Joined:
    Jan 5, 2021
    Posts:
    2
    I have a small problem, I lose the see through capability when I look at a building from a specific angle.

    Also sometime it just stops working after some time.

    Attached screens from the editor.
     

    Attached Files:

  7. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi Pierre,

    If possible please send also some screenshots of your setup to support@shadercrew.com.

    Thank you!
    Greetings
    Shadercrew
     
    PierreNS likes this.
  8. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    I'm having trouble getting the See-through Shader to work on my WebGL build. When the scene with the See-through Shader loads, the walls which should have the shader applied are not visible at all, and the browser console gets flooded with these messages:

    When using WebGL 2.0 the second error message is not "Expression too complex" but "Too many uniforms".

    The setup is as follows:

    1. The player object itself has the PlayerPositionManager script attached and is added to the list.
    2. The GroupShaderReplacement script is attached to the parent object of the walls I want to apply the effect to.
    3. The reference material is one of those that come with the asset, the only thing I changed was increasing the default effect radius, since that is the method I want to use.
    4. I tried building with WebGL 1.0 and WebGL 2.0 APIs, but it does not work in either one.

    Does anyone have an idea what could be causing this error, and how to fix it? Any hints and tipps would be greatly appreciated.

    Thanks in advance and best regards,
    Patrick
     
    Last edited: May 16, 2022
  9. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi Patrick

    Thank you for reaching out to us.
    If you dont mind writing us a email under support@shadercrew.com with some screenshots and your unity version that would be great.

    Thank you !

    Greetings
    Shadercrew
     
  10. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    Questions before I buy:

    1) I currently have a see-through dissolve shader, but when the occluded objects finished fading in back, there's a sudden jump of the shadows and AO appearing instantly, without being faded in. Easier to see with this GIF (check how after the wall fades in, the shadow appear then the AO). Does your solution work the same way or does shadow/AO/etc also fade?

    ShadowsAppear1.gif

    PS: I know I can just bake the AO, but I want to first check it out whether it's possible to have your see-through with those in realtime.


    2) Is it possible to make your effects less "dramatic"?
    I tried with your demo but failed to do so. What I mean is, I just want a clean sphere dissolve, without all the colors and shiny animations. My game is a relaxing, casual exploration game, so everything must fit the theme.

    For example, this, but with a simple gradient here, and a smooth "peaceful" animation:

    upload_2022-12-27_8-46-53.png
     
    Last edited: Dec 27, 2022
  11. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi sorry for late Reply:
    #2 yes you can do that , you can have a clean sphere without edge etc.
     
  12. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    #1
    You mean if the Shadow is also fading with the effect ?
    Attached a Gif with the fading shadow
     

    Attached Files:

  13. Deiran

    Deiran

    Joined:
    Aug 6, 2014
    Posts:
    6
    Hey! Is there a way to make the shader work with transparent materials, i.e. windows or glass in general?
     
  14. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Hi at the moment this is just possible with a Shadergraph Material.
    You can spare out the transparent Materials if it is a workaround for you at the moment?
    Please feel free do join our discord channel so we can give you optimal support.
    Here is a link where this is used:


    Thank You
    Shadercew
     
    Last edited: Jan 11, 2023
    Deiran likes this.
  15. toorican

    toorican

    Joined:
    May 25, 2018
    Posts:
    16
    Last edited: Jan 11, 2023
    Deiran likes this.
  16. fjf1889

    fjf1889

    Joined:
    Oct 30, 2021
    Posts:
    2

    If the player behind the wall,it works very well. If the player In front of the wall,it look strange.When the player is in front of the wall,Is there a way don't show the circle or Is there a way fix the strange Clip.
     
    StrangeWays777 likes this.
  17. CyberDreamer

    CyberDreamer

    Joined:
    Apr 2, 2014
    Posts:
    6
    Hi! What i do wrong if I get next error:
    Material 'SeeThrowShader' with Shader 'SeeThroughShader/BiRP/Unlit/Texture' doesn't have a float or range property '_Cull'


    May be it happen because I use a few objects with STS Group Shader Replacement?

    Details:
    Code (CSharp):
    1. Material 'SeeThrowShader' with Shader 'SeeThroughShader/BiRP/Unlit/Texture' doesn't have a float or range property '_Cull'
    2. UnityEngine.Material:GetFloat (string)
    3. ShaderCrew.SeeThroughShader.GeneralUtils:getNamesOfAllChangedPropertyValues (UnityEngine.Material,UnityEngine.Material) (at Assets/See-through Shader/Core/Scripts/General/GeneralUtils.cs:734)
    4. ShaderCrew.SeeThroughShader.GeneralUtils:updateSeeThroughShaderMaterialPropertiesAndKeywords (UnityEngine.Transform[],System.Collections.Generic.List`1<UnityEngine.Shader>,UnityEngine.Material) (at Assets/See-through Shader/Core/Scripts/General/GeneralUtils.cs:578)
    5. ShaderCrew.SeeThroughShader.GroupReplacementAndSyncBaseAbstract:SynchronizeSTSMaterialsWithReferenceMaterial () (at Assets/See-through Shader/Core/Scripts/ShaderReplacementAndSynchronization/BaseAndCore/GroupReplacementAndSyncBaseAbstract.cs:153)
    6. ShaderCrew.SeeThroughShader.GroupReplacementAndSyncBaseAbstract:LateUpdate () (at Assets/See-through Shader/Core/Scripts/ShaderReplacementAndSynchronization/BaseAndCore/GroupReplacementAndSyncBaseAbstract.cs:126)
    7.  
     
    Last edited: Sep 25, 2023
  18. chaosmonger

    chaosmonger

    Joined:
    Jan 23, 2019
    Posts:
    71
    Hello, I bought your asset a few days ago and I'm trying to tune it to my wishes. Basically my game is set on a city, and I'd like to have a "see through" whenever my player is behind a building, meaning, when there's a building between player and camera, then use a see-through material with obstruction mode Circle. I'm trying the method of "Auto Detection" (I've attached "BuildingAutoDetector" to my player) but it's not working. To do that, I reduced to 0 the "Default Effect Radius", otherwise the "sphere" is basically making transparent also the buildings which are not in between camera and player. I'm not sure if that's the right thing to do (is not specify in your documentation), but anyway, the problem apparently is related with the rays thrown by player. In fact if I chose "Show Debug Rays", I see a bunch of blue lines pointing at the sky, while my guess is that they should point at the camera... Right?
    The BuildingAutoDetector has also a "Public Camera" commented out... I'm not sure it's a bug or if I'm doing something wrong...

    Also, is there somehow a "bool" that I can set to activate/deactivate the shader on a building if this is not on a raycast between player and camera? This way, rather than throwing all those raycasts towards the sky, I just throw one ray to the camera, and if that building is not in between, I turn the see-through shader off.

    Any help will be appreciated, thanks.

    P.S. I'm using Group Shader Replacement.
     
    Last edited: Oct 29, 2023