Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[FREE] GPU Line of Sight / Field of View

Discussion in 'Assets and Asset Store' started by Tycho, Jul 16, 2014.

  1. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    How would you make it so that the fov is a different effect from the example desaturate, such as with blue hexagons? It’s amazing otherwise..
     
  2. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    202
    You could either create a custom Image Effect to render the hexagon pattern in screen space, or render the scene twice (once with a hexagon material, and once using normal materials) and use the LOSBufferStorage and LOSMask components to combine the two renders.
     
  3. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    Oh, (sorry for all the queries) but how would you send a message to all the los sources that the player is visible too? Thanks for the quick reply, gave me some ideas. P.S. sorry, I’m quite a noob at unity... Want to make it so that the enemies that see the player react. On the enemy script I have two functions to look and shoot at the player, and wanted to call them only on the enemies that the player is visible too.
     
    Last edited: Jun 1, 2020
  4. EpicCodez

    EpicCodez

    Joined:
    Jan 30, 2020
    Posts:
    3
    One more thing, could I use a separate, inverted camera that cuts out my level to make the skybox still have colour? Will test with Unity, but wanted to check if there was an easier method?
     
  5. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    202
    I suggest you take a lot at the PlayerInfo script included in the example scene, for a starting point on how you can implement this.
     
  6. Ripityom

    Ripityom

    Joined:
    Jan 9, 2016
    Posts:
    28
    Hi, I purchased the asset a long time ago, now I see it became open source, great! Do you accept pull request?
    For a stealth game I decided to use this asset for the guards line of sight visualization, and it seems to work great by using mask color to tint the scene inside a guard LoS. However when I try to add something more complex by using an image effect with the guards' "invert mask" option enabled the image effect disappears entirely if I add more the 1 guards to the scene. Is this a known limitation, or is there a way to work around this? Thanks for the advice!
     
  7. MasterOPCC

    MasterOPCC

    Joined:
    Jan 19, 2014
    Posts:
    1
    Hi, I just started using the Asset. So far so good, I just have a problem with some weirds rectangles that appear near the camera and when focusing on objects.

    Do you have any idea what it could be?
    The table for example is a simple model done in Asset Forge (Kenney) and the texture is jsut a basic texture.
    Thanks
    upload_2020-11-28_2-9-6.png
    upload_2020-11-28_2-9-45.png
     
  8. Wokou-Dev

    Wokou-Dev

    Joined:
    Jun 29, 2020
    Posts:
    1
    If anyone manages to get it to work with the URP (or HDRP), please let me know, that would be really great, thx!
     
  9. Overcast

    Overcast

    Joined:
    May 16, 2013
    Posts:
    19
    +1
    If anyone can even explain to me the scope of what needs to change I'll take a look.
     
unityunity