Any graphics artist looking for something different? Why not join us and create 8-bit graphics in the C64 scene! Click here for more info.
Join also our Discord channel! Click here.

Halo: Combat Evolved Anniversary vertex question

Post questions about game models here, or help out others!
Post Reply
User avatar
killercracker
advanced
Posts: 56
Joined: Sun Sep 25, 2011 11:31 pm
Has thanked: 6 times
Been thanked: 87 times

Halo: Combat Evolved Anniversary vertex question

Post by killercracker » Wed Mar 18, 2015 11:16 pm

Iv'e been having a problem trying to figure out how to draw the vertices from this game. I've singled out the count and size of the vertices but the individual vertices aren't stored in the conventional way of three floats but rather what looks like three shorts and an unknown short at the end. Now my problem is that when I do draw them they come out warped and I have to manually edit them so they come out somewhat normal but that varies for each direction, like in this case z and x are too large. Also when I skip the 1st byte and read the shorts in big endian the model comes out the same. Not something that I expected since all of the file before the buffer was little endian and I'm sure should't be applicable.

I believe each vertex influences the next and the last short is also used in this buffer for positional information, but I'm sure that that's not the case since I'm still very fuzzy in the subject. If anyone is willing to help, the vertex buffer offset for the linked model starts at 0x57d1, size is 8 bytes, and the count, if I'm not mistaken, is 5738.

Help would very much be appreciated.

Image
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3088
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 813 times
Been thanked: 1638 times

Re: Halo: Combat Evolved Anniversary vertex question

Post by shakotay2 » Thu Mar 19, 2015 1:44 am

yep, strange. But dividing x by 2.0 gives this:
cyborg_x_div_2.JPG
So you'll just need to find the scaling factors, or do I miss something?
edit: x /= 2.5; z /= 1.5
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
chrrox
Moderator
Posts: 2564
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1307 times

Re: Halo: Combat Evolved Anniversary vertex question

Post by chrrox » Thu Mar 19, 2015 2:11 am

it most likely needs to be scaled by its bounding box.

User avatar
killercracker
advanced
Posts: 56
Joined: Sun Sep 25, 2011 11:31 pm
Has thanked: 6 times
Been thanked: 87 times

Re: Halo: Combat Evolved Anniversary vertex question

Post by killercracker » Thu Mar 19, 2015 7:11 pm

I went ahead and touched up the script in an attempt to find any scaling and bounding box information but was not able to find any. How is such data usually stored? I have here linked the script and more example models if needed.

http://a.pomf.se/mfaxxh.rar

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3088
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 813 times
Been thanked: 1638 times

Re: Halo: Combat Evolved Anniversary vertex question

Post by shakotay2 » Thu Mar 19, 2015 8:31 pm

From what I know the bounding box values are stored as 2 diametrical points of a box where the model fits into.
(Using floats it would be 24 bytes.)

Did you care for the skeleton? I could image it will help to get the correct dimensions.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Post Reply