Jump to content

Recommended Posts

I am trying to make an active camo script. Topic 3 years ago discussed that using this:
 

Spoiler

​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};
};
};

 

would allow players to achieve that (semi transparent vehicles etc,
What I did, I took a random rvmat file from the game, copied it, unbinarised it into .cpp and replaced most of it with the script above.
However when I try to replace some texture with new RVMAT file, game just crashes.

Any idea what is wrong?

PS. finished version should look something like this:
https://gyazo.com/1cf752018440e580a91a42c683f1cf6c

Or this:
https://gyazo.com/69e19eb9a720b3acf19bb1734758d951

Edit: One of the first comments said this, maybe it will help "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."

Edited by marki980908

Share this post


Link to post
Share on other sites

Please don't multiply posts with the same question:

https://forums.bohemia.net/forums/topic/191975-optical-camouflage-material-research/?page=3&tab=comments#comment-3420581

https://forums.bohemia.net/forums/topic/231216-optical-camo/?tab=comments#comment-3420552

 

If you need help for an Arma crash, not saying I can help, send your report files. They are ready for you.

 

Share this post


Link to post
Share on other sites

Well the thing is that the first topic is 3-4 years old, and noone replies to it anymore, so good luck finding answer there, and the previous post in made by me, which to be honest...we both know noone will reply to. RVMAT description of topic is more accurate.
Command I tried to execute:

_this setObjectMaterialGlobal [0, "opticalcamo.rvmat"];

This is the error messege (immediate crash to desktop):
dsgsdgdg.jpg

This is the link to the file
---------------------------------------
Link to crash report

Share this post


Link to post
Share on other sites

Not sure where your default.rvmat comes from. unrapped by Kegetys...

The fact is that the begining seems to be corrupted. You can't replicate tokens like ambient in the same class (and here in no class). See multiple doubloons in:
 

Spoiler

 

ambient[] = {1, 1, 1, 1};
diffuse[] = {1, 1, 1, 1};
forcedDiffuse[] = {0, 0, 0, 0};
emmisive[] = {0, 0, 0, 1};
specular[] = {0, 0, 0, 0};
specularPower = 0;
PixelShaderID = "Refract";
VertexShaderID = "Super";

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";

 

 

Can't help further with this structure.

Share this post


Link to post
Share on other sites

try this...

 

Spoiler

class StageTI
{
	texture="a3\data_f\default_vehicle_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0,0,0,0};
specularPower=0;
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};
	};
};

 


you don't need stage 6 and 7 because it is already defined in stage 1

Share this post


Link to post
Share on other sites
11 hours ago, dalber24 said:

try this...

 

  Reveal hidden contents


class StageTI
{
	texture="a3\data_f\default_vehicle_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0,0,0,0};
specularPower=0;
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};
	};
};

 


you don't need stage 6 and 7 because it is already defined in stage 1

Thanks!
Anyway, I still used the first one and this is what I got:
 

Spoiler

20201022182536-1.jpg

The most right one will be from the code right here:
 

Spoiler

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};
};
};

 

It looks pretty good, however I would like it to be more transparent, right now it stays kinda grey-ish even on altis map, and is only a tiny bit transparent, any idea which parameters to modify? I assume it will be those at the very top? ambient ->to->VortexShadersID?

Also a person that got the best result, in previous topic, said this: "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."
I dont know if it helps.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×