Modding, Mission Design, and Coding > FS2 Open Coding - The Source Code Project (SCP)

BSP_Data: How the hell does it work?

(1/1)

Kiloku:
I'm trying to render a .POF object in Unity3D.

I can already load the .POF info (from a VP file) into memory. I've read about the .POF format, the OBJ2 chunk, etc.

I'm stuck when I hit the BSP_Data. I read this documentation, but I still need help understanding it.

In a DEFPoints block, for example, theres this

--- Code: ---+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.

--- End code ---

Which (if I understood correctly) says that I have to jump to the byte numbered +offset to start reading the vertex_data (after I read the other values, including offset itself.
But what type is vertex_data? I see "each vertex is a point". What is a point? A set of 3 integers x,y,z?
Then it's followed by norm_counts[n] normals, but I ask the same question: What format are these normals in? Are they 3 axis vectors?

The E:
Point and vector data is always a set of three floats, in xyz order.

Navigation

[0] Message Index

Go to full version