Rvmat File Format

From Bohemia Interactive Community
Revision as of 07:32, 26 January 2009 by Mikero (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Work In Progress

Rvmat files are the material (texture) files for Armed Assault.

The text they contain are classic token pair and classname structures. As such, they are raPifiable just like a config or a mission.sqm. Normally, Rvmats are raPified before use by the game engine, but, just like similar files (mission.sqm eg) they can be passed in text form and let the engine compile it there and then. This, obviously creates an engine load lag time before game start.

The minimum construct of an rvmat file is as follows;

//class NameOfRvmatFile //{

  Ambient[]={D3DCOLORVALUES};    
  Diffuse[]={D3DCOLORVALUES};  
  ForcedDiffuse[]={D3DCOLORVALUES}; 
  emmisive[] = {D3DCOLORVALUES}; 
  specular[] = {D3DCOLORVALUES}; 
  specularPower = 64.0;
  PixelShaderID = "Normal";
  VertexShaderID = "BasicAlpha";

//};

where D3DCOLORVALUE = float r,g,b,a;

Note that PixelShaderID is a clear example of Rap files NOT binarised files. If it were binarised, BasicAlpha would be integer 3

class Stage0 { texture="#(rgb,8,8,3)color(0,0,1,1,SMDI)"; uvSource="tex"; Filter="Point"; };