Rvmat File Format: Difference between revisions
m (Removed unnecessary category.) |
Lou Montana (talk | contribs) m (Fix) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Rvmat files are the texture (material) files introduced with {{arma1}}. Their syntax is similar to that of a {{Link|Config.cpp/bin File Format|config file}}. | |||
Rvmat files are the texture (material) files | |||
== Base Format == | |||
The minimum construct of an rvmat file is as below; however, it is recommended to use {{Link|#TexGen Usage|TexGen}} as described below to save on {{hl|uvTransform}} declarations. | |||
<syntaxhighlight lang="cpp"> | |||
// rgba values being replaced by the value of your choice | |||
ambient[] = { r, g, b, a }; | |||
diffuse[] = { r, g, b, a }; | |||
forcedDiffuse[] = { r, g, b, a }; | |||
emmisive[] = { r, g, b, a }; | |||
specular[] = { r, g, b, a }; | |||
specularPower = 64.0; | |||
pixelShaderID = "Normal"; | |||
vertexShaderID = "BasicAlpha"; | |||
class Stage0 | |||
{ | |||
texture = "#(rgb,8,8,3)color(0,0,1,1,SMDI)"; | |||
// uvSource = "tex"; // default uvSource is "tex" | |||
filter = "Point"; | |||
}; | |||
// ... | |||
class StageLast | |||
{ | |||
texture = "#(rgb,8,8,3)color(0,0,1,1,SMDI)"; | |||
filter = "Point"; | |||
}; | |||
</syntaxhighlight> | |||
[[ | === Values === | ||
[[ | |||
[[Category: | * {{hl|ambient}} | ||
* {{hl|diffuse}} | |||
* {{hl|forcedDiffuse}} | |||
* {{hl|emmisive}} | |||
* {{hl|specular}} | |||
* {{hl|specularPower}} | |||
* {{hl|pixelShaderID}} | |||
* {{hl|vertexShaderID}} | |||
==== Stage ==== | |||
* {{hl|texture}} | |||
* {{hl|uvSource}} | |||
* {{hl|filter}} | |||
== TexGen Usage == | |||
TexGen usage prevents {{hl|uvTransform}} to be redeclared in every stage. | |||
<syntaxhighlight lang="cpp"> | |||
ambient[] = { 1, 1, 1, 1 }; | |||
diffuse[] = { 1, 1, 1, 1 }; | |||
forcedDiffuse[] = { 0, 0, 0, 0 }; | |||
emmisive[] = { 0, 0, 1, 10 }; | |||
specular[] = { 1, 1, 1, 1 }; | |||
specularPower = 100; | |||
pixelShaderID = "SuperExt"; | |||
vertexShaderID = "Super"; | |||
class TexGen0 | |||
{ | |||
uvSource = "tex"; | |||
class uvTransform | |||
{ | |||
aside[] = { 1, 0, 0 }; | |||
up[] = { 0, 1, 0 }; | |||
dir[] = { 0, 0, 1 }; | |||
pos[] = { 0, 0, 0 }; | |||
}; | |||
}; | |||
class TexGen1 | |||
{ | |||
uvSource = "none"; | |||
}; | |||
class Stage1 | |||
{ | |||
texture = "z\wolf\addons\wolflogo\tex\wolflogo_nohq.paa"; | |||
texGen = 0; | |||
}; | |||
class Stage2 | |||
{ | |||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; | |||
texGen = 0; | |||
}; | |||
class Stage3 | |||
{ | |||
texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; | |||
texGen = 0; | |||
}; | |||
class Stage4 | |||
{ | |||
texture = "z\wolf\addons\wolflogo\tex\wolflogo_as.paa"; | |||
texGen = 0; | |||
}; | |||
class Stage5 | |||
{ | |||
texture = "z\wolf\addons\wolflogo\tex\wolflogo_smdi.paa"; | |||
texGen = 0; | |||
}; | |||
class Stage6 | |||
{ | |||
texture = "#(ai,64,64,1)fresnel(1.29,0.01)"; | |||
texGen = 1; | |||
}; | |||
class Stage7 | |||
{ | |||
texture = "a3\data_f\env_co.paa"; | |||
texGen = 0; | |||
}; | |||
class Stage8 | |||
{ | |||
texture = "z\wolf\addons\wolflogo\tex\wolflogo_em.paa"; | |||
texGen = 0; | |||
}; | |||
</syntaxhighlight> | |||
{{GameCategory|ofp|Modelling}} | |||
[[Category:Real Virtuality File Formats]] | |||
{{GameCategory|arma1|File Formats}} |
Latest revision as of 15:33, 8 May 2025
Rvmat files are the texture (material) files introduced with Armed Assault. Their syntax is similar to that of a config file.
Base Format
The minimum construct of an rvmat file is as below; however, it is recommended to use TexGen as described below to save on uvTransform declarations.
// rgba values being replaced by the value of your choice
ambient[] = { r, g, b, a };
diffuse[] = { r, g, b, a };
forcedDiffuse[] = { r, g, b, a };
emmisive[] = { r, g, b, a };
specular[] = { r, g, b, a };
specularPower = 64.0;
pixelShaderID = "Normal";
vertexShaderID = "BasicAlpha";
class Stage0
{
texture = "#(rgb,8,8,3)color(0,0,1,1,SMDI)";
// uvSource = "tex"; // default uvSource is "tex"
filter = "Point";
};
// ...
class StageLast
{
texture = "#(rgb,8,8,3)color(0,0,1,1,SMDI)";
filter = "Point";
};
Values
- ambient
- diffuse
- forcedDiffuse
- emmisive
- specular
- specularPower
- pixelShaderID
- vertexShaderID
Stage
- texture
- uvSource
- filter
TexGen Usage
TexGen usage prevents uvTransform to be redeclared in every stage.
ambient[] = { 1, 1, 1, 1 };
diffuse[] = { 1, 1, 1, 1 };
forcedDiffuse[] = { 0, 0, 0, 0 };
emmisive[] = { 0, 0, 1, 10 };
specular[] = { 1, 1, 1, 1 };
specularPower = 100;
pixelShaderID = "SuperExt";
vertexShaderID = "Super";
class TexGen0
{
uvSource = "tex";
class uvTransform
{
aside[] = { 1, 0, 0 };
up[] = { 0, 1, 0 };
dir[] = { 0, 0, 1 };
pos[] = { 0, 0, 0 };
};
};
class TexGen1
{
uvSource = "none";
};
class Stage1
{
texture = "z\wolf\addons\wolflogo\tex\wolflogo_nohq.paa";
texGen = 0;
};
class Stage2
{
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
texGen = 0;
};
class Stage3
{
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
texGen = 0;
};
class Stage4
{
texture = "z\wolf\addons\wolflogo\tex\wolflogo_as.paa";
texGen = 0;
};
class Stage5
{
texture = "z\wolf\addons\wolflogo\tex\wolflogo_smdi.paa";
texGen = 0;
};
class Stage6
{
texture = "#(ai,64,64,1)fresnel(1.29,0.01)";
texGen = 1;
};
class Stage7
{
texture = "a3\data_f\env_co.paa";
texGen = 0;
};
class Stage8
{
texture = "z\wolf\addons\wolflogo\tex\wolflogo_em.paa";
texGen = 0;
};