WRPinfo.txt Operation*Flashpoint - Copyright (c) 2001-2003, BIS & CM Small, simple & dirty description of WRP files by 'a-lone-wolf' - mainly for plain "4WVR" format - sorry for any mistakes included ! Version: 2003.01.11_ At this moment 2 formats of worlds files (*.WRP) for O*F are known - recognizeable by the first 4 bytes in file: 'OPRW' - standard "optimized" format used widely for official distribution - no other comments for this format in following text. '4WVR' - special "plain" format used for WRP files distributed with BIStudio's tool "O2light" (intro.wrp) & with Resistance-Demo v.1.78 (ndemo.wrp). Both available "4WVR" files are using matrix 256*256 of cells & in configs is standard value "landGrid=50;", so their real resolution is: 12800 m * 12800 m = the standard size for all official WRP files... It appears, that this size is well balanced for current O*F engine... The plain "4WVR" format could be used directly (in "Worlds" subdir or packed in AddOns' PBO files) or could be optimized with the help of official "Binarize" tool by BIStudio (if any problem with the 2nd version of "Binarize" tool, try the first older one). Optimized file = usually smaller size = better for distribution. For any working, the plain "4WVR" format appears to be better, because no pre or on-fly processing is necessary to get non-optimized data in fixed-length blocks. And post-processing can be done with "Binarize"... It appears, current O*F engine supports following sizes of WRP: power of 2 & square. WRP parts/fixed_length_blocks (best viewed with fixed-wide fonts, no-wrapp text format) of "intro.wrp" (256*256): Block "3Dobjects" could be missing - it's ideal for fast testing of terrain in-game without dealing with any 3D-objects in initial stage of development... Type (Intel byte order) lengths in bytes: byte 1 long 4 short 2 float 4 HexAddr Bytes Type Value Info Block Size [bytes] ----------------------------------------------- Head 4+4+4 = 12 (fixed-length) 00000 4 byte 4WVR IDtag 00004 4 long 256 Xsize 00008 4 long 256 Ysize ----------------------------------------------- Elevations SizeOfShort*Xsize*Ysize = 2*256*256 = 131072 (fixed-length-for-size) 0000C 2 short -957 0000E 2 short -1081 00010 2 short -1074 .....repeat..... ----------------------------------------------- TextureIndexes SizeOfShort*Xsize*Ysize = 2*256*256 = 131072 (fixed-length-for-size) 2000C 2 short 4 2000E 2 short 4 20010 2 short 4 .....repeat..... ----------------------------------------------- TextureFilenames SizeOfPath*CountOfTextures = 32*512 = 16384 (fixed-length) 4000C 32 string LandText\mo.pac 0.index Null in first position disables texture... 4002C 32 string landtext\s3.paa 1. NullTerminatedStrings 4004C 32 string landtext\sh.paa 2. 4006C 32 string landtext\p4.paa 3. 4008C 32 string landtext\pi.paa 4. 400AC 32 string landtext\tt.paa 5. .....repeat..... ----------------------------------------------- 3Dobjects SizeOfPath*CountOf3Dobjects = 128*CountOf3Dobjects (variable-multiplicator-of-fixed-length) 4400C 4 float rotation/slant 44010 4 float X 44014 4 float Z 44018 4 float Y 4401C 4 float slant/rotation 44020 4 float X 44024 4 float Z 44028 4 float Y 4402C 4 float normalPosition 44030 4 float X 44034 4 float Z 44038 4 float Y 4403C 4 long 3DobjectIndex 44040 76 string 3DobjectFilename NullTerminatedStrings .....repeat..... -----------------------------------------------EOF Total length without 3Dobjects (block with variable size) = Head + Elevations + TextureIndexes + TextureFilenames 278540 = 12 + 131072 + 131072 + 16384 For any WRP (4WVR) of 512*512 size the numbers are as follows: Total length without 3Dobjects (block with variable size) = Head + Elevations + TextureIndexes + TextureFilenames 1064972 = 12 + 524288 + 524288 + 16384 where 524288 is, of course = 2*512*512