Alien Vision Mod

13

Comments

  • rantologyrantology Join Date: 2012-02-05 Member: 143750Members, NS2 Developer, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Gold
    how(what program) do you guys edit the .fx shader files? :s
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    The shader files that come with the game are compiled versions, you cannot edit them.
    The ones here are uncompiled and can be modified with any text editor, the game will automatically compile them on map load if you replace the original one.
  • RyneRyne Join Date: 2012-02-25 Member: 147408Members, NS2 Map Tester
    <!--quoteo(post=1948729:date=Jul 3 2012, 03:21 PM:name=rantology)--><div class='quotetop'>QUOTE (rantology @ Jul 3 2012, 03:21 PM) <a href="index.php?act=findpost&pid=1948729"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->how(what program) do you guys edit the .fx shader files? :s<!--QuoteEnd--></div><!--QuoteEEnd-->

    Grab the one off my twitch page and you can edit it with nitepadnotepad ...
  • TalthanTalthan Join Date: 2012-08-02 Member: 154605Members
    edited August 2012
    Sorry about being a bit of an idiot, but when I go to the dropbox link all the shows up is a load of coding for it, presumably the contents of the fx? I'm quite new to modding this game, and sorry to bother, but is anyone able to give an in-depth guide of how to do this? Specifically issues with the dropbox, and how exactly to make a "new mod" folder?

    (I would like to repeat and emphasize the fact that I am an idiot.)

    Edit:Just saw a post on the subject. Please disregard.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    Have fun, Talthan. :)
  • Vicious BugVicious Bug Join Date: 2012-11-13 Member: 170612Members
    I dont understand guys... i replaced my "darkvision.fx" but the vision is all screwed up... what have I done wrong?<img src="http://i914.photobucket.com/albums/ac344/m_gaby/2012-11-10_00002.jpg" border="0" class="linked-image" />
  • RyneRyne Join Date: 2012-02-25 Member: 147408Members, NS2 Map Tester
    <!--quoteo(post=2022524:date=Nov 13 2012, 01:52 PM:name=Vicious Bug)--><div class='quotetop'>QUOTE (Vicious Bug @ Nov 13 2012, 01:52 PM) <a href="index.php?act=findpost&pid=2022524"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I dont understand guys... i replaced my "darkvision.fx" but the vision is all screwed up... what have I done wrong?<img src="http://i914.photobucket.com/albums/ac344/m_gaby/2012-11-10_00002.jpg" border="0" class="linked-image" /><!--QuoteEnd--></div><!--QuoteEEnd-->


    Reboot your NS2 client.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited November 2012
    Just made a new version: <a href="http://dl.dropbox.com/u/60032446/minimal%20dark%20vision/DarkVision.fx" target="_blank">http://dl.dropbox.com/u/60032446/minimal%2...n/DarkVision.fx</a>

    The mod was tested to work on all official servers.

    Preview:
    <img src="http://dl.dropbox.com/u/60032446/minimal%20dark%20vision/dvm.jpg" border="0" class="linked-image" />
  • Vicious BugVicious Bug Join Date: 2012-11-13 Member: 170612Members
    <!--quoteo(post=2022542:date=Nov 13 2012, 06:12 PM:name=Ryne)--><div class='quotetop'>QUOTE (Ryne @ Nov 13 2012, 06:12 PM) <a href="index.php?act=findpost&pid=2022542"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Reboot your NS2 client.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Its working now, Thanks for your awsome work guys.
  • Ineluki80Ineluki80 Join Date: 2013-01-20 Member: 180772Members
    edited January 2013
    Thanks to this great mod, I am finally able to adjust Alien Vision to my preferences.

    Based on twiliteblues shader, I wote my own using time dependend blurring and colour changes.
    I thought, plain grey scale is just too boring, so I alternate vision within the RGB space spanned by the pixel colour and its greyscale mean value.
    Furthermore, outline colour intensity and thickness is altered as well periodically.
    Additionally, I took the freedom to comment the shader code extensively as far as I understood it.

    As proof of concept, here is a drastically reduced GIF with some screenshots of ns2_summit. Colour change is of course not so fast.
    <img src="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision1/DarkVision.gif" border="0" class="linked-image" />

    <a href="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision1/DarkVision.fx" target="_blank">Script as download.</a>

    Tips, tricks, and suggestions are welcome.
  • Ineluki80Ineluki80 Join Date: 2013-01-20 Member: 180772Members
    edited January 2013
    Sorry for double post.

    I made a somewhat more all-day-usable Alien Vision Shader.
    This one features:
    - Insectoide compound eyes using a rhombohedral lattice (instead of a normal hexagonal one)
    - sonar sight using sound pulses with exponential decay and distance based resolution
    - importance highlighting for biological and technological compounds

    I also made a video to show you how it looks. Make sure to watch in the best resolution to see all the details.

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/Q7TNh9Cbngg"></param><embed src="http://www.youtube.com/v/Q7TNh9Cbngg" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>

    My design goal was to create a more or less natural looking shader which underlines the alien aspect of the khaara.
    Based on the discussion that alien vision should have a small draw back when used in well lit conditions, I introduced a scheme for rhombohedral compound eyes, which separate in several colour channels. Because of this overlay, alien vision in well lit environments is a bit inferior to normal vision but despite this, textures are shown in all of their glory.

    Furthermore, I changed the previous cell shading outlines into some form of sonar. Sound waves are created, propagate through the air and highlight edges. There is a pulse about every second, highlight intensity has a moving maximum as the wave travels through the air and the edge resolution is decreased as a function of distance, so if something is further away, only edges with greater edge contrast (bigger/sharper edges) are highlighted. While not hit, edges are dimmed to a dark gray, so they still give guidance when it's very dark but do not overlay much of the aesthetics.

    Finally, I added the common highlighting of biological and technological elements, but this time I did not use blurring but some kind of glow effect on the edges.

    For those, who do not want to load a whole video, here are some pictures.
    In order to keep loading times small, these are JPEGs, but each picture links to its lossless PNG pendant, albeit size is reduced to 75% in any case.

    <a href="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_01.png" target="_blank"><img src="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_01.jpg" border="0" class="linked-image" /></a>
    Snow seen with colour channel bound compound eyes. In the distance, the trailing part of the edge highlighting sonar wave can be seen, but only on edges against the sky.

    <a href="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_02.png" target="_blank"><img src="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_02.jpg" border="0" class="linked-image" /></a>
    A sonar wave travels through a corridor in ns_summit. It is already dark enough that the colour aberrations from the compound eyes hardly bother.

    <a href="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_03.png" target="_blank"><img src="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_03.jpg" border="0" class="linked-image" /></a>
    Pitchblack darkness with a pinch of sonar highlighting.

    <a href="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_04.png" target="_blank"><img src="http://ineluki.rpg-atelier.net/misc/NS2/DarkVision2/ns2_DarkView2_04.jpg" border="0" class="linked-image" /></a>
    That ain't no sunset, that's technology highlighting with a grain of glow while compound eye perception speckles the sky.

    <a href="http://pastebin.com/24LEsb7H" target="_blank">Source code can be found here.</a> It is heavily commented, so maybe someone can learn a bit from it. Albeit based on twiliteblue's Dark Vision Mod, I rewrote the whole shader function from scratch and implemented some parts of the algorithm differently. Since I am totally new to shader programming (these two shaders here are the first ones I ever wrote. BIG thanks to twiliteblue for his code from which I learned), feedback is exceedingly welcome.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    Wow, Ineluki80! That's very impressive work for just a few days of shader programming! Sorry about the lack of comments in my code.
  • WhosatWhosat Singapore Join Date: 2006-11-03 Member: 58301Members, Reinforced - Shadow
    edited January 2013
    Would you make one without that coloured overlay? :)

    P.S. I think that sonar thing would make a perfect effect for the Observatory scan as opposed to the current circles.
  • Ineluki80Ineluki80 Join Date: 2013-01-20 Member: 180772Members
    edited January 2013
    <!--quoteo(post=2067006:date=Jan 26 2013, 03:36 PM:name=Whosat)--><div class='quotetop'>QUOTE (Whosat @ Jan 26 2013, 03:36 PM) <a href="index.php?act=findpost&pid=2067006"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Would you make one without that coloured overlay? :)

    P.S. I think that sonar thing would make a perfect effect for the Observatory scan as opposed to the current circles.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I guess, you mean with "coloured overlay" my attempt to simulate compound eyes ? You can do this easily yourself, just remove lines 90 to 96 and change line line 132 into <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->return outputPixel + edge*edgeColor*sonar;<!--c2--></div><!--ec2-->

    At the moment I am working on a new version. Main features are:
    - hexagonal compound eyes
    - depth of field blurring ... so the aliens are short sighted
    - anisotropic eye dispersion, so light of different wavelength is refractured differently in different parts of the eye, so you get some anti-focal and some prismatic light spreading when going to the perceptional borders

    I guess, I will upload a new version within this week, so stay tuned.

    Can someone give me a hint to how to make the shader configurable via some new entries in the graphics options menu ? So one can enable or disable some of the effects or affect their strength ... As I already said, I have absolutely no modding experience.

    @twiliteblue .. could you pitch me a sniplet of code for multi-pass pixel shading ? Without that, I guess my shader would end up to be too complex/slow.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited January 2013
    Ineluki80 wrote: »
    Can someone give me a hint to how to make the shader configurable via some new entries in the graphics options menu ? So one can enable or disable some of the effects or affect their strength ... As I already said, I have absolutely no modding experience.
    That sounds like quite some work. I'm not sure if there is any interface to add entries to the options menu yet.

    You can, however, change the alien vision lua to add new console commands.
    Ineluki80 wrote: »
    @twiliteblue .. could you pitch me a sniplet of code for multi-pass pixel shading ? Without that, I guess my shader would end up to be too complex/slow.
    You can look at examples such as Blur.fx in the NS2 shaders directory. I don't have any experience with multi-pass yet.
  • Ineluki80Ineluki80 Join Date: 2013-01-20 Member: 180772Members
    edited January 2013
    @twiliteblue Thanks for the tip. I will definitely have a look on this.

    Meanwhile I finished my work on version v0.3 of my shader. Thanks to shader model v3.0 I was able to do it without a multi-pass shader. And fortunately my approach turned out to be still fast enough.

    At the moment it uses these features:
    - short sighted aliens using depth of field technique ( Tiefenunschärfe )
    - Insectoide compound eyes using a hexagonal lattice
    - Refraction and dispersion for eye vision
    - brightness correction in dark spaces
    - sonar sight using sound pulses with exponential decay and distance based resolution, rainbow coloured
    - importance highlighting for biological and technological compounds

    I made a video in which I demonstrate and comment on the several effects of the shader, so I hope you will enjoy it. Took me the most part of today. ^__^


    Well commented source code can be found here.

    Maybe I'll add some high quality pictures later, but for now the video should be enough. (It's nearly 5:00 am here now.)
    I am really looking forward to your comments and suggestions.
  • Ineluki80Ineluki80 Join Date: 2013-01-20 Member: 180772Members
    edited February 2013
    For all of you struck with nostalgia, here is what an 8bit NS2 may have looked like.
    Just for fun, I made a static 256 colour palette pixel shader.

    NS2_8bit.jpg

    If you want to try it yourself, use @twiliteblue 's Mod and replace the pixel shader function by this.
        float4 SFXDarkVisionPS(PS_INPUT input) : COLOR0
          return round(5.0f*(1.0f-acos(2.0f*tex2D(baseTextureSampler, input.texCoord)-1.0f)/3.1415927))/5.0f;          
        }
    

  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    Mod updated for new build (works for b254).
  • DarkflameQDarkflameQ Join Date: 2013-02-28 Member: 183451Members
    I can't stand the new Alien vision, it hurts my eyes.

    I hope your mod is better, i miss the old vision :(
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    @DarkflameQ I will release a few differently coloured versions. Stay tuned.
  • DarkflameQDarkflameQ Join Date: 2013-02-28 Member: 183451Members
    Wins, i look forward to it.

    I really like the previous 'Deep Blue' version you made:

    NS2%202012-05-30%2013-12-40-02.jpg
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    I liked the neo version myself, used before the update.
  • DarkflameQDarkflameQ Join Date: 2013-02-28 Member: 183451Members
    edited September 2013
    It's annoying that the developers don't want us to use Alien vision much, playing Aliens without Alien vision on just doesn't feel right to me, lol

    The vision makes me feel more Alien so i use to always have it on.
  • lolz_Vsdgkklolz_Vsdgkk Join Date: 2013-05-23 Member: 185349Members
    Wow this is some amazing stuff.

    @Ineluki80 - Your stuff is awesome, and although it would increase immersion, i feel it might be tough to get used to. People would probably moan as much as usual, especially with all the changes NS2 is going through currently.

    @Yuuki - I absolutely love your grayscale vision with slight colouring, Im definitely going to try mess with it using yours as a base, just to see what different colours in place of the blue would look like. Simple and amazing.
  • clankill3rclankill3r Join Date: 2007-09-03 Member: 62145Members, NS2 Map Tester, Reinforced - Shadow
    Lovely work twilight blue!
    I love this image
    NS2%202012-06-01%2000-09-55-91.jpg

    Do you know this video?


    I like the sonar effect in it just like Ineluki80 did.

    Also i know you can't do this since it goes beyond shader coding. But it would be nice that alien vision is better/stronger when your in a group to stimulate teamwork.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    The sonar effect in the UWE demo was really pretty, but it would be way too distracting ingame.

    I've added a blue alien vision on the first page.
  • ns2isgoodns2isgood Join Date: 2013-04-16 Member: 184847Members
    Do these no longer work? I followed the instructions in the OP, but I keep getting an error that my files don't match and to verify.
  • clankill3rclankill3r Join Date: 2007-09-03 Member: 62145Members, NS2 Map Tester, Reinforced - Shadow
    I think this is really glossy and a bit to bright.
    2013-09-02_00005.jpg
    Your screens from crevice where much darker and more awsome.
    NS2%202012-06-01%2000-09-55-91.jpg
    Here you also have really nice darkness, was the light here on or off?
    It would be nice if it's that dark with the lights on.
    1JV1k.jpg
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    @ns2isgood I hope using the steam workshop version works.

    @clankill3r Thanks, I will tone the brightness down a bit.
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    edited September 2013
    How can I edit one of your mods simply myself? I really like complete greyscale with green marines, but your dark blue version looks interesting but from screenshots looks like you can't see enemies from too far away?? (also agree the darker version looks easier on the eyes, having the world be bland and enemies bright is kind of what i'm looking for.. I'll try and tweak some of your already modded files to my liking and see if I can get something interesting! :)

    edit: Idt using the workshop version works, you'd have to replace the actual file in your install directory.. not sure why these type of mods aren't whitelisted, it's personal preference (and the default ones generally hurt my eyes) -- does your method on page 1 work? I was doing it differently
Sign In or Register to comment.