Page 1 of 1

Question about the vertex/index offsets in H:CE model meta

Posted: Wed May 26, 2004 7:47 pm
by xorange
I have been looking at some HaloCE model meta and I have a small problem with the offsets that point to the raw vertices & indices.
I can't seem to find where they point to. :?

In Xbox maps this is quite easy. For example:
A0AF6880
Swap & subtract magic...simple.

The same offset in H:CE is:
78180500
Now, I thought this was just a raw offset (no +magic)
but when I swap endian & goto, it doesn't appear to be going to the correct spot. (the indices for the ends of tree_leafy_fallentrunk in this case)
Now, HHT will show me magic for the map I'm looking at, & HMT will calc magic too (it just doesn't show it), but if I take this offset, swap endian & subtract magic I end up with a result that is obviously wrong because it points beyond eof.

Has anyone taken a look at these offsets in H:CE meta?...and if so, how should I be translating these offsets.
I'm very interested because I'm working on a project where I need to directly copy all of a scenery objects raw vertices & indices.
...rather than extracting/injecting using HMT, which works fine, but not for this project.

Thanks!

Posted: Thu May 27, 2004 3:41 am
by xorange
Hmm...it may be that I'm translating the offsets right, but I just don't know what I'm looking at.

I forgot that HPC/HCE raw model data is different than on Xbox.
I haven't had any previous experience with HPC models, so I'm unaware of what the actual differences are in the map file.

What I'm trying to do is to transfer a model from a PC map to an Xbox map, using a hex editor....& without using HMT to extract/inject.

Is there anyone around that can give me a quick rundown on the differences between HPC/HCE & HXB model data?

Posted: Thu May 27, 2004 4:12 am
by mattp001
if i were you i would scratch what you are trying to do. there are way to many fuckin differences between the the two versions and you will be just wasting your time.

Posted: Thu May 27, 2004 4:14 am
by maca_ยง
mattp001 wrote:if i were you i would scratch what you are trying to do. there are way to many fuckin differences between the the two versions and you will be just wasting your time.
tha kind of thinking will get you no where...

Posted: Thu May 27, 2004 6:18 am
by mattp001
well do you have even the slightest clue at what kind of changes have been made to the structure? well i think that you dont. it is a mess now.

Posted: Thu May 27, 2004 3:02 pm
by xorange
mattp001 wrote:well do you have even the slightest clue at what kind of changes have been made to the structure? well i think that you dont. it is a mess now.
Well, I do, and I'm still interested.
I'm very experienced at hacking Halo (particularly Xbox), I like a challenge & there's really very little that discourages me.

I am figuring it out on my own...and I will continue to if necessary, but help is always nice.
Particularly when I'm trying to determine something that I know other people already know.

Anyone have any more positive advice?

Posted: Sun May 30, 2004 10:01 pm
by xorange
Well, instead of scratching my idea I kept at it, and now I've figured out the verts & solved my problem completely.

Basically, I've created a new scenery object with the HEK,
and I want to manually transfer it's model to an Xbox map.

In case anyone is interested this is actually pretty simple.

First, the indices are the same. Triangle strips.
...and apparently the verts are in the same order, so the indices
are easily transferable.

On to the vertices...

HCE raw model vertices are uncompressed.

HXB raw model vertices are compressed.


To understand what this means just look at a gbxmodel in Guerilla.
It'll show you both formats, and if you compare the hex you'll see what I mean.

Now, here's the solution to manually transfering the verts from HCE to HXB.
(Not just position, but also normal, binormal, tangent, UV & node index/weight!)

Once you compile a gbxmodel into a map, it appears to only add the uncompressed vertices into the map, BUT, the gbxmodel tag contains the compressed vertices...all ready to be tranfered to Xbox.
(After swapping endian...watch it, they're not all 32bit floats!)