Jump to content

AlexKimov

Members
  • Posts

    148
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by AlexKimov

  1. How about to create some kind of GR community SDK with template maps, models, documentation, import/export tools, etc?
  2. I 'm working on QOB/MAP import plugin for Blender. Maybe i'll finish it sometime. This game needs fans. Real ones. )
  3. Glossary mn - magic number DATETIME - date and time 4 bytes UINT - integer 4 bytes UINT16 - 2 bytes BYTE - 1 byte FLOAT - real number 4 bytes char - chars array Sections 1. MAP Header (file id) 2. MaterialList section 3. GeometryList section 4. PortalList section 5. OccluderList section 6. LightList section 7. VFogList section 8. ObjectList section 9. RoomList section 10. TransitionLineList section 11. PlanningLevelList section File structure 1. File Header 1.1 MAP Header (file id) HEX "0D 00 00 42 65 67 69 6E 4D 61 70 76 2E 30" | TEXT "....BeginMapv4.0" UINT chars_count char BeginMapv4.0_string 1.2 MAP file dates DATETIME File_create_time Section size - 21 bytes 1.2 MaterialList section 2.1 Section header UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char MaterialList_string 2.2 Materials UINT Materials_count//--Array of materials-- UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char MaterialName_string FLOAT Opacity FLOAT Faceted FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT SpecularLevel BYTE 2Sided2.3 Textures UINT Textures_count//--Array of textures-- UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char TextureName_string BYTE mn UINT chars_count char TextureFileName_string UINT AdvTransparencyType UINT Tiled FLOAT SelfIllumination 3. GeometryList section UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char GeometryList_string UINT RoomsCount; //--Array of rooms-- UINT SectionSize; UINT mn; UINT chars_count char version_string UINT number UINT StringLength char name_string UINT SectionSize; UINT mn; UINT chars_count char version_String UINT number UINT StringLength char room_name_string BYTE chars_count BYTE ModelName UINT Verticie_Count; //--Array of Vertice-- if Verticies_Count not 0 FLOAT X FLOAT Y FLOAT Z UINT Room_Object_Count if RoomObjectCount not 0 BYTE mn BYTE isUseDetailedDarkmap; BYTE DetailTexture UINT MaterialIndex UINT Textured if isTextured not 0 UINT TextureIndex UINT DetailTextureIndex UINT MN; UINT SelfIlluminationMap UINT SpecularMap UINT BumpMap UINT ReflectionMap UINT MapCount UINT FacesCount; //-- Array of face normals -- FLOAT X; FLOAT Y; FLOAT Z; FLOAT mn; //-- Array of FaceIndicies UINT16 P1 UINT16 P2 UINT16 P3 //-- Array of TextureIndicies UINT16 P1 UINT16 P2 UINT16 P3 UINT TextureVerticiesCount UINT TexturesCount //-- Array of Normals FLOAT X FLOAT Y FLOAT Z //-- Array of TextureCoordinates FLOAT U FLOAT V //-- Array of something FLOAT X FLOAT Y FLOAT Z FLOAT W ..... 4. PortalList section UINT SectionSize; UINT mn UINT chars_count char version_String UINT number UINT chars_count char PortalList_String UINT Count //-- Array of portals -- UINT SectionSize; UINT mn UINT chars_count char version_String UINT number UINT StringLength char room_name_string BYTE chars_count BYTE portalName UINT Vertices_Count // -- Array of Vertices FLOAT x FLOAT y FLOAT z UINT Room_Number UINT Oposite_Room_Number BYTE mn5. OccluderList section UINT SectionSize; UINT mn UINT chars_count char version_String UINT number UINT StringLength char OccluderList_string ...
  4. Glossary mn - magic number UINT - integer 4 bytes UINT16 - 2 bytes BYTE - 1 byte FLOAT - real number 4 bytes char - chars array Sections 1. QOB Header (file id) 2. MaterialList section 3. GeometryList Section 4. Points 5. QOB end of file File structure 1. QOB Header (file id) HEX "0B 00 00 42 65 67 69 6E 4D 6F 64 65 6C 00" | TEXT "....BeginModel" UINT chars_count char BeginModel_string Section size - 15 bytes 2. MaterialList section 2.1 Section header UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char MaterialList_string 2.2 Materials UINT Materials_count//--Array of materials-- UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char MaterialName_string FLOAT Opacity FLOAT Faceted FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT Red FLOAT Green FLOAT Blue FLOAT mn FLOAT SpecularLevel BYTE 2Sided 2.3 Textures UINT Textures_count //--Array of textures-- UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char TextureName_string BYTE mn UINT chars_count char TextureFileName_string UINT AdvTransparencyType UINT Tiled FLOAT SelfIllumination3. GeometryList Section UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char GeometryList_stringUINT Objects_Count --Array of objects-- UINT SectionSize UINT MN UINT chars_count char Version_string UINT version_number UINT chars_count char Name_stringUINT16 mn UINT VerticiesCount //--Array of vertices-- FLOAT X FLOAT Y FLOAT Z UINT Count //--Array of objects-- // params BYTE mn BYTE UseDetailedDarkmap BYTE DetailTexture UINT MaterialIndex UINT Textured UINT TextureIndex UINT DetailTextureIndex UINT SelfIlluminationMap UINT SpecularMap UINT BumpMap UINT ReflectionMap UINT MapCount UINT FacesCount // --Array of face Normals-- FLOAT X FLOAT Y FLOAT Z FLOAT mn // -- Array of face indicies -- UINT16 Vertice1 UINT16 Vertice2 UINT16 Vertice3 // -- Array of Texture indicies -- UINT16 Vertice1 UINT16 Vertice2 UINT16 Vertice3 UINT Vertice_Count UINT TextureCount // Array of Vertice Normals FLOAT X FLOAT Y FLOAT Z // Array of Texture Coordinates FLOAT U FLOAT V // Some array FLOAT X FLOAT Y FLOAT Z FLOAT W4. Points UINT Points_Count if PointsCount not 0 //-- Array of points -- UINT chars_count char PointName; // transformation matrix FLOAT x FLOAT y FLOAT z FLOAT x FLOAT y FLOAT z FLOAT x FLOAT y FLOAT z // position coordinates FLOAT Y FLOAT X FLOAT Z5. QOB end of file HEX "09 00 00 00 45 6E 64 4D 6F 64 65 6C 00" | TEXT "....EndModel" UINT chars_count char EndModel_string Section size - 13 bytes
  5. Analyze *.RSB files examples 1. Bullethole.rsb (mods/origmiss/textures) Section 1 - File header File version - 1. Read first 4 bytes in hex = "01 00 00 00". Convert number to integer = 1. Texture width - 32 pixels. Read second 4 bytes in hex = "20 00 00 00". Convert number to integer = 32. Texture height - 32 pixels and so on... Red bits = 5 Green bits = 6 Blue bits = 5 alpha = 0 (no alpha value) Pixel structure bits per pixel = 5 + 6 + 5 = 16 -> Pixel data size (v.s.) = 2 bytes 5 bits for Red ones, 6 bits for green ones and last ones for blue color 00000 + 000000 + 00000 = 0000000000000000 = 16 bits = 2 Bytes Section 2 - Pixel Array Number of pixels in array = Texture width * Texture height = 32*32 = 1024 Pixel data size = 2 bytes Pixel array size = Number of pixels in array * Pixel data size = 2048 bytes
  6. *.RSB files structure Glossary UINT - integer 4 bytes UINT16 - 2 bytes BYTE - 1 byte FLOAT - real number 4 bytes char - chars array Sections 1. File header 2. Pixel array 3. Texture properties (Alpha blending, position, animation...) File structure 1. File header 1.1 UINT - File version. Avalible file versions 1, 2, 4, 5, 6, 8, 9. UINT - Texture width UINT - Texture height File version higher than 7 + 7 magic bytes (UINT + UINT16 + BYTE) 1.2 Bit Information UINT - red bits UINT - green bits UINT - blue bits UINT - alpha bits 1.3 File version number 9 + 8 magic bytes (UINT + UINT). 1.4 Section size File version | Section Size 1..7 28 8 28 + 7 9 28 + 7 + 8 2. Pixel array 2.1 Pixel array element size bits per pixel = red bits + green bits + blue bits + alpha bits Bits | Element Size 8 1 Byte 16 2 Bytes 24 3 Bytes 32 4 Bytes 2.2 Array elements count = (texture width) * (texture height) 2.3 Section size = Element Size * Count 3. Texture properties File version = 1 empty File version = 2..4 Section size 46..53 null values File version 5 and higher 1 - on, 0 - off BYTE - AlphaBlending BYTE - AlphaTesting BYTE - Sampling BYTE - Animation BYTE - Scrolling BYTE - Tiled BYTE - Compression BYTE - Distortion File version higher then 7 UINT Tags other BYTE mn (magic number) BYTE mn (magic number) BYTE mn (magic number) UINT - Source_Function UINT - Destination_Function UINT - Compare_Function BYTE - Reference_Value UINT - Scrolling_Type FLOAT - Horizontal_Rate FLOAT - Vertical_Rate UINT - Animation_Type FLOAT - Animation_Interval UINT - Textures (for animation) count If Animation and Textures count not null Textures names array UINT Texture_name_length1 char Texture_name1 UINT Texture_name_length2 char Texture_name2 etc... File version higher then 4 UINT Maps_Count UINT Subsampling_Priority BYTE Damaged if Damaged not null UINT Damaged_texture_namelength if Damaged_texture_name_Length not null char Damaged_Texture_Name File version higher then 2 UINT Surface_Type Mipmap textures section if available
×
×
  • Create New...