Page 1 of 1

OOF documentation where?

Posted: Sun Mar 19, 2006 3:31 pm
by Diedel
The one on descent-network.com might be outdated. I need a current version.

Posted: Tue Mar 21, 2006 4:53 am
by Aus-RED-5
Umm what is an OOF? :lol:

[ EDIT ]

I have no idea! :oops: :P

[ EDIT ]
Never mind.... :roll:

Posted: Tue Mar 21, 2006 10:22 am
by SuperSheep
Thought I already posted this...DBB must have swallowed it up...lol :D

This is from OOF Editor and is in VB. Lemme know if you can follow it. This is from D3, might be differences to D2.

Code: Select all

***** OOF File Format *****

The beginning of every OOF file has a File Header which contains
the file ID and version number of the OOF. After that is a series
if chunks that each begin with a Chunk Header describing the type
of chunk.

// General Data Types
struct vector {
	float x;
	float y;
	float z;
}
struct RGB {
	byte red;
	byte green;
	byte blue;
}
struct FACE_VERT {
	int Index;		// Index of face vert
	float tu;		// Texture U mapping coordinate
	float tv;		// Texture V mapping coordinate
}
struct FACE {
    	vector normal;		// Faces normal
    	int numVerts;		// Number of verts on face
	int textured;		// Is this face textured? 0-No,
				// Anything else, yes
UNION {
	int textureID;		// Texture index(if textured<>0)
	RGB color;		// Color of face(if textured=0)
}
	FACE_VERT faceVerts[numVerts];	// Face vert data
	float x_diff;		// Used for lightmaps I believe
	float y_diff;		// ditto
}
struct SPCL_PT {
	int nameLen;		// Length of SPCL point Name
	char name[nameLen];	// SPCL point name
	int propLen;		// Length of SPCL point Property name
	char prop[propLen];	// Property Name
	vector pos;		// SPCL point position
	float radius;		// Radius of SPCL point
}
struct OOF_PT {
	int parent;		// Parent of Point
	vector pos;		// Position of Point
	vector dir;		// Direction of Point
}
struct WBAT_DATA {
	int numWBATGPNT;		// Number of Gunpoints
	int GPNTindex[numWBATGPNT];	// Gunpoint indexes
	int numWBATTuuret;		// Number of Turrets
	int turretIndex[numWBATTurret];	// Sub-Object index
}
struct TXTRdata {
	int nameLen;		// Length of Texture Name
	string name[nameLen];	// Texture name(Imagename)
}
struct PANI_FRAMES {
	int startTime;		// Start Time of frame
	vector pos;		// Position
}
struct RANI_FRAMES {
	int startTime;		// Start Time of frame
	vector axis;		// Axis of rotation
	int angle;		// Angle to rotate(0-65535=0-360 degrees)
}
struct RANI_ANIM {
	int numKey;		// Number of Key frames
	int min;		// Minimum Key Frame number
	int max;		// Maximum Key Frame number
	RANI_FRAMES RANIFrames[numKey];	// RANI Frames data
}
struct PANI_ANIM {
	int numKey;		// Number of Key frames
	int min;		// Minimum Key Frame number
	int max;		// Maximum Key Frame number
	PANI_FRAMES PANIFrames[numKey];	// PANI Frames data
}



// File Header
struct OOFHeader {
	char fileID(4);		// File ID
	int version;		// Version number
}

struct OOFChunk {
	char chunkID(4);	// Chunk ID
	int chunkLength;	// Length of Chunk
}

// OHDR = Object Data Chunk
struct ObjectData {
	int numSOBJ;		// Number of Sub-Objects in OOF
	float maxRadius;	// Max Radius of Model
	vector minBounding;	// Minimum bounding point for model
	vector maxBounding;	// Maximum bounding point for model
	int numDetailLevels;	// Number of detail levels in model
}

struct ObjectDetail {
	int detailLevel;	// Level of detail
	float depth;		// Depth in models
}

// SOBJ = Sub-Object Chunk
struct SOBJData {
	int Index;		// Sub-Objects index
	int parent;		// Sub-Objects parent index
	vector norm;		// norm for seperation plane(debugging)
	float d;		// norm d for seperation plane(debugging)
	vector pnt;		// pnt for seperation plane(debugging)
	vector offset;		// 3D offset from parent(pivot point)
	float radius;		// Radius of Sub-Object
	int treeOffset;		// Offset of tree data(not used)
	int dataOffset;		// Offset of the data(not used)
	vector geo_center;	// geometric center of this subobject.
				// In the same Frame Of Reference as
				// all other vertices in this submodel.
				// (Relative to pivot point)
	string Name;		// Name of Sub-Object(null terminated)
	string Property;	// Property Name of Sub-Object
				// (null terminated)
	int move_type;		// -1 if no movement, otherwise
				// rotational or positional movement
				// Not used
	int move_axis;		// Movement Axis(Axis to Rotate
				// or move around). Not used
	int numFSChunks;	// Number of freespace chunks
	int FSData[numFSChunks];	// Freespace data
	int numVerts;		// Number of vertices on Sub-Object
	vector vertex[numVerts];	// Vertex positions
	vector normal[numVerts];	// Vertex normals
	float alpha[numVerts];	// Vertex Alpha value. Only present
				// if version => 2300
	int numFaces;		// Number of faces on Sub-Object
	FACE faceData[numFaces];	// Face information
}

// SPCL - Special Point Chunk
struct SPCLData {
	int numSPCL;			// Number of Special Points
	SPCL_PT SPCLpoint[numSPCL];	// Special Point data
}

// ATCH - Attach Point Chunk
struct ATCHData {
	int numATCH;			// Number of Attach points
	OOF_PT pntData[numATCH];	// Attach Point data
}

// NATH - Attach Normal Point Chunk
struct NATHData {
	int numNATH;			// Number of Attach Normals
	OOF_PT pntData[numNATH];	// Attach Normal Point data
}

// GRND - Ground Point Chunk
struct GRNDData {
	int numGRND;			// Number of Ground points
	OOF_PT pntData[numGRND];	// Ground Point data
}

// GPNT - Gunpoint Chunk
struct GPNTData {
	int numGPNT;			// Number of Gunpoints
	OOF_PT pntData[numGPNT];	// Gunpoint data
}

// WBAT - Weapons Battery chunk
struct WBSData {
	int numWBAT;			// Number of Weapons Batteries
	WBAT_DATA wbatData[numWBAT];	// Weapon Battery data
}

// TXTR - Texture Chunk
struct textureData {
	int numTextures;		   // Number of textures
	TXTRdata textureData[numTextures]; // Texture data
}

// RANI, ANIM - Rotational Animation Chunk
struct RANIData {
	RANI_ANIM FrameData[numSOBJ];	// RANI Frames data
}

// PANI - Positional Animation Chunk
struct PANIData {
	PANI_ANIM FrameData[numSOBJ];	// PANI Frames data
}

// PINF - Information chunk
struct PINFData {
	char info[chunkLength];		// Information chunk data
}


// IDTA - Interpreter Data
??

// GRID - Grid Data
??

Posted: Tue Mar 21, 2006 10:27 am
by Diedel
Ofc I can follow - thx very much! :D

(Geez, these guys are really pushing me into adding hires models ... :roll: )

Re:

Posted: Tue Mar 21, 2006 1:51 pm
by Steel
Diedel wrote:(Geez, these guys are really pushing me into adding hires models ... :roll: )
Of course we are! It will be the coolest thing since you started the project. :mrgreen:

Look around the D3 development section at PD, some of the OOF tools are opensource. (If you do not have enough info already)

Posted: Wed Mar 22, 2006 10:25 pm
by Valin Halcyon
Whee! Thanks for appearing SS! I'd been looking for you to get that which you just posted. :P

Posted: Thu Mar 23, 2006 4:29 pm
by Diedel
I now have working code to read oof polymodel files. :mrgreen:

Posted: Thu Mar 23, 2006 4:36 pm
by Valin Halcyon
We love you Deidel. :D

OOFs in D2!!! YAY!
Who's going to head up the D3 models to D2 project? :P

Posted: Thu Mar 23, 2006 5:16 pm
by D3Phoenix
Let's see...

[x] Better Dynamic Lighting
[x] Particle systems
[x] High-res Textures (NovacroN's Descent Relived)
[x] Better polymodel format (oof)
[ ] OOF Higher-poly models of all D2 and D2: Vertigo Robots.
[ ] High-res robot textures to complement said models and the new level textures.

Looks like we need to find a couple project captains... :P

I would volunteer, but I can't do crap with either a 3D modeler or a photo editor...

Posted: Thu Mar 23, 2006 5:20 pm
by Stryker
I'll model some higher-poly ships if you want (and I get time)! PM me about it...

Posted: Thu Mar 23, 2006 5:56 pm
by Diedel
There's still a lot of work to. First I've got to get oof model rendering to work. And it's another story to have complex robots with moving parts. I am not a math expert, I have to read that matrix and vector stuff everytime again I need it.

Re:

Posted: Thu Mar 23, 2006 6:07 pm
by Steel
Diedel wrote:I now have working code to read oof polymodel files. :mrgreen:
Yay!! :D Take as much time as you need to get it right.

I can't model either or I would volunteer. :(
Might I recommend using a system like the Freespace Upgrade for Freespace2 at Hard Light Productions? This would allow multiple modellers to remain coordinated.

Posted: Fri Mar 24, 2006 8:30 pm
by Diedel
Someone posted it here, but I can't find it: Who built the hires PyroGL model?

Posted: Wed Mar 29, 2006 2:20 am
by Nuke
iirc the descent network still has a repository of descent 2 robot models that somone did in truespace. they are slightly better than the originals but they would probibly require some work for compatability. might be worth looking into.