Author Topic: BSP_Data: How the hell does it work?  (Read 1298 times)

0 Members and 1 Guest are viewing this topic.

Offline Kiloku

  • 27
  • Buzzbuzz!
    • Minecraft
BSP_Data: How the hell does it work?
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: [Select]
+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.

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?

Potato!

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: BSP_Data: How the hell does it work?
Point and vector data is always a set of three floats, in xyz order.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns