HorribleGoat 1473 Posted June 24, 2016 Hey folks! (long wall of text ahead)Some time ago there was a post by Kiory about a really cool accidental discovery he had with Arma materials:https://forums.bistudio.com/topic/175495-opticalactive-camo/And for some time I've been working on reproducing the effect and wanted to share current progress to you all since with the help of mr. zantetzou I've had some breakthrough with the technique.For background:In his post Kiory mentioned the basics on how the effect is achieved: By applying a 0 alpha (completely see through) _CA texture on the model in question and applying an .RVMAT with PixelShaderID="Refract"; and VertexShaderID="Super"; and with that I began experimenting on my own some time ago, but did not get as good results in the progress as every time, no matter what the model I applied my 0-alpha texture and my refracting material the model always had this white sheen to it. Except on the move when it looked about what I was hoping to achieve.Finally some progress:After 143 trial .RVMATs I dropped the testing in frustration as nothing seemed to change no matter what attributes I changed and couple of days ago picked up the project again after being contacted by zantetzou as he too was interested in creating "optical camouflage" material for his own project. He in his own trials had used almost identical set up with the texture and material BUT had achieved proper effect in one of the VR objects. When we exchanged our findings I too were encouraged to try out some of the VR objects and the refracting materials and ALAS for some they worked and provided identical results that Kiory had show in his video. This progress now gave me the boost to write here in hopes that others interested in the matter can partake in the trials in order to find how this works.Here is the .RVAMT i've used. 0 Alpha see through texture im sure everyone can make. ​class StageTI { texture="a3\data_f\default_vehicle_ti_ca.paa"; }; ambient[]={5,5,5,1}; diffuse[]={0,0,0,1}; forcedDiffuse[]={0,0,0,1}; emmisive[]={0,0,0,0}; specular[]={0.5,0.5,0.5,1}; specularPower=700; PixelShaderID="Refract"; VertexShaderID="Super"; class Stage1 { texture="LoDR_Weapons\Data\LoDR_0Alpha_CA.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage2 { texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage3 { texture="#(argb,8,8,3)color(0.0,0.0,0.0,0.2,MC)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage4 { texture="#(argb,8,8,3)color(1.0,1.0,1.0,1.0,AS)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage5 { texture="#(argb,8,8,3)color(1,0.7,1,0,SMDI)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage6 { texture="LoDR_Weapons\Data\LoDR_0Alpha_CA.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; class Stage7 { texture="LoDR_Weapons\Data\LoDR_0Alpha_CA.paa"; useWorldEnvMap="false"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,0}; pos[]={0,0,0}; }; }; Pictures:And here are couple of screenshots on how it looks after application on different models:Before: After:Theorizing:Notice the difference between the VR objects on the left and my test man with different material combos on the right. The white sheen is obvious and something that happen on all other objects me or zantetzou have tried but the VR objects the effect is working (maybe it works "wrong" on them in a way, but it looks the like what we would like to use) but so far I have not figured out why.Currently I've theorized that whatever the texture/material combo the model originally has somehow affects how the refracting shader works on them and thus I have extracted the texture/material paths applied on the VR objects via hiddenSelectionsTextures[] and hiddenSelectionsMaterials[] in their configs and tried to apply the same ones on my test man in the pictures. This however did not produce the any results and so I am here asking if anyone else has ideas on how to proceed from here.I've been considering the possibility that man character is drawn somehow different from static objects and as my next step I will make a static test object to see if theres any difference there. For some reason the white sheen also disappears in some angles and when the object is looked at from high speed, or the objects moves fast:Shot this one when running past the testman:Known objects it works on:So far following objects have show the refracting shader as in the picture on the left:Sphere (200cm) / Sign_Sphere200cm_F VR Wheeled APC Target / Land_VR_Target_APC_Wheeled_01_F VR Tank Target / Land_VR_Target_MBT_01_cannon_F VR MRPA Targetr / Land_VR_Target_MRAP_01_F VR Wall / VR_Billboard_01_F Thanks for reading this far: And I would suspect that it would work on some other VR objects like the sphere that are somewhat see through/emmisive to begin with.I will continue working on this since I really want to make a scifi optical camouflage ghillie suit for our mod and eventually when we get back to our C&C mod this effect would be quite essential for Nod Stealth Tanks.If you get any ideas on what makes this work, don't hesitate to post on this thread! 15 Share this post Link to post Share on other sites
HorribleGoat 1473 Posted June 25, 2016 Now that the thread loads and the extra duplicates I managed to post while the sqf server bugged are gone. I'll reserve this slow for additional update and images.Slight changes to the RVMAT can produce quite cool results. The effects still work on the few objects listed above. On that front there is still a lot to do.Also a progress update! Made my own static cube with hiddenselectiontexture and the whole shabang and the refracting material does work with it. But when the same cube is copied into a man character it too takes on the white sheen. So the material/texture combo works! All thats left is to figure out what causes that white sheen. I think its the same with any vehicles too, but have to make a test to be sure.Vehicle test:Tested it out with vanilla Ifrit and pilot. As you can see the texture is not see through as it is on the cube on the background and the small cube on the test man model in front of it shows the contrast quite well.Makes me think moving objects are drawn different from static ones.CONCLUSIONWith quite extensive testing and fiddling with the .rvmat values I am now quite certain that the "refract" shader is a remnant of some past idea and as it is not used in any BI asset. Because of I dont think the effect can be applied anymore on men or vehicles as Kiory demonstarted in his video.For this reason I've put together alternate method much like the ones that use refracting particles (and this probably could be done with those too) Basically this is combination of a simple mesh object that the effect works on and a custom man character with extra animation following memorypoints that allow the attached meshpieces to move with the animations. 16 Share this post Link to post Share on other sites
Whitefame 16 Posted May 20, 2017 I found a very simple solution to the first method...the original texture for the vehicle/object must end with _ca, it seems like the alpha is only added with the orginal texture..and works great with moving vehicles. https://gyazo.com/1cf752018440e580a91a42c683f1cf6c 1 Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 20, 2017 16 minutes ago, Whitefame said: I found a very simple solution to the first method...the original texture for the vehicle/object must end with _ca, it seems like the alpha is only added with the orginal texture..and works great with moving vehicles. https://gyazo.com/1cf752018440e580a91a42c683f1cf6c Good catch! Unfortunately can be applied only on custom assets, but also great that it is possible on vehicles. Last time I tried _CA texture on man character it did not work, but things may have changed. Gotta give it a go again when time allows it. 1 Share this post Link to post Share on other sites
Whitefame 16 Posted May 20, 2017 4 minutes ago, HorribleGoat said: Good catch! Unfortunately can be applied only on custom assets, but also great that it is possible on vehicles. Last time I tried _CA texture on man character it did not work, but things may have changed. Gotta give it a go again when time allows it. Well i tried it with an custom gillie suit that covers the whole body and that worked well.. but yeah to bad it only works for custom assets Share this post Link to post Share on other sites
warden_1 1070 Posted May 23, 2017 Would be cool to make a Ghost Recon Future Soldier like cloak. If you want to shoot me a message I'd love to help make something like that work. We could easily make a custom cloak object that goes in the backpack or headgear slot and covers the top of the body and lower portions when crouched or something. Just let me know. Share this post Link to post Share on other sites
LykosMactire 298 Posted May 23, 2017 Whitefame whom helps the optre team a bit has figured it out aswell and his results are near exact of kiorys 2 Share this post Link to post Share on other sites
Whitefame 16 Posted May 23, 2017 9 hours ago, LykosMactire said: Whitefame whom helps the optre team a bit has figured it out aswell and his results are near exact of kiorys Its a really cool effect, put it into an ODST suit today :Dhttps://gyazo.com/69e19eb9a720b3acf19bb1734758d951 2 Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 23, 2017 2 hours ago, Whitefame said: Its a really cool effect, put it into an ODST suit today :Dhttps://gyazo.com/69e19eb9a720b3acf19bb1734758d951 Is that also with _CA texture applied on the model originally? That seems to work pretty much as kiory got it! Would you share your rvmat for comparison? Share this post Link to post Share on other sites
Whitefame 16 Posted May 23, 2017 2 minutes ago, HorribleGoat said: Is that also with _CA texture applied on the model originally? That seems to work pretty much as kiory got it! Would you share your rvmat for comparison? Yupp the _CA texture is in the model originally and it works fine with the rvmat you have in the first post. Thats also why the VR objects works cause they got an _CA texture applied in their p3d. 1 Share this post Link to post Share on other sites
HitmanTwoActual 188 Posted May 23, 2017 2 hours ago, Whitefame said: Its a really cool effect, put it into an ODST suit today :Dhttps://gyazo.com/69e19eb9a720b3acf19bb1734758d951 Wow I have been looking for that. As HorribleGoat said, would you mind sharing how you got there or even release your file for it? Nice work! Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 23, 2017 7 minutes ago, Whitefame said: Yupp the _CA texture is in the model originally and it works fine with the rvmat you have in the first post. Thats also why the VR objects works cause they got an _CA texture applied in their p3d. Oh alright! I do remember testing on the VR men last time and I may remember wrong but they did not work last time. Even the custom blue man I used in the video did not work but had the white sheen problem so maybe something has changed with the shaders. Actually VR men probably dont have _CA texture on them originally so thats probably why. Mistook VR objects and men. The objects did work back then too, but my test man with _CA texture did not. -> Why I opted for the workaround in the video. Share this post Link to post Share on other sites
Whitefame 16 Posted May 23, 2017 1 minute ago, HorribleGoat said: Oh alright! I do remember testing on the VR men last time and I may remember wrong but they did not work last time. Even the custom blue man I used in the video did not work but had the white sheen problem so maybe something has changed with the shaders. When reading your first post it seemed like it worked with the VR vehicles atleast. Yeah they may have updated the shaders but still bad that it won't work with the rest of the a3 assets. applying any _ca textures on it makes the texture go black/white Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 23, 2017 4 minutes ago, Whitefame said: When reading your first post it seemed like it worked with the VR vehicles atleast. Yeah they may have updated the shaders but still bad that it won't work with the rest of the a3 assets. applying any _ca textures on it makes the texture go black/white Yeah that happened for me too! 1 Share this post Link to post Share on other sites
PuFu 4600 Posted May 23, 2017 how did i miss this thread till now....:) 3 Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 23, 2017 1 hour ago, PuFu said: how did i miss this thread till now....:) :D It probably got lost in the old pages. 1 Share this post Link to post Share on other sites
breech99 47 Posted May 23, 2017 This is great for that old predator mission! - team vs predator player. Interesting research! Good discovery. Turns out, that old predator mission does use alpha textures named cloak ending in _ca. It's a cool effect. 1 Share this post Link to post Share on other sites
Whitefame 16 Posted May 23, 2017 HorribleGoat, in your youtube video for the lost dragons camouflage test you get a much cleaner look then what I currently get. did you use a different rvmat for that effect? On 6/25/2016 at 10:47 PM, HorribleGoat said: Now that the thread loads and the extra duplicates I managed to post while the sqf server bugged are gone. I'll reserve this slow for additional update and images. Slight changes to the RVMAT can produce quite cool results. The effects still work on the few objects listed above. On that front there is still a lot to do.Also a progress update! Made my own static cube with hiddenselectiontexture and the whole shabang and the refracting material does work with it. But when the same cube is copied into a man character it too takes on the white sheen. So the material/texture combo works! All thats left is to figure out what causes that white sheen. I think its the same with any vehicles too, but have to make a test to be sure.Vehicle test: Tested it out with vanilla Ifrit and pilot. As you can see the texture is not see through as it is on the cube on the background and the small cube on the test man model in front of it shows the contrast quite well. Makes me think moving objects are drawn different from static ones.CONCLUSION With quite extensive testing and fiddling with the .rvmat values I am now quite certain that the "refract" shader is a remnant of some past idea and as it is not used in any BI asset. Because of I dont think the effect can be applied anymore on men or vehicles as Kiory demonstarted in his video. For this reason I've put together alternate method much like the ones that use refracting particles (and this probably could be done with those too) Basically this is combination of a simple mesh object that the effect works on and a custom man character with extra animation following memorypoints that allow the attached meshpieces to move with the animations. Share this post Link to post Share on other sites
Valken 622 Posted May 24, 2017 I wanted to comment that this mission has an optical camo effect on BIS assets: http://steamcommunity.com/profiles/76561198013167055/myworkshopfiles/?appid=107410 It works great so perhaps you guys can contact JasonB to get his input as well? He has great ideas for this even in his 1st Predator mission with a "fake" optical camo effect. Share this post Link to post Share on other sites
jarrad96 1940 Posted May 24, 2017 I have a script for Active Camo I've been tweaking as well, I can send you the files if you like. 2 Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 24, 2017 2 minutes ago, jarrad96 said: I have a script for Active Camo I've been tweaking as well, I can send you the files if you like. <SNIP> Is that using the heat haze particle effect and hiding the unit? Share this post Link to post Share on other sites
jarrad96 1940 Posted May 24, 2017 "\A3\data_f\ParticleEffects\Universal\Refract" is the name of the particle effect in the script. As you can see it does seem to give a haze effect on the player's position, but it is rather faint and only really visible while halted (at least from the player's perspective, I haven't tested fighting units equipped with it yet) Share this post Link to post Share on other sites
R0adki11 3949 Posted May 24, 2017 1 hour ago, jarrad96 said: "\A3\data_f\ParticleEffects\Universal\Refract" is the name of the particle effect in the script. As you can see it does seem to give a haze effect on the player's position, but it is rather faint and only really visible while halted (at least from the player's perspective, I haven't tested fighting units equipped with it yet) That would be interesting in multiplayer 1 Share this post Link to post Share on other sites
Phantom Hawk 44 Posted May 24, 2017 I would love to see this on a viper uniform it would look amazing. Share this post Link to post Share on other sites
jarrad96 1940 Posted May 24, 2017 I already have CROSSCOM support for the Viper helmets- Some Viper kit would be possibly useful for a BODARK version of the mission above. I'm not a good mission maker at all, so it may take a while to release in a complete mission state. I can easily make the Active Camo support any other uniforms I have class names for, meaning any mod, Apex or vanilla uniforms are all GTG with just a bit of editing. As an attempt in balancing such a massively powerful feature, it only works for short durations and has time to recharge. To aid in aiming the stealth effect is not visible in first person, unlike in GR-FS, meaning that iron sights, red dots and such should be able to used a bit more accurately- you can see that in the video. 3 Share this post Link to post Share on other sites