perfect model injection? how???

Discuss general issues about modding HaloPC. Post ideas for mods here.
EqUiNoX





Posts: 1929
Joined: Sat Feb 07, 2004 11:08 am
Location: Bantron, USA

Post by EqUiNoX »

it should have....but u really can't be really perfect...
Image
Deadly_Shadow




Miner

Posts: 1375
Joined: Fri Oct 24, 2003 1:30 am
Location: Earth
Contact:

Post by Deadly_Shadow »

I don't know yet. I don't know what number to replace it with. I think it has something to do with id or the magic
[users]ReApEr





Posts: 370
Joined: Sat Feb 14, 2004 9:25 am
Location: Some where other than the Anti Noob HQ

Post by [users]ReApEr »

^bump^ ^bump^ ^bump^
Signature exceeded 500x120 pixels.
Master_Makayo





Posts: 681
Joined: Tue Dec 23, 2003 4:47 pm
Location: Makayo, Tanzania
Contact:

Post by Master_Makayo »

ReApEr wrote:^bump^ ^bump^ ^bump^
NO BUMPIN
My new sig, made by me^_^
Image
"Maybe your PC doesn't like you"
{IAS}Bunkerking





Posts: 720
Joined: Wed Feb 04, 2004 3:44 pm

Post by {IAS}Bunkerking »

acording to supersunny in a early post of this he says he figured it out and it DOES have to do with magic
User avatar
HunterXI





Posts: 3927
Joined: Sat Nov 22, 2003 11:21 am
Location: Azeroth
Contact:

Post by HunterXI »

I read that it had to do something with the header of the xml's... though my memory's not that good...
This post printed on 100% recycled electrons.
Kamatzu




Droplet Wordewatician 500

Posts: 554
Joined: Thu Feb 12, 2004 3:46 am
Location: Still Here. Posts: 8,765,234

Post by Kamatzu »

{IAS}Bunkerking wrote:acording to supersunny in a early post of this he says he figured it out and it DOES have to do with magic
Dont listen to supersunny....if u go to the GB forums youd know hes full of himself :? anyway perfect model injection would be done EASILY if we could find where the raw model pointers are listed....then just open em up in the all-too-powerful notepad and add the total vertices and indices of the new model in.....then update the data size...viola perfect model
User avatar
HunterXI





Posts: 3927
Joined: Sat Nov 22, 2003 11:21 am
Location: Azeroth
Contact:

Post by HunterXI »

Kamatzu wrote:
{IAS}Bunkerking wrote:acording to supersunny in a early post of this he says he figured it out and it DOES have to do with magic
Dont listen to supersunny....if u go to the GB forums youd know hes full of himself :? anyway perfect model injection would be done EASILY if we could find where the raw model pointers are listed....then just open em up in the all-too-powerful notepad and add the total vertices and indices of the new model in.....then update the data size...viola perfect model
yeah... IF we could find the raw model pointers... :(
This post printed on 100% recycled electrons.
Deadly_Shadow




Miner

Posts: 1375
Joined: Fri Oct 24, 2003 1:30 am
Location: Earth
Contact:

Post by Deadly_Shadow »

Erm. Yes. it has to do with magic. Mono said. Also. This isn't complete. We also need the Raw Model Data. Sigh. I think we should just wait for hmt3.5
halogodlex2





Posts: 201
Joined: Wed Dec 31, 2003 1:12 pm
Location: halo............ALL THE TIME
Contact:

Post by halogodlex2 »

why are you all waiting for HMTv3.5 wait for HEK i mean wouldnt that be a little better?
Signature exceeded 500x120 pixels.
tjc2k4




Construct Socialist Golden Age Magic Era
Pi Coagulator Eureka Pyre
Literarian 100

Posts: 150
Joined: Wed Nov 12, 2003 3:21 am

Post by tjc2k4 »

HunterXI wrote:
Kamatzu wrote:
{IAS}Bunkerking wrote:acording to supersunny in a early post of this he says he figured it out and it DOES have to do with magic
Dont listen to supersunny....if u go to the GB forums youd know hes full of himself :? anyway perfect model injection would be done EASILY if we could find where the raw model pointers are listed....then just open em up in the all-too-powerful notepad and add the total vertices and indices of the new model in.....then update the data size...viola perfect model
yeah... IF we could find the raw model pointers... :(
What do you mean by raw model pointers? I'll help as much as I can, but it's not as easy as you all seem to make it sound.

The map layout goes like Gren described in his tutorials. File header, raw model info, index header, tag index, tag meta. or something like that.
An over view for injecting a model perfectly would look something like this:
1.) Get collision model tag and other model related tags such as shaders into the map (I think these can be rebuilt in..)
2.) Get the model data into the map (this can be manually added to the raw model data sections at the end). Add vertices to vertice section, indices to indice section.
3.) Since the raw model data is before most of the stuff in the map, the offset to the index header (used to calculate the magic for a map, so magic would change) would need to be updated. The index header is pointed to by the file header, so this isn't that hard at all.
4.) Now we have all the model data in, the model dependencies in, but need the model tag in. The model tag pointed to the point in the raw model data where the model was located in the old map, this is now different, so these reflexives need to be updated to point to the new model data. The tag's dependencies also need to be updated so they point to the correct shaders, collision model, etc.
5.) Once the tag (.meta and .xml files) is edited, it can be rebuilt into the map.

I'm not at home, and have no references in front of me, so most of this is off the top of my head from what I remember about models, if I forgot anything, feel free to tell me.

As far as raw model pointers, I'm assuming you mean the reflexives in the model tag which point to the actual vertice list and indice list. If that's the case, there is a variable number of these reflexives depending on the complexity of the model in question. Each model has multiple levels of detail, and multiple pieces. Each level of detail, and each piece can then consist of multiple subobjects which may consist of multiple lists of vertices and indices. This means when you inject a complex model you have a lot of updating to do.. also, there is no set offset where you can find the model raw pointers or anything like that, as you can see they're embedded in a reflexive inside a reflexive inside a reflexive. Which also makes for rather difficult explaining. :(

I'm not sure how much of this HMT 3.5 will do, but the more the better, so hopefully all of it. I also don't know how much HMT 3.5 will do in terms of injecting from-scratch models.
User avatar
HunterXI





Posts: 3927
Joined: Sat Nov 22, 2003 11:21 am
Location: Azeroth
Contact:

Post by HunterXI »

yes, when I said Raw Model Pointers, I meant the reflexives... but thanks for explaining that, tjc. And I think that what 3.5 will have in it is some code that will help find these pointers, so you can figure out more easily what to swap them with.
This post printed on 100% recycled electrons.
Master_Makayo





Posts: 681
Joined: Tue Dec 23, 2003 4:47 pm
Location: Makayo, Tanzania
Contact:

Post by Master_Makayo »

- Now. Save and close that. Now open the Meta File. This is what u'll be changing

- For the mod2 meta file

Offset - 2C - Meta Size - B Bytes

Offset - 74 - Meta Size - B Bytes

Offset - 174 - Meta Size - 3 bytes

Offset - 200 - Meta Size - 10 Bytes
What is that supposed to mean?
My new sig, made by me^_^
Image
"Maybe your PC doesn't like you"
Deadly_Shadow




Miner

Posts: 1375
Joined: Fri Oct 24, 2003 1:30 am
Location: Earth
Contact:

Post by Deadly_Shadow »

It means I compared 2 of the same mod2 meta files from different maps. Those were the places in the mod2 that were different.
User avatar
MasterNeoChief




Conceptionist

Posts: 2431
Joined: Tue Dec 23, 2003 9:34 am
Location: The Netherlands

Post by MasterNeoChief »

Me too. It'll be out VERY soon anyways. But if you want to fiqure out perfect model injection. I think.. this is how.

- Batch Extract a Multiplayer Map - Danger Canyon

- Recursivly from Blood Gulch Extract the Scenery that is the Fallen Trunk Log into the Danger Canyon Batch Extracted Data

- Open up Blood Gulch again and goto the mod2 for the Fallen Trunk Log

- Unrecusivly Extract the Meta Data for it

- Rename tree_leafy_fallentrunk.mod2 to tree_leafy_fallentrunk.mod2.meta

- Rename tree_leafy_fallentrunk to tree_leafy_fallentrunk.xml

- Open up Danger Canyons Batch Extracted Data and go to scenery\trees\tree_leafy_fallentrunk

- Replace the mod2 meta and xml files there with what you just saved from Halo Map Tools. I don't know why but oddly the Batch Extracted Mod2 is different then the Meta Extracted Mod2. I guess it's just the way Mono programmed Halo Map Tools V3 or it is Halos Fault

- Anyways.... Open the xml file and if you want change the map name to Danger Canyon. U don't have to. Maybe. I dunno

- Now. Save and close that. Now open the Meta File. This is what u'll be changing

- For the mod2 meta file

Offset - 2C - Meta Size - B Bytes

Offset - 74 - Meta Size - B Bytes

Offset - 174 - Meta Size - 3 bytes

Offset - 200 - Meta Size - 10 Bytes
Again. I fiqured this out. No one hleped me but it is most likely correct to change that ot have a perfect model. No one tells me anything now a days. I guess people don't appreciate shadows anymore
OFcourse we do appreciate shadows!
If they weren't here, I'd be burned!
But, if you do the things you said above, you will get a PERFECT model?
That doesn't sound hard actually..
Also, do you have to do the meta things on the end?
{IAS}Bunkerking





Posts: 720
Joined: Wed Feb 04, 2004 3:44 pm

Post by {IAS}Bunkerking »

yea i have found out supersunny is bs
Deadly_Shadow




Miner

Posts: 1375
Joined: Fri Oct 24, 2003 1:30 am
Location: Earth
Contact:

Post by Deadly_Shadow »

Well.. That's some of it. A tut should be coming out soon on how do import model perfectly
Tiamat





Posts: 102
Joined: Sun Jan 11, 2004 5:04 pm
Location: here

Post by Tiamat »

K so here is what i have discovered about the simplest modle file the log in bloodgultch

first there is
04 00 00 00 25 CF
don't know what this means

then after alot of zeros and 80 3F(s) we get "chunck count (1 or 2) 00 00 00 reflexive" four time in a row now these are pretty usless for what we need because all they do is point to the translations below
(so 74 C4 4E 40 points to "66 72 61 6D 65 20 6C 6F 67" which in ASCII is " f r a m e l o g ") so this whole section basically does what the hmt3 xml file does

<Reflexive>
<Location>0xBC</Location>
<Translation>0xE8</Translation>
<ChunkCount>1</ChunkCount>
</Reflexive>


where BC is the pointer and E8 is the pointed.

Next at 108-10B you get 6 FF's, seems useless

and then 114-11B you get 8 numbers 77 CC 2B B2 DD 0B 84 3E now these have got me stumped because there two small to be two reflxive numbers and I can't fin out what else they could be this could be the modle's pointer but how to translate it ???

these types of numbers continue untill 360 where we get the shaders basicaly its 6F 73 6F 73 (which is osos in ASCII) then a reflexive which points to text and then another really odd number 42 00 B6 01 I'm not quite sure what this means but I do know that if you take the indent and subtract it you get the number 10001 first I laughed because I got such and easy numbe but the i tryed it for the other shader and got 30003 so I'm still wondering what this means
lifes to important to be taken seriously
Deadly_Shadow




Miner

Posts: 1375
Joined: Fri Oct 24, 2003 1:30 am
Location: Earth
Contact:

Post by Deadly_Shadow »

Ummm... Yea. U work on that :roll:
Bonus Onus





Posts: 80
Joined: Sat Feb 28, 2004 10:17 am

hmt 3.5

Post by Bonus Onus »

now that hmt 3.5 is here, it should be easy, right? but when rebuilding, how do you know if/what new vertices u added?
Three lines of text maximum!
Post Reply