Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

See Through - Fade away objects in line of sight

Discussion in 'Assets and Asset Store' started by cygnusprojects, Nov 27, 2015.

  1. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    Don’t miss out on any action as from now on you can always make sure your player character is visible. With the See Through asset from Cygnus Projects it is possible to fade away objects that are in line of sight.



    Features:
    • No special shaders and post effect
    • Easy to set up
    • Fully documented source code included
    • Allow linked objects (when only a part of the object is obscuring the sight you can fade away the complete object)
    • Works with any game object including legacy trees and SpeedTrees

    Overview video:



    Screen shots (with included standard assets)
    Even if the player is only behind a part of the column the whole column renders transparant:

    and even when the player is behind a second column he's still visible:

    Now available on the Asset Store

    Questions? Comments? Feel free to post them here or contact me at support@cygnusprojects.com.
     
  2. Saturn-Ent

    Saturn-Ent

    Joined:
    Jan 25, 2013
    Posts:
    59
    Does this work even when the terrain tree painter have been used? And not placed the tree by hand
     
  3. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    Hi @Saturn-Ent, no I don't support this feature.
    Let me explain: The system always returns the terrain as the object it is hitting. Of course it it possible to get all the trees within that terrain but it has some huge drawbacks:
    1. One has to check all trees on every hit to determine which ones should be faded
    2. The tree prefabs placed on the terrain should all have some sort of collider.
    In my opinion this will make your project slowing down way to much, so it is best to determine the playable area and place fading trees where you know the player can be obscured by it.
     
  4. Saturn-Ent

    Saturn-Ent

    Joined:
    Jan 25, 2013
    Posts:
    59
    Bah, I use top down camera but the trees are in the view often. The terrain is quite big so placing the trees by hand would be a massive task and it would draw down the performance.
     
  5. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    You don't have to place all trees by hand, but yeah if you are building some kind of an open world game you can't predict the paths players will take. Don't see the link why manual placing trees are source of performance though as when you use occlusion culling (specially with a top down camera) trees not visible won't even draw. But yeah, anyway, thanks for the interest in the asset though.
     
  6. Dunfee

    Dunfee

    Joined:
    Jan 14, 2013
    Posts:
    14
    Hey!
    Few questions because this looks like a solution I can use!
    Does the tree need to have a collider on it?
    Is there a way to smooth fade in/out instead of jumping straight to the full transparency?
     
  7. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    Hi @Dunfee, thanks for the interest. To answer your questions:
    - Yes the tree needs to have a collider as the manager component is ray casting towards to player to detect the game objects that need to be faded.
    - Not at the current stage of the product. I'll add this feature request to the list of improvements and see if it's possible to implement it for a next version.
     
  8. Dunfee

    Dunfee

    Joined:
    Jan 14, 2013
    Posts:
    14
    Thanks for the info!
    One last question. Is there a way to keep the shadows the same while fading out the object?
     
  9. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    Not in any way I can think off, as the materials is changed to a transparent alternative the shadows do indeed vanish (which is quite noticeable but not something that can be fixed due to the nature how the system works). While I was typing this I was wondering if baking should make this possible but then you can't use dynamic sky boxes (where the sun or moon is changing positions in game) any longer.
     
  10. Dunfee

    Dunfee

    Joined:
    Jan 14, 2013
    Posts:
    14
    I have a sort of solution to this but it involves having two versions of the same gameobject. One that doesnt cast shadows and another one with its mesh renderer set to "shadows only"

    Not ideal but it seems to be the only way that it will work at the moment
     
  11. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    516
    Hi @Dunfee, that's indeed another way to achieve the desired results. But as you mention, not that ideal as well. I think it will always be a trade-off.