Home Gallery Resources The Team Rules chat Login Register
Pages:  [1] 2 3
Author Topic: Mewtwo2000''s Tutorials: Shaders for imports  (Read 11098 times)
0 Members and 1 Guest are viewing this topic.
Mewtwo2000
The Stage Master
Special Access
*****
Offline Offline

Posts: 3331


Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « on: January 10, 2012, 06:31:27 AM »


    Hi, this is a small tuto, or tip, or whatever, so people try to have better shaders in their imports (characters or stages)

    What's what I'm calling 'shader' here? Basically, the way the models react to lighting. Some people null the normals so the lighting doesn't affect the models and they look always the same. I personally don't like that for characters, while I find it useful in stages sometimes.

    The main influence to the shaders are the normals. They are some vectors defining the 'normal' direction to the surfaces in the models. The good direction would be perpendicular, or normal, to the surfaces, but this isn't always happening. Those normals are defined in 3dsmax, and they can be wrong sometimes.

    For example, if you import a model into 3d max and you rotate it so it looks the direction you want it to look, the normals in game will probably get rotated. This means that, when a light comes from, for example, the right side, the model is lighten from the front instead. In some cases, in some stages, this may look decent, but in some other stages with very directional lights (for example my phantom ganon's room) you may get a too dark character because of this.

    I've recently fixed some characters with shader issues (Dry Bowser, Melee Mewtwo by pikazz), and even a stage (Metal Harbor by Oizen). The stage was way too dark, and the characters had some not uniformly rotated shaders. I'm gonna tell you how to fix your own things before rigging them, or at least, before releasing them.

    All of this in 3d max:

    - Once you've positioned your model the way you need it, attach it to a bone. You can create that bone (create->systems->bones IK chain). Create just one (right mouse click and del to delete the second one being created). Select that one, move it to 0,0,0. Rotate it in 90,0,0. Select all your models being sure you're not gonna rotate them anymore, and give all of them the same 'skin' modifier. Select the bone you've created so all the models are 'rigged' to that only bone.

    - Export as dae. I suppose you know what to do about inches and centimeters. I always import in centimeters and export in inches.

    In brawlbox:

    - Import the dae model. Save as .dae again.

    In 3d max again:

    - Import the new dae. The model to work with is this one. Once finished working with it, you'll need to export it again. Only that this time, it will look fine in shader matters.

    If you rotate your model, and you get it into brawlbox directly, you may get something like this in brawlbox. This is how the model looks the first time you get it into brawlbox:



    After importing it again to 3dsmax (where the shaders are reseted), if you were to save it into dae again, and look it in brawlbox, this would be how it looks:



    If textures aren't in the file yet, you must see white surfaces from all the directions (rotate the view). If it gets dark like the previous one in some direction, importing it to 3ds max to reset the shaders is necessary.

    This can be done even when the rig is made and finished (if not, I wouldn't have been able to fix finished characters like pikazz's). But, if you have made some manual changes to the normals in 3ds, you'll lose them when importing the dae. That's why I recommend you to do this before rigging the model, and saving the progress always in max, never in dae.

    By the way, talking about characters, if you look at the original ones in brawlbox, you'll notice some of them to have darkened parts like this:



    Yeah, this happens with original characters, and they look fine ingame. It's because of how the bones are made, that you'll need to rotate the normals manually in some characters. That's done with the 'edit normals' modifier in max. You'll need to select a bunch of vertices, usually in the leg and arm, and rotate the normals 180º in x. You'll see how they get dark in max. That's normal.

    The stuff in the spoiler is outdated since this post:

    http://forums.kc-mm.com/index.php?topic=39586.msg819056

    If you want to check your character's shaders, you can test in stages with special lightning, like my Kongo64 or my Phantom Ganon's Room. Compare how an original character gets lighten with yours, and you'll see what's wrong in them.

    Now, something I noticed yesterday, and feel stupid about it. In the new brawlbox, in 'materials' you will find 'flag1'. It was 'flag6' in the older ones, and in my Material Tool too. For characters, it usually is 20.

    Some people, and even I, believed it was some brightness value. If it's 255, the model will usually be very lighten up. But it's not brightness, but the light set afffecting the model. While the '20' is for characters, '0' and '1' would be for stages. I noticed it while fixing Oizen's Metal Harbor. Why the stage is getting more lightened if I'm changing the lights for characters? It was that value, which was 20 by default when importing from .dae files. So, watch out for that value.

    Flag 2 (Flag7 in old brawlbox and Materiall Tool) is similar, but with fogs. Just take them in consideration.

    Now, in model imports like Oizen's stage, which has lots (more than 40) materials to change, I recommend you to use my Material Tool. Material Tool has the ability to change values in all the materials in a model at the same time. With the 'to all' thingy checked, you can change flags 6 and 7 to be 1 and 0 for stages.

    You can also enable semitransparency easily with a checkbox, or even force all the color nodes in the model to get some value. There's also a hidden menu allowing to change some values controling if the lights affect to the model or not (I'm not aware of how 'nulling normals' is done, but this is my way to get the effect) and some transparency-related settings, which can be applied to all the materials at the same time too.

    The extra menu is accessed by double clicking on the material name, and entering a password. To get the password, just contact me (this is to see how many people gets interest on this part of the program, nothing more), and I'll tell you the basics of the extra menu.

    I guess this is all. I hope reading this guide makes that shaders in imports are getting improved from now on.
    « Last Edit: January 30, 2013, 12:41:19 PM by Mewtwo2000 » Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    ramonM64
    Supreme Kitten
    ********
    Offline Offline

    Posts: 671


    moving past the feeling

  • Awards Super Saiyan Topic Pin Collector Starstormer Renowned Hacker

  • View Profile Awards
    « Reply #1 on: January 10, 2012, 12:23:33 PM »


    i was wonderin about this for awhile, it seems pretty simple to fix. thank you for the tutorial (i like how you explain the problem gooood)

    about the last section talkin about color nodes, these ive learned are very important to get good color and brightness lightning in-game. i was wonderin if you can also make another in-depth Tutorial for that (in the same post in a spoiler or something). pikazz made a tutorial but i think it runs the file size a lil bit if you have a bunch of different objects to color.

    i looked into a default brawl character's .PAC and noticed they sometimes just have 1 or 2 color things and it applys to multiple objects. do ya know how to apply them in the way those are? does that tool stuff you got work with character files too and help with this?

    i get a headache with preparing models in brawlbox.. these tutorials help alot
    Logged


    Mewtwo2000
    The Stage Master
    Special Access
    *****
    Offline Offline

    Posts: 3331


    Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « Reply #2 on: January 10, 2012, 01:08:21 PM »


    With the latest brawlbox (0.65b) the color nodes can be automatically included, even if they weren't made previously in 3dmax. Also, there's an option to have a single color node affecting all the objects instead of having separate nodes for separate objects.

    My tool can edit all the color nodes in a model together. The standard value would be '808080' (mid-gray), but I guess brawlbox automatically applies that value for the newly created nodes. It works for any model, character or not.

    I don't guess a new tutorial needs to be made. Colors just 'tint' the models, and can be defined by vertex in 3dsmax. Not necessary now thanks to the new brawlbox, as said before.
    Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    ramonM64
    Supreme Kitten
    ********
    Offline Offline

    Posts: 671


    moving past the feeling

  • Awards Super Saiyan Topic Pin Collector Starstormer Renowned Hacker

  • View Profile Awards
    « Reply #3 on: January 10, 2012, 01:31:10 PM »


    oh

    wh00t     had no idea about a newer brawlbox. yer right, ill just download it and go from there
    Logged


    BlackJax96
    Brawl Mod God
    Boss Kitten
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #4 on: January 10, 2012, 09:14:58 PM »


    This is a noice tutorial, thanks. Cheesy

    Now, something I noticed yesterday, and feel stupid about it. In the new brawlbox, in 'materials' you will find 'flag1'. It was 'flag6' in the older ones, and in my Material Tool too. For characters, it usually is 20.

    Some people, and even I, believed it was some brightness value. If it's 255, the model will usually be very lighten up. But it's not brightness, but the light set affecting the model. While the '20' is for characters, '0' and '1' would be for stages. I noticed it while fixing Oizen's Metal Harbor. Why the stage is getting more lightened if I'm changing the lights for characters? It was that value, which was 20 by default when importing from .dae files. So, watch out for that value.

    Flag 2 (Flag7 in old brawlbox and Materiall Tool) is similar, but with fogs. Just take them in consideration.

    Should I rename it to LightSet and FogSet? :O
    How does it tie into Scene Data? Is it like an id?
    Seems kinda odd that values like 2 or 19 would never be used.
    Logged

    Xiggah
    Supreme Kitten
    ********
    Offline Offline

    Posts: 648

  • Awards Super Saiyan Topic Heart Container

  • View Profile WWW Awards
    « Reply #5 on: January 11, 2012, 02:06:27 AM »


    So models with improper flags affect models outside of their own files... This sounds like something that needs some serious attention. Do we really not know what all the flag values are for? If not, then there's some more experimenting for me to do in my own time and never tell anyone about.

    Also, the shaders reset themselves when imported to max, exported into brawlbox, and imported back to max again?
    Logged


    Mewtwo2000
    The Stage Master
    Special Access
    *****
    Offline Offline

    Posts: 3331


    Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « Reply #6 on: January 11, 2012, 10:29:18 AM »


    This is a noice tutorial, thanks. Cheesy

    Should I rename it to LightSet and FogSet? :O
    How does it tie into Scene Data? Is it like an id?
    Seems kinda odd that values like 2 or 19 would never be used.

    I've not looked to the scenedatas yet to see if I find some '20' in character lights or something so they are tied. That's something I should look into to be sure about why some lights affect some objects and some others not.

    Also, I'm not sure about if other values, like '2', '3' or '19' are used, I should look into some of the original stages to check which values are used and such. I'll update the tutorial if I find something about both matters.

    LightSet and FogSet would be good names. I still don't know what's the third flag anyway.

    So models with improper flags affect models outside of their own files... This sounds like something that needs some serious attention. Do we really not know what all the flag values are for? If not, then there's some more experimenting for me to do in my own time and never tell anyone about.

    Also, the shaders reset themselves when imported to max, exported into brawlbox, and imported back to max again?

    I guess I'm lost here. The flags affects the materials in a model, nothing more. Unless there's another model in the same location with improper values, which will get some of the material values in this model or any other model depending on the position in the brres or arc nodes. I used this property in some pokemon imports when mdl0s weren't that editable.

    About the question, that's exactly what happens. And I don't know how to do this not to happen. Every time I import a .dae, normals get reseted, even if I don't want them to. This is an advantage to fix the normals, but a disadvantage if we want to keep the original normals as they were. For example, if you want to edit Fox in 3dsmax, the normals will get reseted, and when back to the game, the arm and leg will be wrong in shaders unless you edit them manually before creating the new .dae.
    Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    Xiggah
    Supreme Kitten
    ********
    Offline Offline

    Posts: 648

  • Awards Super Saiyan Topic Heart Container

  • View Profile WWW Awards
    « Reply #7 on: January 11, 2012, 04:41:42 PM »


    I guess I'm lost here. The flags affects the materials in a model, nothing more. Unless there's another model in the same location with improper values, which will get some of the material values in this model or any other model depending on the position in the brres or arc nodes. I used this property in some pokemon imports when mdl0s weren't that editable.

    About the question, that's exactly what happens. And I don't know how to do this not to happen. Every time I import a .dae, normals get reseted, even if I don't want them to. This is an advantage to fix the normals, but a disadvantage if we want to keep the original normals as they were. For example, if you want to edit Fox in 3dsmax, the normals will get reseted, and when back to the game, the arm and leg will be wrong in shaders unless you edit them manually before creating the new .dae.


    I tried following your steps: I exported Kirby's model into 3DS Max, set a skin modifier to contain all the bones so they didn't lose their value on export, and changed the normals on his arm. I exported that as a .dae, reimported that .dae and exported it as a second .dae (with the skin modifier change from before), and imported the second .dae into Brawlbox  and exported as a third .dae. Every dae file kept the same shading changes I had made, never changed, always appearing as the white textureless model: The only difference I noticed was that the changed normals lost their smoothing group in all daes.

    Also, those flags are something I'll experiment with if I ever get to finish experimenting with srt0 unknown datas.
    Logged


    Mewtwo2000
    The Stage Master
    Special Access
    *****
    Offline Offline

    Posts: 3331


    Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « Reply #8 on: January 12, 2012, 05:31:47 AM »


    Which importer are you using for that? I use the one coming with max 2010, and I'm sure it resets the normals no matter what I do O.o
    Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    Xiggah
    Supreme Kitten
    ********
    Offline Offline

    Posts: 648

  • Awards Super Saiyan Topic Heart Container

  • View Profile WWW Awards
    « Reply #9 on: January 12, 2012, 12:25:05 PM »


    Which importer are you using for that? I use the one coming with max 2010, and I'm sure it resets the normals no matter what I do O.o

    I'm using 3DS Max Design 2011: Perhaps newer versions of 3DS Max Design don't reset shaders, or it might be the 3DS Max Design products that don't reset. If you'd like, I could test on 3DS Max 2012 (non-design) as well.
    Logged


    BlackJax96
    Brawl Mod God
    Boss Kitten
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #10 on: January 13, 2012, 05:11:27 PM »


    Mewtwo.
    I love you. Im srs here
    (I also used the Unify Normals button... Tongue)

    I think I know why the normals on the right side of the body look bad in-game if they aren't reversed though. I'm coding a fix for it right now.
    Logged

    Mewtwo2000
    The Stage Master
    Special Access
    *****
    Offline Offline

    Posts: 3331


    Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « Reply #11 on: January 14, 2012, 02:49:41 PM »


    I have some more info about this. Sometimes, when a vertex is affected by more than just one single bone in a significant percent, the normals get inverted in-game too. This would mean that some vertices in an already normal-inverted model would get inverted again, and the invert would need to be turned to non-inverted again in order to make normals work well ingame.

    Fox looks like this. Some parts of the inverted parts are not inverted, and they are the parts with shared weights.


    Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    Xiggah
    Supreme Kitten
    ********
    Offline Offline

    Posts: 648

  • Awards Super Saiyan Topic Heart Container

  • View Profile WWW Awards
    « Reply #12 on: January 14, 2012, 05:46:11 PM »


    I have some more info about this. Sometimes, when a vertex is affected by more than just one single bone in a significant percent, the normals get inverted in-game too. This would mean that some vertices in an already normal-inverted model would get inverted again, and the invert would need to be turned to non-inverted again in order to make normals work well ingame.

    Fox looks like this. Some parts of the inverted parts are not inverted, and they are the parts with shared weights.





    I think it's something to do with the older versions of 3DS Max. The newer versions past 2010 don't seem to have these problems, not for me.
    Logged


    DemonBoy
    Holy Kitten
    *
    Offline Offline

    Posts: 1436


    That one guy

  • Awards Infinite Smash Team Super Saiyan Topic Starstormer Renowned Hacker

  • View Profile Awards
    « Reply #13 on: January 29, 2012, 09:18:26 AM »


    I followed this tutorial exactly but i'm still having problems with the face of my character.

    Logged

    Mewtwo2000
    The Stage Master
    Special Access
    *****
    Offline Offline

    Posts: 3331


    Making stages since 2010

  • Awards Former PMDT King for a Day Ceiling Cat Featured

  • View Profile WWW Awards
    « Reply #14 on: January 29, 2012, 09:36:19 AM »


    By the looks of the capture... Is it scaled or something? That grey tone has appeared to me before when TopN had a rescale induced by the 3dsmax importer.

    If that's the case, and even with the proper scale the face still seems to be wrong, then you may need to manually edit the normals in the face in 3dsmax.

    It looks as if the face was broken in 2 parts, are you using 2 different materials?
    Logged

    SW FC: SW-5958-4724-5095
    Wii FC: 1247-2259-6207
    Twitch: http://twitch.tv/mewtwo2000
    Visit my stage thread here


    Stage light and fog tutorial
    Stage shadows tutorial

    Pages:  [1] 2 3
    Print
    Jump to: