Kitty Corp Meow Mix Forums

Super Smash Bros. Brawl Hacking => General Hacking Discussion => Topic started by: ??_? on September 22, 2010, 06:32:11 PM



Title: Materials Collab Thread
Post by: ??_? on September 22, 2010, 06:32:11 PM
This thread is for archiving what all known values do for each section in materials

Textures
The amount of textures corresponding to that section of the model

Layers
-
Flag3
Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???
If flag 3 is set to 2, the model piece will not be affected by fog.  If set to 1, it will.
Flag4
-
TYPES
Quote from: Mewtwo_2000
Type 0 is 2-sided
Type 1 is 1 side
Type 2 is the other side
Type 3 is no sides (invisible)
Type 4 also appears to be invisible.  If textures are still appearing at type 3, try setting to type 4.

Flag5
-
Flag6: R?
Flag7: G?
Flag8: B?

Post what you know
materials1 materials1 materials1 materials1 materials1 materials1 materials1


Title: Re: Materials1 Collab Thread
Post by: hughie on September 22, 2010, 06:43:38 PM
You mean this changes how textures mirror?


Title: Re: Materials1 Collab Thread
Post by: ??_? on September 22, 2010, 06:45:33 PM
You mean this changes how textures mirror?
potentially, not sure though, we would have to find the correct value or set of values


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 07, 2010, 06:54:41 PM
Flag6 determines the overall brightness of the textures. That's what I found out from This. (http://forums.kc-mm.com/Gallery/BrawlView.php?Number=7397)


Title: Re: Materials1 Collab Thread
Post by: hughie on October 07, 2010, 06:56:20 PM
Flag6 determines the overall brightness of the textures. That's what I found out from This. ([url]http://forums.kc-mm.com/Gallery/BrawlView.php?Number=7397[/url])
I will now copy and paste this fact in my brain.


Title: Re: Materials1 Collab Thread
Post by: VILE on October 08, 2010, 12:43:23 AM
Ive always been under assumption that material1 has been the materials properties and the other material files where the sub categories (diffuse, specular, bump etc), dunno i never really looked at them all too much, i might have a look at them today and try contribute some info.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 08, 2010, 05:25:56 AM
Ive always been under assumption that material1 has been the materials properties and the other material files where the sub categories (diffuse, specular, bump etc), dunno i never really looked at them all too much, i might have a look at them today and try contribute some info.
Please.
Its weird almost no one noticed this yet, it actually sounds interesting. :P


Title: Re: Materials1 Collab Thread
Post by: stickman on October 08, 2010, 01:48:09 PM
I'm gonna jump in too...


Title: Re: Materials1 Collab Thread
Post by: VILE on October 08, 2010, 07:48:38 PM
Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???

(im under the assumption that there is only 7 because i know of only 7 shaders, but you never know i could be wrong, but its relatively safe to assume that there is nothing on 0 and beyond 8)

Flag4 - without a tester i dont think i can find this out (never see it go above 0)

Flag5 - i see it alternate between 1 and 0 but no steady pattern is there, i think ill need a tester for this one.

Flag6 - self ilumination

Flag7 - always on 4, need tester

Flag8 - always on 0, need tester


As you guys can see im lacking a source of testing files to actually see what changes are made. If anyone volunteers to test some files for me and take some snapshots, pm me or post back here.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 08, 2010, 07:49:57 PM
Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???

(im under the assumption that there is only 7 because i know of only 7 shaders, but you never know i could be wrong, but its relatively safe to assume that there is nothing on 0 and beyond Cool

Flag4 - without a tester i dont think i can find this out (never see it go above 0)

Flag5 - i see it alternate between 1 and 0 but no steady pattern is there, i think ill need a tester for this one.

Flag6 - self ilumination

Flag7 - always on 4, need tester

Flag8 - always on 0, need tester


As you guys can see im lacking a source of testing files to actually see what changes are made. If anyone volunteers to test some files for me and take some snapshots, pm me or post back here.
I love you.
No homo.


Title: Re: Materials1 Collab Thread
Post by: Pik on October 08, 2010, 09:57:48 PM
VILE


I'VE BEEN WAITING FOR MATERIAL INFORMATION FOREVER, I LOVE YOU

you make me a happy boy


Title: Re: Materials1 Collab Thread
Post by: dark sonic 19 on October 08, 2010, 10:14:18 PM
VILE i can test some of this :)


Title: Re: Materials1 Collab Thread
Post by: VILE on October 08, 2010, 10:55:37 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.


Title: Re: Materials1 Collab Thread
Post by: VILE on October 08, 2010, 11:30:01 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Oh yeh i meant emerald and i can test things by myself now :D ILY dolphin


Title: Re: Materials1 Collab Thread
Post by: hughie on October 10, 2010, 06:14:49 AM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Oh yeh i meant emerald and i can test things by myself now :D ILY dolphin
Any progress on this?
I would try this myself but i don't know if you hex or not.


Title: Re: Materials1 Collab Thread
Post by: VILE on October 10, 2010, 07:50:49 AM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Yeh i used a hex editor.

Oh yeh i meant emerald and i can test things by myself now :D ILY dolphin
Any progress on this?
I would try this myself but i don't know if you hex or not.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 10, 2010, 11:38:32 AM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Yeh i used a hex editor.

Oh yeh i meant emerald and i can test things by myself now :D ILY dolphin
Any progress on this?
I would try this myself but i don't know if you hex or not.
Oh.
Then i'll try again. :D


Title: Re: Materials1 Collab Thread
Post by: Chuy on October 12, 2010, 05:24:24 PM
Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???

(im under the assumption that there is only 7 because i know of only 7 shaders, but you never know i could be wrong, but its relatively safe to assume that there is nothing on 0 and beyond 8)
Tried doing the flag3 thing to get a cell shaded effect and the metal effect (not at the same time though) and neither worked
Mind explaining it a bit further or am i just failing at this?


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 12, 2010, 05:28:04 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Is there any way an emerald character can have regular eyes instead of white or black eyes?


Title: Re: Materials1 Collab Thread
Post by: _Data_Drain_ on October 12, 2010, 05:37:03 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Is there any way an emerald character can have regular eyes instead of white or black eyes?
I think that's what he meant, emerald characters files are called "FitCharacterDark".


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 12, 2010, 05:46:16 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Is there any way an emerald character can have regular eyes instead of white or black eyes?
I think that's what he meant, emerald characters files are called "FitCharacterDark".

Oops, I misread what he said. (I thought It said no eyes and his Metal Mario is an emerald character with no eyes). In any case he should explain how to make an emerald character have regular eyes.


Title: Re: Materials1 Collab Thread
Post by: Chuy on October 12, 2010, 06:04:30 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Is there any way an emerald character can have regular eyes instead of white or black eyes?
I think that's what he meant, emerald characters files are called "FitCharacterDark".

Oops, I misread what he said. (I thought It said no eyes and his Metal Mario is an emerald character with no eyes). In any case he should explain how to make an emerald character have regular eyes.
I believe the eyes are only invisible due to the eye textures being transparent 


Title: Re: Materials1 Collab Thread
Post by: Pinutk™ on October 12, 2010, 06:50:30 PM
Hmmm what does this mean that Type1 would make it 2D like G&W? I was a little confused about it.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 12, 2010, 06:52:42 PM
Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.


Oh yeh i meant emerald and i can test things by myself now :D ILY dolphin
Any progress on this?
I would try this myself but i don't know if you hex or not.
Yeh i used a hex editor.
Ok....
Im having no idea where to edit.
Do you mind putting a diagram or something?
It would help me a lot.


Title: Re: Materials1 Collab Thread
Post by: Pinutk™ on October 12, 2010, 06:54:34 PM
Hax you go into the model file and uner Type or whatever type in a new number, 3 I think was to make them transparent.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 12, 2010, 06:56:48 PM
Hax you go into the model file and uner Type or whatever type in a new number, 3 I think was to make them transparent.
I tried it, it doesn't work.
You have to hex it I think.


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 12, 2010, 07:00:22 PM
I tried it, it doesn't work.
You have to hex it I think.

Have you tried looking at It in game? Material changes don't show up in Brawlbox.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 12, 2010, 07:03:10 PM
I tried it, it doesn't work.
You have to hex it I think.

Have you tried looking at It in game? Material changes don't show up in Brawlbox.
Yep.
I haven't found any changes and
Yeh i used a hex editor.


Title: Re: Materials1 Collab Thread
Post by: Pinutk™ on October 12, 2010, 07:03:41 PM
I tried it, it doesn't work.
You have to hex it I think.

Have you tried looking at It in game? Material changes don't show up in Brawlbox.
Exactly I was going to say that, Mewtwo helped me out with one of these hacks. Go look at my invisible nintendog hack and you'll see. I was going to make a tutorial on how to make transparent models actually :P


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 12, 2010, 07:10:06 PM
I tried it, it doesn't work.
You have to hex it I think.

I can assure you It works without a hex editor. I was able to make Mr. Saturn's whiskers and bow invisible by changing the materials to type 3 in Brawlbox.


Title: Re: Materials1 Collab Thread
Post by: hughie on October 12, 2010, 07:13:46 PM
Ok, well i guess if you say so.
Thanks.


Title: Re: Materials1 Collab Thread
Post by: Chuy on October 14, 2010, 04:11:26 PM
Noah do you ever plan on updating the OP of the thread?


Title: Re: Materials1 Collab Thread
Post by: stickman on October 14, 2010, 08:32:23 PM
i gotcha covered. op updated with VILE's info. things are still subject to change with more testing and playing around with the flags


Title: Re: Materials1 Collab Thread
Post by: ??_? on October 16, 2010, 01:31:58 PM
Oh wow.  People actually posted here.  Sorry!  This is great though

Oh yeh if anyone cares i made it so dark chars have regular eyes instead of those black and white ones.

Is there any way an emerald character can have regular eyes instead of white or black eyes?
You could try going into materials and edge and edge2 transparent by changing value on Type to 3.

I apoligize for not contributing to this, I am helping people source STDT data for all stages, and that takes forever (if you'd like to help, PM me).


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 16, 2010, 02:27:47 PM
You could try going into materials and edge and edge2 transparent by changing value on Type to 3.

You can't change the type of texture, Only the whole material.

op updated with VILE's info.

You forgot to add that flag 6 controls the brightness of the textures.


Title: Re: Materials1 Collab Thread
Post by: ??_? on October 16, 2010, 02:52:31 PM
You could try going into materials and edge and edge2 transparent by changing value on Type to 3.

You can't change the type of texture, Only the whole material.
Oh right, but you could just as easily delete/ rename edge or edge2 within the eyeL and R material so they would not be there, right?

op updated with VILE's info.

You forgot to add that flag 6 controls the brightness of the textures.
added

And could you go into a deeper explanation of flag6? For instance which values make it really bright?


Title: Re: Materials1 Collab Thread
Post by: awesomedude on October 26, 2010, 04:28:50 AM
Flag 6 is for brightness I tried putting it at 0 and the texture was darker than in brawlbox then I put the texture in Photoshop and lowered the brightness and had the same result


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 26, 2010, 03:41:57 PM
Flag 6 is for brightness I tried putting it at 0 and the texture was darker than in brawlbox then I put the texture in Photoshop and lowered the brightness and had the same result

We already know that.

Flag6
Affects brightness of textures (PAVGN)

Flag6 determines the overall brightness of the textures.

Flag6 - self ilumination

You forgot to add that flag 6 controls the brightness of the textures.


Title: Re: Materials1 Collab Thread
Post by: ??_? on October 26, 2010, 03:56:27 PM
I believe he was addressing my question


Title: Re: Materials1 Collab Thread
Post by: PAVGN on October 26, 2010, 04:00:58 PM
I believe he was addressing my question

Oh, Well I didn't see your question. I could have answered It for you If I did.


Title: Re: Materials1 Collab Thread
Post by: GentlemanPotato on October 29, 2010, 06:48:06 PM
There's a Type 5. It's on Fox's HeadgearA but I don't know what it does.


Title: Re: Materials1 Collab Thread
Post by: ??_? on October 30, 2010, 08:33:02 AM
There's a Type 5. It's on Fox's HeadgearA but I don't know what it does.
perhaps it allows transparency? I have no idea, I'll try to look at it


Title: Re: Materials1 Collab Thread
Post by: Metanigh on November 07, 2010, 10:25:03 AM
Nice to meet you.
Can luster be put also on the arm and the belly by remodeling Materials1 of mdl0 of the shadow?


Title: Re: Materials1 Collab Thread
Post by: hughie on November 07, 2010, 02:13:07 PM
Nice to meet you.
Can luster be put also on the arm and the belly by remodeling Materials1 of mdl0 of the shadow?
If it could, i would( Or at least mastaklo ) have done it ages ago.


Title: Re: Materials1 Collab Thread
Post by: PAVGN on November 13, 2010, 05:24:33 PM
Vile, Please tell us how you made Metal Mario. It would be useful for the rest of to make other characters like that, And when I tried to make a re-texture of Metal Mario It came out looking like this:
(http://i51.tinypic.com/hv782f.jpg)


Title: Re: Materials1 Collab Thread
Post by: ??_? on November 14, 2010, 02:21:20 PM
Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???

yeah vile, I've been unable to recreate any of these successfully, some just looked really buggy, and others didn't work at all?  Which values are you changing in hex? because its possible that brawlbox isn't changing all of the right ones.


Title: Re: Materials1 Collab Thread
Post by: Mewtwo2000 on November 16, 2010, 06:16:40 AM
I think in flag 3 more as a 'material group' or 'lighting group' than as shader parameters...

Anyway, some objects are able to use more of one type of flag3, and others simply can't. Maybe the flag3 activates some inner type of material in the model, and if it isn't included in the model, it glitches or crashes.

What I'm sure about it, is that changing this changes which lights effect to the model/material.


Title: Re: Materials1 Collab Thread
Post by: ??_? on November 16, 2010, 08:29:10 PM
I think in flag 3 more as a 'material group' or 'lighting group' than as shader parameters...

Anyway, some objects are able to use more of one type of flag3, and others simply can't. Maybe the flag3 activates some inner type of material in the model, and if it isn't included in the model, it glitches or crashes.

What I'm sure about it, is that changing this changes which lights effect to the model/material.
So then would I be correct in assuming that a value for flag3 determines how fog on stages affects the object, as well as ambient and other lights in the scene data?


Title: Re: Materials1 Collab Thread
Post by: Mewtwo2000 on November 17, 2010, 09:41:29 AM
I'm almost sure about the lights, but not 100% sure about the fogs. That 'group' should include fogs group anyway.


Title: Re: Materials1 Collab Thread
Post by: Chuy on November 17, 2010, 07:01:19 PM
This might just solve a stage lighting problem i'm having
Can you go into more detail about flag3? o.O


Title: Re: Materials1 Collab Thread
Post by: Mewtwo2000 on November 18, 2010, 03:30:00 AM
Not much to say, if it's some value (for example), the model acts like characters do, for example. And when the value is 3 it acts as a stage element.

It's only an example, don't remember the values right now. Also, some models can't change that value, because they get glitchy.

The flag3 thingy worked, for example, in the ufo in my fourside. It was first acting like characters, and now it's acting like the buildings.


Title: Re: Materials1 Collab Thread
Post by: ??_? on November 18, 2010, 03:00:32 PM
I will have more time to look into flag3 and materials1 after I finish STDT values on pirates, which I am almost finished


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 09, 2010, 06:34:51 PM
Tcll do you have any thing to add to this? [url]http://forums.kc-mm.com/index.php?topic=14690.0[/url]
I was planning on labeling all of them in brawlbox and sending it to Bero but it might be awhile


as a matter of fact, I have my template which could help you guys out alot...

give me a moment to finish definitions...
and I'll UL it tomorrow after skool (if there is any...)
^if not, it'll just be tomorrow (bout to lose net for the night)

also,
Materials1 = 'Shaders'
Materials2 = 'Materials'
Textures1 = 'Textures'
Textures2 = 'Pallets'

feel free to ask how I figured any of this out ;)

EDIT:
NVM tomorrow :D
I've just finished the Definitions using a somewhat brute-force method :/
but it works...

note:
I've only seen types 2 and 4...
I'm sure there will be more though...

anyways, I'll UL in my next post.


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 09, 2010, 08:02:10 PM
KK so here's my template:
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<for name="type" count="" stop_test="this.type == 1" type_name="" comment="">
<struct name="" type_name="" comment="" expr="type{this.type}">
<data type="int" name="type" format="unsigned" len="1" display=""/>
<if test="type == 2" comment="">
<struct name="t2" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
<if test="type == 4" comment="">
<struct name="t4" type_name="" comment="" expr="({this.ID1},{this.ID2},{this.ID3},{this.ID4})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
<data type="int" name="ID3" format="unsigned" len="2" display=""/>
<data type="int" name="ID4" format="unsigned" len="1" display=""/>
</struct>
</if>
</struct>
</for>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Shaders" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="material_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<jump offset="header.material_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Material_Reference" expr="" type_name="Materials" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="unk3" format="signed" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="unk" format="unsigned" len="1" display=""/>
</struct>
<data type="none" name="tmp" len="header.block_length - 13"/>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures" comment="" expr="">
<data type="int" name="textures" format="signed" len="4" display=""/>
<for name="texture" count="textures || textures - 1" stop_test="textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Pallets" comment="" expr="">
<data type="int" name="pallets" format="signed" len="4" display=""/>
<for name="pallet" count="pallets || pallets - 1" stop_test="pallets == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Shaders" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures" format="unsigned" len="4" display=""/>
<data type="int" name="Pallets" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Shaders != 0" comment="">
<jump offset="header.lists. Shaders" comment="" origin="start">
<struct name="Shaders" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shaders" comment="" origin="start">
<use_struct name="Shaders" expr="" type_name="Shaders" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shaders - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Textures != 0" comment="">
<jump offset="header.lists.Textures" comment="" origin="start">
<struct name="Textures" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures" comment="" origin="start">
<use_struct name="Textures" expr="" type_name="Textures" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Pallets != 0" comment="">
<jump offset="header.lists.Pallets" comment="" origin="start">
<struct name="Pallets" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Pallets" comment="" origin="start">
<use_struct name="Pallets" expr="" type_name="Pallets" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Pallets - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>


you'll need to use this with HexEdit, found here: (free no trial version)
http://www.smashboards.com/showpost.php?p=11656041&postcount=2778

now, place the code above into:
C:\Documents and Settings\*user*\Application Data\ECSoftware\HexEdit\_mdl0.xml

to view the template in HexEdit:
after opening the mdl0,
go to 'view'-'template'-'split window'
and be sure to turn the auto sync on as well (looklike 3 red arrows "back, forth, back")
(you may need to turn on the 'Navigation' toolbar)

anyways...
so that's it...

if you have any Q's feel free to ask ;)

EDIT:
just found type3 and type5 for definitions...
type3 is confusing (anywhere from len(3) to len(16))


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 09, 2010, 08:41:15 PM
hey...

I know this is kinda off topic,
but it'd be nice to display between eular and quat for the bones when viewing the model

just making a suggestion ;)
(Blender uses the Quaternion method when animating)


Title: Re: Materials1 Collab Thread
Post by: ??_? on December 10, 2010, 02:49:22 PM
I'll have time to test out that code as soon as i get my new computer up and running, which might be awhile


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 11, 2010, 11:58:33 AM
also...
2 things:

1: (suggestion)
when viewing a model, can it be rendered while being edited??

I know rendering activates the shaders and what not (making the model look how it would in brawl)

2 I've found 2 more definition types
'type3' (in the midst of figuring out)
'type5' (exactly like type2)

I'll UL that when I figure out type3
note: you may experience errors with few mdl0's when viewing them...


Title: Re: Materials1 Collab Thread
Post by: ??_? on December 11, 2010, 08:53:28 PM
1. No idea how to do that lol

2.  ?? Type three has already been figured out ...
Quote from: Mewtwo_2000
Type 0 is 2-sided
Type 1 is 1 side
Type 2 is the other side
Type 3 is no sides (invisible)


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 11, 2010, 09:03:02 PM
1. No idea how to do that lol

2.  ?? Type three has already been figured out ...
Quote from: Mewtwo_2000
Type 0 is 2-sided
Type 1 is 1 side
Type 2 is the other side
Type 3 is no sides (invisible)

yea... I know...
I'm building a template and I need to figure them out...
and nobody's helping me D:<

btw, there's also types 4 and 5

type3 has a sub-type of (so far) 2 and 3
2 has a length of 12
3 has a length of 18

btw, what do the definitions do (if you know)?? :/

EDIT:
found a sub-type of 4 which has a length of 24
and also a sub-type 5 len(30)

EDIT2:
you know...
I'm beginning to think that the sub-types I mention are more of a cound

2*6 = 12
3*6 = 18
...

I noticed they increased by 6 on every count attempt (or whatever the english language calls it) :P


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 11, 2010, 11:47:12 PM
well, I've finished the definitions (so far)

here's a template UD:
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<for name="type" count="" stop_test="this.type == 1" type_name="" comment="">
<struct name="" type_name="" comment="" expr="type{this.type}">
<data type="int" name="type" format="unsigned" len="1" display=""/>
<if test="type == 2" comment="">
<struct name="t2" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
<if test="type == 3" comment="">
<struct name="t3" type_name="" comment="" expr="({this.ID}) ({this.count})">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="count" format="unsigned" len="1" display=""/>
<for name="tmp" count="count || count - 1" stop_test="count == 0" type_name="" comment="">
<data type="none" name="" len="6"/>
</for>
</struct>
</if>
<if test="type == 4" comment="">
<struct name="t4" type_name="" comment="" expr="({this.ID1},{this.ID2},{this.ID3},{this.ID4})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
<data type="int" name="ID3" format="unsigned" len="2" display=""/>
<data type="int" name="ID4" format="unsigned" len="1" display=""/>
</struct>
</if>
<if test="type == 5" comment="">
<struct name="t5" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
</struct>
</for>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Shaders" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="material_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<jump offset="header.material_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Material_Reference" expr="" type_name="Materials" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="unk3" format="signed" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="unk" format="unsigned" len="1" display=""/>
</struct>
<data type="none" name="tmp" len="header.block_length - 13"/>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures" comment="" expr="">
<data type="int" name="textures" format="signed" len="4" display=""/>
<for name="texture" count="textures || textures - 1" stop_test="textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Pallets" comment="" expr="">
<data type="int" name="pallets" format="signed" len="4" display=""/>
<for name="pallet" count="pallets || pallets - 1" stop_test="pallets == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Shaders" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures" format="unsigned" len="4" display=""/>
<data type="int" name="Pallets" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Shaders != 0" comment="">
<jump offset="header.lists. Shaders" comment="" origin="start">
<struct name="Shaders" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shaders" comment="" origin="start">
<use_struct name="Shaders" expr="" type_name="Shaders" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shaders - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Textures != 0" comment="">
<jump offset="header.lists.Textures" comment="" origin="start">
<struct name="Textures" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures" comment="" origin="start">
<use_struct name="Textures" expr="" type_name="Textures" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Pallets != 0" comment="">
<jump offset="header.lists.Pallets" comment="" origin="start">
<struct name="Pallets" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Pallets" comment="" origin="start">
<use_struct name="Pallets" expr="" type_name="Pallets" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Pallets - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>


enjoy ;)


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 12, 2010, 08:11:14 AM
oh hey, make sure you click 'allow editing' when using the template...
(it works better) ^R-click on 'MDL0'

granted it does get a tad more confusing, but everything works as it should
(it takes a while to load though)


Title: Re: Materials1 Collab Thread
Post by: ??_? on December 12, 2010, 04:58:10 PM
1. No idea how to do that lol

2.  ?? Type three has already been figured out ...
Quote from: Mewtwo_2000
Type 0 is 2-sided
Type 1 is 1 side
Type 2 is the other side
Type 3 is no sides (invisible)

yea... I know...
I'm building a template and I need to figure them out...
and nobody's helping me D:<

btw, there's also types 4 and 5

type3 has a sub-type of (so far) 2 and 3
2 has a length of 12
3 has a length of 18

btw, what do the definitions do (if you know)?? :/

EDIT:
found a sub-type of 4 which has a length of 24
and also a sub-type 5 len(30)
So lengths=amount of possible values?
idk what the definitions do :/
you should learn C# if you don't know it already and help me implement this stuff into brawlbox xD


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 12, 2010, 07:12:45 PM
So lengths=amount of possible values?
idk what the definitions do :/
you should learn C# if you don't know it already and help me implement this stuff into brawlbox xD

I was right on the edit with type3 :P
here's an example:
03 00 26 02 00 0F 3F 21 47 AE 00 11 3E BD 70 A4

type
data

count
data1
data2

basically the format for the template goes as such:
if type == 3:
__ID = read(2)
__count = read(1)
__for (count != 0 && (count || count - 1)):
____tmp = read(6)

as for C#
well, if it's easier to understand than C++, I'll try...
but I've got enough to do in Py :/
(building a model conveter for universal formats, and other stuff as well)

yea, I've tried learning C++ before...
that didn't go well at all (especially when compiling)

EDIT:
for something that might be known...

can you help me with figuring out shaders, materials, or anything else that's not complete??
also, are there any other definition types (other than: 2, 3, 4, and 5) you've seen

if type == 1 then stop reading. (next read is for the next offset block)


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 13, 2010, 03:29:24 PM
alright...
I'll ask something dealing a bit more with this thread :/

first off, Shaders (Materials1) are arranged as first described in brawlbox...
but there's more to it than that...

can you tell me (if you know)
how does the stuff not described in brawlbox work??

like, what is the data below the texture references?? (before the next shader)

61 F3 3F 00 00 61 40 00 00 17 61 FE 00 FF E3 61
41 00 34 A0 61 42 00 00 00 00 00 00 00 00 00 00
61 E2 00 00 00 61 E3 00 00 00 61 E3 00 00 00 61
E3 00 00 00 61 E4 00 00 00 61 E5 00 00 00 61 E5
00 00 00 61 E5 00 00 00 61 E6 00 00 00 61 E7 00
00 00 61 E7 00 00 00 61 E7 00 00 00 00 00 00 00
61 E0 80 00 00 61 E1 80 00 00 61 E2 80 00 00 61
E3 80 00 00 61 E4 80 00 00 61 E5 80 00 00 61 E6
80 00 00 61 E7 80 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
61 25 00 00 00 61 26 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10 00 00 10 40 00 00 52 80 10 00 00 10 50 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

and would the P4 offset be Particles?? :/
^if so then I could give Pikachu fur :D (real fur, not textured like DK or Ice Climbers (their hoods))

EDIT:
got any idea on what this is??
I've found a series of patterns, but the data is the exact same in every one :/
I can't seem to guess at what they may be...
:srs: and I'm a game developer

anyways...
can you take a guess??
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/89ecc8e6b367402826d1514441e3f9d67738b387e2457a4ae9c9db80bc8d79da) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/89ecc8e6b367402826d1514441e3f9d67738b387e2457a4ae9c9db80bc8d79da)
they belong to the shaders themselves, just above the texture offset data
(00 02 59 E8 starts the textures)


Title: Re: Materials1 Collab Thread
Post by: ??_? on December 15, 2010, 07:05:34 PM
Try changing some of the hex values in the shader data and see what happens, I have no idea what they are, and I don't know the stuff not described in brawlbox works, but I think there are other materials1 things that aren't listed in it, I've seen some hex patterns that don't appear to be anything in materials1 in brawlbox


Title: Re: Materials1 Collab Thread
Post by: DarkPikachu on December 15, 2010, 07:19:45 PM
heh...
you guys don't seem to like change much do ya :P

eg: people still prefer to say PSA instead of Logic
or mat1 instead of shaders and so on :P

ah well... guess I can't force ya or whatever lol XDD

anyways...
I guess I can try it...
I just hate freezing my Wii is all :/

also...
there's only 2 hex patterens I know of in the shader data...
one being right above the textures (P3 offset), which would be the shader data...
the other being right below the textures, which would be the P5 offset
(or after the P4 offset if any)


Title: Re: Materials1 Collab Thread
Post by: ??_? on December 15, 2010, 07:26:00 PM
anyways...
I guess I can try it...
I just hate freezing my Wii is all :/

also...
there's only 2 hex patterens I know of in the shader data...
one being right above the textures (P3 offset), which would be the shader data...
the other being right below the textures, which would be the P5 offset
(or after the P4 offset if any)
thats probably what I was seeing :/

and I was calling it materials1 because we were talking about brawlbox xD I'll change the topic title if you think it'd be more appropriate.


Title: Re: Shaders (Materials1) Collab Thread
Post by: DarkPikachu on December 15, 2010, 07:44:01 PM
yea... that's better :P

sry if I'm sounding a bit picky...
being a game developer, you kinda have to be...
if it don't look perfect, it won't work perfect

lol, random quote I'm definatly using :D
XDD


Title: Re: Shaders (Materials1) Collab Thread
Post by: DarkPikachu on December 16, 2010, 08:09:51 AM
sry if I'm asking again...

but do you have, or know a friend ho has any MDL0's that use the P4 offset??


Title: Re: Shaders (Materials1) Collab Thread
Post by: ??_? on December 16, 2010, 02:42:07 PM
no, sorry :/


Title: Re: Shaders (Materials1) Collab Thread
Post by: DarkPikachu on December 16, 2010, 05:48:24 PM
... dang :(

well here's something I've found:
http://forums.kc-mm.com/index.php?topic=17547.msg307577#msg307577
^mostly guesswork with the coloring


Title: Re: Materials Collab Thread
Post by: BlueBrain on February 23, 2011, 01:38:58 PM
sorry for necroposting, but ive been searching for this thread as its VERY usefull, specially the OP, and i think this should be stickied ^^


Title: Re: Materials Collab Thread
Post by: xxmasal22xx on February 24, 2011, 12:12:13 PM
Anybody know how to make pikachu's tail a solid object? I know it has to do with materials, correct?


Title: Re: Materials Collab Thread
Post by: VILE on February 24, 2011, 05:40:35 PM
Anybody know how to make pikachu's tail a solid object? I know it has to do with materials, correct?

Pikachu's tail is already a solid object and no, it has nothing to do with materials...


Title: Re: Materials Collab Thread
Post by: ??_? on February 25, 2011, 09:03:29 AM
Found something pretty useful
Flag6- Red
Flag7- green
Flag8- Blue

collectively these values control color.
not sure what they'd do over a normal texture
but
works over black and white as far as I can tell


Title: Re: Materials Collab Thread
Post by: BlueBrain on February 25, 2011, 09:34:55 AM
what does that mean exactly?
u mean it controlls team colour? id think u meant that though...
or like sonic's pink layer?


Title: Re: Materials Collab Thread
Post by: ??_? on February 25, 2011, 09:40:13 AM
what does that mean exactly?
u mean it controlls team colour? id think u meant that though...
or like sonic's pink layer?
all I know is super scope has a value of 255, 255, 0 (yellow).  I'm seeing what happens when I change them now

EDIT: nothing happened, those values appear to be a coincidence :/ sorry


Title: Re: Materials Collab Thread
Post by: ??_? on June 30, 2011, 11:31:37 AM
Found this:
Flag3
If flag 3 is set to 2, the material will not be affected by fog.  If set to 1, it will.
Should be useful to stage makers.


Title: Re: Materials Collab Thread
Post by: Eternal Yoshi on June 30, 2011, 11:34:25 AM
Nice bump.

OK. I changed the Flag of Ness' first shader to 6 and.......
Basically, it made Ness all black like Dark Link and any instance where he would have an overlaying color made him flash white.

See for yourself.
[url]http://www.mediafire.com/?9oe9vew298lfm7k[/url]
[url]http://www.mediafire.com/?2b4uvgrz7oncrtr[/url]


Title: Re: Materials Collab Thread
Post by: ??_? on June 30, 2011, 11:50:35 AM
0.o
(http://i.imgur.com/KmSOb.jpg)
(http://i.imgur.com/ea2Ud.jpg)
(http://i.imgur.com/wAgjH.jpg)
(http://i.imgur.com/tbE4M.jpg)
(http://i.imgur.com/5gE01.jpg)
So its usually all black, but it appears to grab the latest overlay sometimes.  and I had one instance where he had black pixels all over but his actual texture was visible.


Title: Re: Materials Collab Thread
Post by: KTH on June 30, 2011, 02:36:04 PM
MAH MEGAMAN D:


Title: Re: Materials Collab Thread
Post by: PAVGN on June 30, 2011, 03:18:07 PM
([url]http://i.imgur.com/KmSOb.jpg[/url])
([url]http://i.imgur.com/ea2Ud.jpg[/url])
([url]http://i.imgur.com/wAgjH.jpg[/url])
([url]http://i.imgur.com/tbE4M.jpg[/url])
([url]http://i.imgur.com/5gE01.jpg[/url])
So its usually all black, but it appears to grab the latest overlay sometimes.


That's like what happened when I tried to give emerald Falco normal Falco eyes.

(http://i54.tinypic.com/116kpiu.jpg)
(http://i55.tinypic.com/2f0f2ol.jpg)
(http://i51.tinypic.com/oh0abd.jpg)


Title: Re: Materials Collab Thread
Post by: DarkPikachu on July 01, 2011, 11:26:43 AM
Found something pretty useful
Flag6- Red
Flag7- green
Flag8- Blue

collectively these values control color.
not sure what they'd do over a normal texture
but
works over black and white as far as I can tell
very nice find :D

that would be the diffuse RGB values.

meaning I could implement that into my dark green thunder and finally release my DPv3 :D

glad I didn't release my beta here yet ^_^


Title: Re: Materials Collab Thread
Post by: ??_? on July 01, 2011, 07:39:52 PM
Well, I'm not positive thats what they do..
all I know is super scope has a value of 255, 255, 0 (yellow).  I'm seeing what happens when I change them now

EDIT: nothing happened, those values appear to be a coincidence :/ sorry
ut it definately has something to do with color, as changing one lightens, as PAVGN noted, and the highest values I see on each of them are 255, which really couldn't be anything else.  And hopefully I'll have some examples of what flag3 can do by tomorrow.


Title: Re: Materials Collab Thread
Post by: DarkPikachu on July 02, 2011, 06:13:31 AM
so this is what's for current info on materials:

materials:
flag3: Shader
flag4: ??
Type: Settings
flag5: ??
flag6: R
flag7: G
flag8: B

Flag3 - shader parameters
-0 ???
-1 light/glow
-2 cell shade
-3 lambert
-4 metal
-5 reflective
-6 environ.
-7 phong
-8+ ???

Type - normal settings
-0 normals 2
-1 normals -1
-2 normals +1
-3 normals 0

*sigh*
the node structures and material-shader structures are a pain -.-*
they usually start with '61 FE ######(0 or F)' though (BP registers)


Title: Re: Materials Collab Thread
Post by: ??_? on July 02, 2011, 08:53:46 PM
I'll start experimenting with flag4 tomorrow, if I were to guess what it does now, I'd say visibility settings behind/in front of other models.


Title: Re: Materials Collab Thread
Post by: VILE on July 02, 2011, 09:15:16 PM
I'll start experimenting with flag4 tomorrow, if I were to guess what it does now, I'd say visibility settings behind/in front of other models.

Good idea, I have yet to see layer/depth in the material nodes yet.


Title: Re: Materials Collab Thread
Post by: DarkPikachu on July 02, 2011, 10:41:48 PM
that unk value in the modset looks suspicious >_>

but it's prbly been taken care of in 064 already


Title: Re: Materials Collab Thread
Post by: DarkPikachu on July 12, 2011, 08:35:24 AM
bump
@mods

may I suggest another move to the programming board


Title: Re: Materials Collab Thread
Post by: ??_? on July 12, 2011, 09:24:58 AM
I've been playing with materials2, or whatever you fancy people call it now, and I see that some of the nodes are identical to each other.

first node
00 00 02 00 FF FF 2E 80 00 00 00 00 01 00 00 00

second node
00 00 02 00 FF FF 2E 80 00 00 00 00 01 00 00 00

third node
00 00 02 00 FF FF 2C 80 00 00 00 01 02 00 00 00

The first and second are identical all the way through, but the third node's differences don't stop with the first line, it has a lot of different values.


Title: Re: Materials Collab Thread
Post by: DarkPikachu on July 12, 2011, 09:33:16 AM
I've been playing with materials2, or whatever you fancy people call it now, and I see that some of the nodes are identical to each other.

first node
00 00 02 00 FF FF 2E 80 00 00 00 00 01 00 00 00

second node
00 00 02 00 FF FF 2E 80 00 00 00 00 01 00 00 00

third node
00 00 02 00 FF FF 2C 80 00 00 00 01 02 00 00 00

The first and second are identical all the way through, but the third node's differences don't stop with the first line, it has a lot of different values.
you're talking about the header right??

I've been working on nodes for a bit now...
the header of the nodes is 32 bytes, with these values:

0x00(4): Block length
0x04(4): MDL0 offset
0x08(4): ID
0x0C(1): flag (same as linked material)
0x0D(1*2): res(0-1)
0x10(1*8): ref(0-7)
0x18(8): padding (or unk)

below that is the node structures

I have defined a few here:
http://tcll5850.proboards.com/index.cgi?board=development&action=display&thread=109&page=1


Title: Re: Materials Collab Thread
Post by: ??_? on July 12, 2011, 09:41:41 AM
Ah, that helps ^^