User Tools

Site Tools


arma:file_formats:oprw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma:file_formats:oprw [2009/07/17 09:31] – created oprw initial page. snakemanarma:file_formats:oprw [2024/08/01 07:59] (current) – links added. snakeman
Line 1: Line 1:
-Introduction+====== ArmA 1 WRP File Format OPRWv17, 18, 20 ======
  
-For a general description of wrp files see 8WVR+[[https://www.pmctactical.org/forum/viewforum.php?f=42|ArmA 1 Forum]], [[:arma|ArmA 1 Home]], [[arma:config|ArmA 1 Config]], [[arma:tools|ArmA 1 Tools]], [[arma:file_formats|ArmA 1 File Formats]], [[arma:missions|ArmA 1 Missions]], [[arma:modeling|ArmA 1 3D Modeling]], [[arma:terrain|ArmA 1 Terrain]], [[arma:texturing|ArmA 1 Texturing]], [[arma:scripting|ArmA 1 Scripting]]
  
-Legend+**ArmA 1** aka Armed Assault (ArmA) 
 + 
 +For a general description of wrp files see [[8wvr|8WVR]]. 
 + 
 + 
 +====== Legend ======
  
 Little endian byte order, lsb first for numeric values, text is stored in Big endian byte order. Little endian byte order, lsb first for numeric values, text is stored in Big endian byte order.
Line 15: Line 20:
  
  
-XYPair+====== XYPair ======
  
 <code cpp> <code cpp>
Line 24: Line 29:
 </code> </code>
  
-XYZTriplet+ 
 +====== XYZTriplet ======
  
 <code cpp> <code cpp>
Line 31: Line 37:
  float    x,y,z;  float    x,y,z;
 } }
 +Normally, this structure is normally associated with positional information.
 </code> </code>
  
-Normally, this structure is normally associated with positional information. 
  
- +====== File Format ======
-File Format+
  
 Texture and Terrain Grid Sizes are derived from the header. Texture and Terrain Grid Sizes are derived from the header.
Line 50: Line 55:
  WrpHeader     Header;  WrpHeader     Header;
  
- ushort        UnknownGrid1[TerrainGridSizeXY]; // a gridblock containing cellenv bits (16 bits per terrain cell). + ushort        UnknownGrid1[TextureCellSizeXY]; // a gridblock 
-                                                // Bits 0-2 are ground (0x0), coast (0x1), beach (0x2) and sea (0x3). Bit 4 indicates road/airstrip. + byte          UnknownGrid2[TextureCellSizeXY]; // a gridblock // mostly the value 0x03 and probablay related to Config.cpp CfgEnvSounds class
- byte          UnknownGrid2[TerrainGridSizeXY]; // a gridblock // mostly the value 0x03 and probablay related to Config.cpp CfgEnvSounds class+
  
  ulong         nPeaks;  ulong         nPeaks;
  XYZTriplet    PeakPositions[nPeaks];  XYZTriplet    PeakPositions[nPeaks];
  
- ushort        TextureIndex[TextureGridSizeXY]; // a gridblock + ushort        TextureIndex[TextureCellSizeXY]; // a gridblock 
- ushort        PackedRandom[TextureGridSizeXY]; // probably random values needed for calculating clutter models position+ ushort        PackedRandom[TextureGridSizeXY]; //probably random values needed for calculating clutter models position
  if !Elite  if !Elite
   byte         PackedBytes1[TerrainGridSizeXY]; //seems to be related to clutters or sat mask distance as it is   byte         PackedBytes1[TerrainGridSizeXY]; //seems to be related to clutters or sat mask distance as it is
Line 74: Line 78:
  ClassedModel  Models[nClassedModels];          //"Land_Hangar\0" : "ca\buildings\Hangar.p3d\0"  ClassedModel  Models[nClassedModels];          //"Land_Hangar\0" : "ca\buildings\Hangar.p3d\0"
  
- ushort        UnknownGrid3[TerrainGridSizeXY]; // a gridblock+ byte          UnknownGrid3[TextureCellSizeXY]; // a gridblock
  
  ulong         SizeOfObjects;                   //in bytes  ulong         SizeOfObjects;                   //in bytes
  
- ushort        UnknownGrid4[TerrainGridSizeXY]; // a gridblock+ byte          UnknownGrid4[TextureCellSizeXY]; // a gridblock
  
  ulong         SizeOfMapInfo;                   //in bytes  ulong         SizeOfMapInfo;                   //in bytes
Line 99: Line 103:
  
  
-WrpHeader+====== WrpHeader ======
  
 <code cpp> <code cpp>
Line 106: Line 110:
  char    Filetype;        // "OPWR"  char    Filetype;        // "OPWR"
  ulong   version;         // 0x12 = 18  ulong   version;         // 0x12 = 18
- XYPair  TextureGridSize; // 256 x 256 (SaraLite), 128 x 128 (Intro) + XYPair  TextureGridSize; // 256 x 256 eg 
- XYPair  TerrainGridSize; // 1024 x 1024 (SaraLite), 512 x 512 (Intro) + XYPair  TerrainGridSize; // ditto 
- float   CellSize;        // Texture grid cell size in meters (40m)+ float   CellSize;        // generally 50.0 meters
 } }
 </code> </code>
  
-This is a traditional wrp header endemic to most wrp formats. The CellSize was introduced during Elite. The terrain grid cell size can be derived as follows: CellSize * TextureGridSizeX / TerrainGridSizeX, and is 10m for SaraLite and Intro.+This is a traditional wrp header endemic to most wrp formats. The CellSize was introduced during Elit
  
-GridBlock+ 
 +====== GridBlock ======
  
 The result of decompressing any GridBlock is to produce an array the size of the Header's TextureGridSizeXY, at the TypeSize specified. Eg be it byte, or ushort. The result of decompressing any GridBlock is to produce an array the size of the Header's TextureGridSizeXY, at the TypeSize specified. Eg be it byte, or ushort.
Line 132: Line 137:
 GridBlock is currently in the 'discussion tab'. GridBlock is currently in the 'discussion tab'.
  
-Texture+ 
 +====== Texture ======
  
 <code cpp> <code cpp>
Line 169: Line 175:
 The ushort Textureindices (once decomposed from a GridBlock) contain references to a 'texture'. no index value of zero can exist. (The first texture of the list is always a dummy entry) The ushort Textureindices (once decomposed from a GridBlock) contain references to a 'texture'. no index value of zero can exist. (The first texture of the list is always a dummy entry)
  
-ClassedModel+ 
 +====== ClassedModel ======
  
 <code cpp> <code cpp>
-ClassedModel + ClassedModel { asciiz class_name; //"Land_Hangar\0" asciiz model_path; //"ca\buildings\Hangar.p3d" XYZTriplet Position; ulong unknown; }
-{ +
- asciiz class_name; //"Land_Hangar\0" +
- asciiz model_path; //"ca\buildings\Hangar.p3d" +
- XYZTriplet Position; +
- ulong unknown; +
-}+
 </code> </code>
  
 This is a fairly repetitious list of often identically named class and model, used as an index from an as yet unknown grid table. This is a fairly repetitious list of often identically named class and model, used as an index from an as yet unknown grid table.
  
-RoadNet+====== RoadNet ======
  
 <code cpp> <code cpp>
-RoadNet + RoadNet { ulong nRoadParts; // Zero or More... RoadPart RoadParts[nRoadParts]; } TextureGridSizeXY];
-{ +
- ulong nRoadParts; // Zero or More... +
- RoadPart RoadParts[nRoadParts]; +
-} TextureGridSizeXY];+
 </code> </code>
  
-Every cell on the map has a RoadNet entry. If there are no road(s) for that cell, there are no RoadParts (nRoadParts=0)+Every cell on the terrain has a RoadNet entry. If there are no road(s) for that cell, there are no RoadParts (nRoadParts=0)
  
 RoadParts, while, ultimately being no more (or less) than just another P3D model, are contained separately to models generally, to better realize terrain streaming and for AI driving ability. RoadParts, while, ultimately being no more (or less) than just another P3D model, are contained separately to models generally, to better realize terrain streaming and for AI driving ability.
  
-RoadPart+====== RoadPart ======
  
 <code cpp> <code cpp>
-RoadPart + RoadPart { ushort nRoadPositions; XYZTriplet RoadPositions[nRoadPositions]; byte Flags[4]; asciiz Model; float matrix[12]; }
-{ +
- ushort nRoadPositions; +
- XYZTriplet RoadPositions[nRoadPositions]; +
- byte Flags[4]; +
- asciiz Model; +
- float matrix[12]; +
-}+
 </code> </code>
  
-Object Optional+ 
 +====== Object Optional ======
  
 <code cpp> <code cpp>
-Object + Object { ulong ObjectID; ulong modelIndex; // into the [[#Models|models path name list]] (1 based) float TransformMatrix[3][4]; // standard directX transform matrix ulong 0x02; }
-{ +
- ulong ObjectID; +
- ulong modelIndex; // into the [[#Models|models path name list]] (1 based) +
- float TransformMatrix[3][4]; // standard directX transform matrix +
- ulong 0x02; +
-}+
 </code> </code>
  
   * maxObjectID is somewhat irrelevant. It is indeed the id of the highest value ObjectID, but, these 'ID's, while unique are highly arbitrary in nature and alter on any change to the 'world' when editing in oxygen/visitor. This ID can occur anywhere in the object list, and the id values before it are non-sequential. maxObjectID cannot be used as a nObject ID's eg.   * maxObjectID is somewhat irrelevant. It is indeed the id of the highest value ObjectID, but, these 'ID's, while unique are highly arbitrary in nature and alter on any change to the 'world' when editing in oxygen/visitor. This ID can occur anywhere in the object list, and the id values before it are non-sequential. maxObjectID cannot be used as a nObject ID's eg.
- 
   * If SizeOfObjects above == 0 then there are no objects.   * If SizeOfObjects above == 0 then there are no objects.
  
Line 229: Line 213:
  
  
-MapInfo Optional+====== MapInfo Optional ======
  
 <code cpp> <code cpp>
Line 241: Line 225:
 Mapinfo, when it exists, extends to end of file. The sizeof each entry, is determined by it's info type thus: Mapinfo, when it exists, extends to end of file. The sizeof each entry, is determined by it's info type thus:
  
-MapData+ 
 +====== MapData ======
  
 <code cpp> <code cpp>
Line 254: Line 239:
 </code> </code>
  
-MapType1+ 
 +====== MapType1 ======
  
 <code cpp> <code cpp>
-MapType1 +MapType1 { ulong ObjectId float x, z }
-{ +
- ulong ObjectId +
- float x, z +
-}+
 </code> </code>
  
-MapType2+ 
 +====== MapType2 ======
  
 <code cpp> <code cpp>
-MapType2 +MapType2 { ulong ObjectId float Bounds[4][2]; }
-{ +
- ulong ObjectId +
- float Bounds[4][2]; +
-}+
 </code> </code>
  
-MapType3+ 
 +====== MapType3 ======
  
 <code cpp> <code cpp>
-MapType3 +MapType3 { ulong unknown[2]; float line[2][2];? }
-{ +
- ulong unknown[2]; +
- float line[2][2];? +
-}+
 </code> </code>
  
-MapType4+ 
 +====== MapType4 ======
  
 <code cpp> <code cpp>
-MapType4 +MapType4 { ulong ObjectId float Bounds[4][2]; byte Color[4] //rgba }
-{ +
- ulong ObjectId +
- float Bounds[4][2]; +
- byte Color[4] //rgba +
-}+
 </code> </code>
  
-MapType5+ 
 +====== MapType5 ======
  
 <code cpp> <code cpp>
-MapType5 +MapType5 { ulong ObjectId float line[2][2];? }
-{ +
- ulong ObjectId +
- float line[2][2];? +
-}+
 </code> </code>
  
-Packed Data 
  
-All variables starting with "Packed" are compressed with the common BIS algorithm that is also used in paa and OFP pbo files.+====== Packed Data ====== 
 + 
 +All variables starting with "Packed" are compressed with the common bis algorithm that is also used in paa and OFP pbo files. 
 + 
 + 
 +======= Bimpas ======= 
 + 
 +bimpas files are associated with Xbox elite they were the precursor to ArmA's rvmat files 
 + 
 +in both cases they define a series of textures for p3d models (and wrps) 
 + 
 +The new, visitor 3 graphical editor tool refers to bimpas files as 
 + 
 +  * rvmat surface materials 
 +  * bimpas transition materials 
 + 
 +rvmat files are a series of paas bimpas files are a series of rvmats 
 + 
 + 
 +====== Rapification ====== 
 + 
 +Ordinarily, these files, if binarised, are rapified in the normal xbox/arma manner 
 + 
 +some files, possibly in error, contain substituted space characters for zeroes. 
 + 
 +this is either an encryption, or, possibly a simple error 
 + 
 + 
 +====== Example ====== 
 + 
 +<code cpp> 
 +class Pass0 
 +
 + material = "ca\introofp\ps.rvmat"; 
 + texture = "ca\introofp\ps.paa"; 
 + tlAlpha = 1; 
 + trAlpha = 1; 
 + blAlpha = 1; 
 + brAlpha = 1; 
 +}; 
 + 
 +class Pass0 
 +
 + material = "LandText\az.rvmat"; 
 + texture = "LandText\az.paa"; 
 + trAlpha = 1; 
 +}; 
 + 
 +class Pass1 
 +
 + material = "LandText\ba.rvmat"; 
 + texture = "LandText\ba.paa"; 
 + blAlpha = 1; 
 +}; 
 + 
 +class Pass2 
 +
 + material = "LandText\_N.rvmat"; 
 + texture = "LandText\_N.paa"; 
 + brAlpha = 1; 
 +}; 
 + 
 +class Pass3 
 +
 + material = "LandText\Dl.rvmat"; 
 + texture = "LandText\Dl.paa"; 
 + tlAlpha = 1; 
 +}; 
 +</code> 
arma/file_formats/oprw.1247823099.txt.gz · Last modified: 2009/07/17 09:31 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.