Hey,
I've started a small project with a friend to get some grasps on the concepts behind how WoW stores it's mapping data and we've hit a snag with WMOs and collision information
From what I can tell it looks like the MOBR chunk stores pre-compiled BSP trees and the MOBN chunk stores a smaller subset of indices in to the MOVI vertices chunk that represent the collision polygons. The MOBR chunk numfaces and firstface value define the indices for that leaf node where the indices are from firstface to firstface + numfaces. I hope this is correct!
I would of thought that I could render the vertices from the MOVT chunk using an index array constructed from the MOBN chunk and it would just be less detailed but the result I get is nothing resembling the original WMOs (looking like the indices are way off). Is my logic off here?
The other issue I have is, though I haven't started down this route yet, is how the division between BSPs nodes is defined? I was under the impression that you required a plane to define a BSP node whereas the WoW method seems to simply store all the polygons in that node. Does the first triangle in the firstface->numfaces range define the plane? How do you determine which child to test next when you are performing collision?
Any help would be appreciated! I hope this post wasn't too fractured... I have been struggling with this for the last week or two and it's very difficult to find information on it.
EDIT: I should clarify that I also have no idea how to determine which child in the BSP tree to progress to--numfaces and firstface is 0 for every node that is not a leaf. There is a float that I presume must be used to determine distance from the root or something so you can work out which child to progress to?