Page 1 of 1

HCE model meta questions

Posted: Sun Jun 06, 2004 5:32 am
by xorange
This question is for anyone who is familiar with model meta...specifically HCE model meta.
(I asked this before, but I never got any responses, & the thread went a different direction, so...I'm asking again.)

In model meta there are offsets that point to the raw vertices & indices.

In Xbox meta these pointers are easy to translate.
They're just regular offsets with magic added.

In HCE these pointers are different.
If you look you'll see what I mean.
They don't end with 40 (little endian), like they would if they had magic added.
They also don't appear to be offsets without magic added, because if I follow them they don't go to the right spot.

Can anyone help me figure out how to translate these pointers??
This is such a silly, little thing...but I'm totally stuck on it. :(

ANY help is appreciated!

Posted: Sun Jun 06, 2004 10:36 am
by xorange
Ok, it took me a while, but I finally figured this out.

In Xbox model meta the pointers are relative to the beginning of the cache file.
I mean that once you take that pointer, subtract magic & swap endian you have an offset.
That offset is simply a distance from the beginning of the cache file to the beginning of the item they point to....in this case, vertices or indices.

In HCE model meta the pointers are relative to the beginning of the vertex & index sections of the cache file.
Take a vertex pointer for example...
You just take your pointer, swap endian (no magic is added) & you have your offset.
That offset, however, is a distance from the beginning of the raw model vertex section of the cache file to the beginning of the model's vertices.

To find the beginning of the raw model vertex & index sections you first go to the beginning of the tag index.
To find that go to the beginning of the cache file (the header). Now go +0x10, there's a pointer there...just swap endian & goto.
Now, from the beginning of the tag index go +0x14. That's the pointer to the beginning of the vertices.
Now, from the beginning of the tag index go +0x1C. That's the pointer to the beginning of the indices, relative to the beginning of the verts.

Was that confusing enough?...oh well. I'm just talking to myself anyway. heh

Posted: Sun Jun 06, 2004 11:25 am
by The Ghost
xorange, I know you don't get a lot of post for replies, but that's just because more than half of the people in here dont' even know what you're talking about. I think you should keep with this, you may come across something big that you will be praised for finding. Don't get discouraged because not too many people are replying.

Posted: Sun Jun 06, 2004 8:01 pm
by mattp001
i think that viper is working on this stuff. i will ask him for you.

Posted: Sun Jun 06, 2004 10:11 pm
by xorange
The Ghost wrote:xorange, I know you don't get a lot of post for replies, but that's just because more than half of the people in here dont' even know what you're talking about.
Heh....I know...but I figure some people know what I'm talking about, & I just hope that they'll see my posts.
The Ghost wrote:I think you should keep with this, you may come across something big that you will be praised for finding. Don't get discouraged because not too many people are replying.
Thanks man. :)
Yeah, I rarely get discouraged...because I know that even if noone can help me, I'll eventually figure it out on my own.
Besides, I hack Halo for the challenge.

Posted: Sun Jun 06, 2004 10:14 pm
by xorange
mattp001 wrote:i think that viper is working on this stuff. i will ask him for you.
Cool, thanks. :D
I've got this problem taken care of,
but I'm sure there's other things we could help each other with.

Btw, if anyone is interested in a better explanation of my solution just let me know.
My second post was a bit confusing.

Posted: Sun Jun 06, 2004 11:06 pm
by [users]h4xx3d
xorange, your talent at this amazes me, i hope to hell you are able to figure this out, it would be so sweet to have custom models on xbox, and eventually, custom levels.

you are my hero now. =P