Search Unity

[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:
    5
    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:
    205
    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:
    5
    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:
    5
    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:
    205
    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. bitHussar

    bitHussar

    Joined:
    Jan 9, 2016
    Posts:
    33
    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. PeCoBe

    PeCoBe

    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:
    29
    +1
    If anyone can even explain to me the scope of what needs to change I'll take a look.
     
  10. jedmonds91011

    jedmonds91011

    Joined:
    Aug 11, 2015
    Posts:
    3
    @Tycho I was wondering if there have been any updates to this plugin over the past year. We are seeing some banding issues as we increase / decrease the camera distance to the LOSSources. The banding also occurs if you tilt the camera down. Do you have any idea what might be causing this issue? Thank you for your help.
     
  11. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    205