Here is a short but hopefully useful document on how the Outrage Room Format (ORF) works. This document is meant to help gamers who want to write their own exporters and use their favorite 3d modelling program and D3edit together. --------------------------------------------------------------- An ORF file describes one room. A room is a collection of faces defined by any number of 3d vectors. To help conserve memory, faces can share vectors. The ORF file is broken up into chunks which describe a certain aspect of the room like header, vectors, and textures. A chunk is a CHUNK_ID (int, 4 bytes), a size (int, 4bytes), and the corresponding data. Here, in C, is a code that saves a room. For our purposes, the room structure would be your 3d modelers data coverted in a way that could be used by the following routine. ------------------------------------ #define ROOM_VERTEX_CHUNK 1 #define ROOM_FACES_CHUNK 2 #define ROOM_END_CHUNK 3 #define ROOM_TEXTURE_CHUNK 4 #define ROOM_HEADER_CHUNK 5 #define ROOMFILE_VERSION 4 #define LIGHT_MULTIPLE_DEFAULT 4 #define TEXTURE_DEFAULT 0 // saves a room in our ORF (Outrage room file) format void SaveRoom (char *filename) { CFILE *outfile; int headsize,savepos,vertsize,facesize,texsize; int highest_index=0; short Room_to_texture[MAX_TEXTURES]; int t,found_it=0; // Open the file for writing outfile=(CFILE *)cfopen (filename,"wb"); if (!outfile) { return; // Couldn't open file for writing! } // write out header info cf_WriteInt (outfile,ROOM_NEW_HEADER_CHUNK); headsize=cftell(outfile); // Save this file position so we know where to write the size of the chunk cf_WriteInt (outfile,-1); cf_WriteInt (outfile,ROOMFILE_VERSION); cf_WriteInt (outfile,Room.num_verts); cf_WriteInt (outfile,Room.num_faces); // Now go back and fill in the size of the chunk savepos=cftell (outfile); cfseek (outfile,headsize,SEEK_SET); cf_WriteInt (outfile,(savepos-headsize)-4); cfseek (outfile,savepos,SEEK_SET); // write out vertex info cf_WriteInt (outfile,ROOM_VERTEX_CHUNK); vertsize=cftell(outfile); cf_WriteInt (outfile,-1); for (int i=0;i