Kitty Corp Meow Mix Forums

Super Smash Bros. Brawl Hacking => Programming => Topic started by: DarkPikachu on January 21, 2012, 05:11:06 AM



Title: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:11:06 AM
reserved for unknown reasoning...

I might use it later :P


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:15:43 AM
Unknown3:

pending for data

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:17:29 AM
Pallets:

pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:23:00 AM
Textures:

Panding for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:25:14 AM
Objects:

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:27:40 AM
Material-Nodes:
A material node is a visualization of a specific function. It can be viewed as a kind of black box, doing something with it's input, or just producing a constant or variable output. So there would be nodes to do many different task like mixing or blending different textures or color values, nodes that would generate color ramps, nodes allowing some math operations and so on.
src: http://www.yafaray.org/node/362 (http://www.yafaray.org/node/362)

Header:
Block_Length = bu32()
MDL0_Offset = bs32()
ID = bu32()
Shader_type = bu8()
RES = [ bs16() ]*3
TREF = [ bs16() ]*8
skip(8) #padding

I personally don't know how to read a block like this by a n*32 byte value. :(
(if the internal data size is greater than 32, read (64,96,128,etc.))


Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:31:00 AM
Materials:

Pending for data restructure atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:33:57 AM
Unknown2:

pending for data

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:37:52 AM
Unknown1:

pending for data

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:40:36 AM
Texture-Coordinates (UV's):

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:56:11 AM
Vertex-Colors:

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 05:58:09 AM
Normal-Coordinates:

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 06:03:28 AM
Vertex-Coordinates:

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 21, 2012, 11:13:31 AM
Bones:

Pending for data atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 23, 2012, 04:12:46 AM
Definitions:

Pending for data and name change atm

Back to Top (#post_header)


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on January 28, 2012, 05:09:04 AM
Global-Header:
the global header identifies the MDL0 and determines the version:

magic = string(4)
str_tbl = bu32()
version = bu32()
brres_offset = bs32()


Lists:
the lists define what's what in the MDL0: (based on the version)
if version > 7: Definitions (#post_Definitions) = bu32()
if version > 7: Bones (#post_Bones) = bu32()
if version > 7: Vertices (#post_Vertices) = bu32()
if version > 7: Normals (#post_Normals) = bu32()
if version > 7: Colors (#post_Colors) = bu32()
if version > 7: UV's (#post_UVs) = bu32()
if version > 9: Unknown1  (#post_Unk1) = bu32()
if version > 9: Unknown2  (#post_Unk2) = bu32()
if version > 7: Materials (#post_Materials) = bu32()
if version > 7: Nodes (#post_Nodes) = bu32()
if version > 7: Objects (#post_Objects) = bu32()
if version > 7: Textures (#post_Textures) = bu32()
if version > 7: Pallets (#post_Pallets) = bu32()
if version > 10: Unknown3 (#post_Unk3) = bu32()

^links will take you to the data sections below.

Local-Header:
the local header defines the MDL0 structure.

Name_Offset = bu32()
properties = bu32()
properties_length = bu32()
unknown1 (0) = bu32()
unknown2 (0) = bu32()
Num_Verts = bu32()
Num_Faces = bu32()
unknown3 (0) = bu32()
Num_Links = bu32()
unknown4 (0x01010000) = bu32()
properties_length = bu32() (copy??)
MinX = bf32()
MinY = bf32()
MinZ = bf32()
MaxX = bf32()
MaxY = bf32()
MaxZ = bf32()


Title: Re: NOTES: MDL0 Resource Thread (reformatted)
Post by: DarkPikachu on April 06, 2012, 07:27:01 AM
this is just a re-structure and a touch-up ;)

-added unknown data structures
-added bookmarks to data sections (no need to scroll)

everything works as it should ;D

TODO:
-sub data section bookmarks (go to a selected section from a section)
-move this thread to Programming/Notes/


To viewers:
even though this thread has every needed post (for current MDL0 standards),
I still ask that you don't post anything here.
(I want this thread to be like a wiki for programmers, but better) XD

if you have any suggestions, ideas, updates, etc. for me,
I'm always open to a PM, so feel free to PM me. :D


other comments:
I can't disable sigs, so complain to the admins about it, not me
^seperate posts won't lag my wii's editor