Brawlbox Resources & History

Started by BlackJax96, December 14, 2010, 03:39:11 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Quote from: Tcll on January 29, 2012, 06:12:03 PM
IK you have a busy thread BJ...
so I'm reposting my Q so you don't have to scroll down ;)

Well first off, they're not texture clamps.

[StructLayout(LayoutKind.Sequential, Pack = 1)]
    public unsafe struct MDL0MtlTexSettings
    {
        public static readonly MDL0MtlTexSettings Default = new MDL0MtlTexSettings()
        {
            Tex1Flags = TextureFlags.Default,
            Tex2Flags = TextureFlags.Default,
            Tex3Flags = TextureFlags.Default,
            Tex4Flags = TextureFlags.Default,
            Tex5Flags = TextureFlags.Default,
            Tex6Flags = TextureFlags.Default,
            Tex7Flags = TextureFlags.Default,
            Tex8Flags = TextureFlags.Default,

            Tex1Matrices = TextureMatrix.Default,
            Tex2Matrices = TextureMatrix.Default,
            Tex3Matrices = TextureMatrix.Default,
            Tex4Matrices = TextureMatrix.Default,
            Tex5Matrices = TextureMatrix.Default,
            Tex6Matrices = TextureMatrix.Default,
            Tex7Matrices = TextureMatrix.Default,
            Tex8Matrices = TextureMatrix.Default,
        };

        public buint LayerFlags;
        public buint UnkFlags;

        public TextureFlags Tex1Flags;
        public TextureFlags Tex2Flags;
        public TextureFlags Tex3Flags;
        public TextureFlags Tex4Flags;
        public TextureFlags Tex5Flags;
        public TextureFlags Tex6Flags;
        public TextureFlags Tex7Flags;
        public TextureFlags Tex8Flags;

        public TextureMatrix Tex1Matrices;
        public TextureMatrix Tex2Matrices;
        public TextureMatrix Tex3Matrices;
        public TextureMatrix Tex4Matrices;
        public TextureMatrix Tex5Matrices;
        public TextureMatrix Tex6Matrices;
        public TextureMatrix Tex7Matrices;
        public TextureMatrix Tex8Matrices;

        private VoidPtr Address { get { fixed (void* ptr = &this)return ptr; } }

        public TextureFlags GetTexFlags(int Index) { return *(TextureFlags*)((byte*)Address + 8 + (Index * 20)); }
        public void SetTexFlags(TextureFlags value, int Index) { *(TextureFlags*)((byte*)Address + 8 + (Index * 20)) = value; }
       
        public TextureMatrix GetTexMatrices(int Index) { return *(TextureMatrix*)((byte*)Address + 168 + (Index * 52)); }
        public void SetTexMatrices(TextureMatrix value, int Index) { *(TextureMatrix*)((byte*)Address + 168 + (Index * 52)) = value; }
    }


[StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct TextureMatrix
    {
        public sbyte TexUnk1;
        public sbyte TexUnk2;
        public sbyte TexUnk3;
        public sbyte TexUnk4;
        public bMatrix43 TexMtx;

        public static readonly TextureMatrix Default = new TextureMatrix()
        {
            TexUnk1 = -1,
            TexUnk2 = -1,
            TexUnk3 = 0,
            TexUnk4 = 1,
            TexMtx = Matrix43.Identity
        };
    }


    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct TextureFlags
    {
        public BVec2 TexScale;
        public bfloat TexRotation;
        public BVec2 TexTranslation;

        public static readonly TextureFlags Default = new TextureFlags()
        {
            TexScale = new Vector2(1),
            TexRotation = 0,
            TexTranslation = new Vector2(0)
        };
    }

January 29, 2012, 06:19:59 PM #8566 Last Edit: January 29, 2012, 06:22:23 PM by ForOhFor Error
Quote from: BlackJax96 on January 29, 2012, 05:50:30 PM
Highlight the MDL0 and change the version number.
Only 8, 9, 10 & 11 are supported, so if you enter any other number it will default to 9.
Fair enough. Only, this happened:

Going 10 to 9. If you need the models I converted, here:
http://dl.dropbox.com/u/5869687/BrokenStuff.rar

FC: 2191-7379-6272

Quote from: ForOhFor Error on January 29, 2012, 06:19:59 PM
Fair enough. Only, this happened:

Going 10 to 9. If you need the models I converted, here:
http://dl.dropbox.com/u/5869687/BrokenStuff.rar

:srs:

Didn't I already convert that model fine?

Quote from: BlackJax96 on January 29, 2012, 05:50:30 PM
And which flags?
I was thinking the flags within the MDL0 bones and the different animations at least.
3DS FC: 5370-0958-4818
Wii U NNID: Doraleus

Trippy:


Quote from: Skyward Grounder on January 29, 2012, 06:24:51 PM
I was thinking the flags within the MDL0 bones and the different animations at least.


oh.

January 29, 2012, 06:28:09 PM #8570 Last Edit: January 29, 2012, 06:34:59 PM by Tcll
the only thing I could make sence out of in that was the texture matrix structure...

unk1
unk2
unk3
unk4
mtx3x4
(matrix 3x4 == 3 rows, 4 cols)
^was corrected by a game dev forum :P

anyways...
I have that already...
but I keep getting NAN's in random places...


and also...
if they arn't texture clamps, then what are they?? :/
layers??

material
-header
-shader
--texture layers?
--texture matrices

and also...
the data after the matrices...
what's that layout??
(I only have a TODO data with a length of 44)

EDIT:
I think I see my problem...

I have unk1-4 defined as u32...
but it looks like they're s8

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

i just saw this post today
http://forums.kc-mm.com/index.php?topic=37368.msg819064#msg819064

thank you BlackJax, there shouldnt be anymore excuses for these problems (now its about lazyness to fix past imports.. im too lazy)

readin all these updates.. we're gettin close to a definite version of Brawlbox now

Quote from: KnightMario on January 29, 2012, 02:22:30 PM
>:(
This brawlbox is NEVER letting me save ANYTHING.
It always says: unable to open file for write access.
If I close it and try the same file again it says cannot access E:/brawlbox/bla bla bla.
If I try with older versions it does the same thing >:( .
How do you fix this?


If not SD card, then the problem could always be that the file is open in another folder, or it's marked read-only, etc. When it isn't, I just leave the file and come back another time.

Thanks to this new BB I think I can figure out how to fix Tabuu's graphic effects! ^^

Wow, it renders eyes a bit better.
That's pretty cool.

January 29, 2012, 08:09:19 PM #8575 Last Edit: January 29, 2012, 08:10:15 PM by Tcll
AHAH >:D

I knew there was talk about the 10 material colors being somewhere in the data.
now there's no more TODO data in the shader ;)
although I couldn't seperate the material colors due to the data arrangement >_>
(I think some of those colors are actually used by the shader as well)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Gah, curse those filesize limits, there HAS to be a way to work around them. :/

Quote from: Tabuu Forte Akugun on January 29, 2012, 08:03:31 PM
Thanks to this new BB I think I can figure out how to fix Tabuu's graphic effects! ^^

Say, what graphics effects might you be talking about? I'm interested in about half of them.

Quote from: Tabuu Forte Akugun on January 29, 2012, 08:18:47 PM
Gah, curse those filesize limits, there HAS to be a way to work around them. :/

Module hacks?

Quote from: Xiggah on January 29, 2012, 08:22:48 PM
Say, what graphics effects might you be talking about? I'm interested in about half of them.

Module hacks?

I mean, I finally found the cause of why his effects are glitchy: I can't add the REFT because it jacks up the filesize.

And cna you look into rel hacks? Who do I go to for those?

January 29, 2012, 08:25:53 PM #8579 Last Edit: January 29, 2012, 08:27:46 PM by KnightMario
Quote from: Tabuu Forte Akugun on January 29, 2012, 08:18:47 PM
Gah, curse those filesize limits, there HAS to be a way to work around them. :/
Riivolution.
And also, can you add material editing? I just need it so that it loads a texture with a different filename. (so each eye has a different color)
Quote from: Miacis on February 19, 2014, 01:06:26 AM
I know for a fact that the vast majority of the public here cares more about free products than actual quality.
I mean, we're kinda modding an old Wii game after like 6 years, instead of buying new stuff. That's pretty telling. :P