Search Unity

Night Vision Effect

Discussion in 'Assets and Asset Store' started by KuangZheng, Nov 9, 2013.

  1. KuangZheng

    KuangZheng

    Joined:
    Feb 25, 2013
    Posts:
    75
    $screenshot1.png

    Night Visio Effect has been Released!
    Asset Store

    Requires Unity 3.5.7 or higher.
    Requires Unity Pro.



    The Night Vision Effect is seen in many first-person shooter game in the market today.It is the effect of brightening the whole image using that very distinct lime green color.

    *Tinted green
    *Scan lines
    *Noises
    *Vignette

    More details:
    Youtube Video
    Here is the web demo

    If you have any questions/issues please contact me at kuangtoby8105@gmail.com . I will be glad to help you out.
     
    Last edited: Nov 18, 2013
  2. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looks fantastic.
     
  3. KuangZheng

    KuangZheng

    Joined:
    Feb 25, 2013
    Posts:
    75
    Thank you!
     
  4. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Small susgestion, can you make any sources of light more exaggerated.
    So if looking direct at a light source with night vision on would amplify the light signature.
     
  5. softwizz

    softwizz

    Joined:
    Mar 12, 2011
    Posts:
    793
    thats excellent cant wait to get it.
     
  6. KuangZheng

    KuangZheng

    Joined:
    Feb 25, 2013
    Posts:
    75
    Thanks for your suggestion! You can adjust the "constrast" value to make sources of light more exaggerated.

    $Screen Shot 2013-11-11 at 上午9.48.06.png

    $Screen Shot 2013-11-11 at 上午9.41.10.png
     
    Last edited: Nov 11, 2013
  7. KuangZheng

    KuangZheng

    Joined:
    Feb 25, 2013
    Posts:
    75
    Thanks,it won't take long. :D
     
  8. KuangZheng

    KuangZheng

    Joined:
    Feb 25, 2013
    Posts:
    75
    The package has been released now!
     
  9. CplMulder

    CplMulder

    Joined:
    May 12, 2014
    Posts:
    52
    I really like this effect, it has a convincing and realistic look and is super easy to use......

    However found a little trick for those that are interested....

    I needed to toggle the night-vision effect on and off - which is easy enough to do.... but while using the effect I noticed that in a really dark scene the visible ambient light level was not actually boosted like real-life NV equipment should/would do.... perhaps I've just spent too many hours on guard-duty in real life with a NV scope pressed up to my eyes :)

    So I knocked up a simple little script that seems to work well for me.... simply attach it to the same camera object your NightVisionEffect is attached to:

    Code (CSharp):
    1. namespace Assets
    2. {
    3.     [RequireComponent(typeof(NightVisionEffect))]
    4.     public class NightVisionBooster : MonoBehaviour
    5.     {
    6.  
    7.         public KeyCode NighVisionToggleKey = KeyCode.N;
    8.         public bool BoostVisibleLight;
    9.         [Range(0, 20)]
    10.         public float BoostedVisibleLightValue = 10;
    11.  
    12.         private NightVisionEffect _nightVision;
    13.         private float _originalAmbientLight;
    14.  
    15.         void Start ()
    16.         {
    17.             _nightVision = gameObject.GetComponent<NightVisionEffect>();
    18.             _originalAmbientLight = RenderSettings.ambientIntensity;
    19.         }
    20.  
    21.         void Update () {
    22.             if (Input.GetKeyDown(NighVisionToggleKey))
    23.             {
    24.                 _nightVision.enabled = !_nightVision.enabled;
    25.                 RenderSettings.ambientIntensity = BoostVisibleLight && _nightVision.enabled ? BoostedVisibleLightValue : _originalAmbientLight;
    26.             }
    27.         }
    28.     }
    29. }
    30.  
    The designated input key (defaultg "N") toggles the Night Vision on and off and you have the option of boosting the ambient light and to which level.... in my scene somewhere between 5 and 10 worked well. but this will depend on a lot of other factors.

    Hope this helps someone, perhaps the option of boosting light and the amount can be included in a future update?
     
    Last edited: Jul 16, 2015
  10. TetraJem

    TetraJem

    Joined:
    Mar 5, 2017
    Posts:
    4
    I was also looking for something similar, but I realized that writing this myself or finding a ready-made one is unrealistic. Since I need the effect to work from complete darkness. Not forgetting about the particles of transparent materials and the like. In addition, “set replacement shader”, which will increase optimization, and not kill it.