Home Gallery Resources The Team Rules chat Login Register
Pages:  [1] 2 3
Author Topic: Rigging and Importing in Autodesk Maya  (Read 2030 times)
0 Members and 1 Guest are viewing this topic.
Vaanrose
Hyper Kitten
******
Offline Offline

Posts: 202


Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « on: March 22, 2013, 01:16:39 AM »


    How to import into Brawl using Autodesk Maya




    So I've noticed a distinct lack of Maya users here on the forum. I won't turn this into a Maya vs. Max argument, but I'm sure there are many of you out there who might prefer Maya to Max, but lack of Maya support has left you with no other option.

    Well, let's fix that.

    Many of you have probably been led to believe Maya created models are incompatible with Brawl. This isn't the case. My imports were completely modeled and rigged within Maya. Max never touched my pipeline, and it doesn't need to touch yours.

    So why use Maya when everyone else uses Max? The rigging tools. As you'll see in this tutorial, Maya's rigging tools are hands-down easier to use than the ones found in Max. Max's modeling tools are arguably better suited for new users, but the rigging tools can be quite cumbersome to learn. This is not the case in Maya.

    Another plus is you can use the most recent version of Maya with no issues. I'm using 2013 for this tutorial. I can guarantee this method works for every version of Maya since 2009, and I don't foresee any problems with future versions, either.


    Now, if any of you have used Maya in the past you might have hit a wall almost immediately. Maya doesn't natively import or export as .DAEs, and that's what Brawlbox uses. This is definitely a weakness in the Maya program, but there's a very easy fix.

    You have two options. If you are using an older version of Maya, such as Maya 2010 or 2011, then you can use the OpenCOLLADA plugin, available for free online. This plugin will let you import and export as DAEs, no extra step involved. But unfortunately, the author of this plugin has not created a version for 2012 or 2013. If you're anything like me, then you upgrade to the most recent version of Maya as soon as it's available, so this isn't an option.

    (NOTE: Autodesk does offer an "Fbx_Dae" plug-in, but it's terrible, so please don't use it.)

    Instead, we need to download the Autodesk FBXConverter. It's available for free on the Autodesk website here: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=14943111

    This is an external program that will allow you to convert between .DAE and .FBX. It's easy to use, and has always worked error-free for me. Once you have that program installed, you're ready to get started. So let's do this thing.

    STEP 1

    Choose a character to rig over. For this tutorial, I'll use Dedede. I'm assuming you all know how to operate BrawlBox, so just open up your model and export him out as a .DAE, if you don't already have a copy of him.

    STEP 2

    Open up the FBXConverter. Under "Source Files", click "Add..." and load the .DAE file. In the "Destintion Files" box, choose where to save the file (it defaults to the same folder as the source file), and under "Destination Format" leave it at the default "FBX201000 (Autodesk)". Then click "convert." After a second or two, you'll have a shiny new .FBX file.



    STEP 3

    Open up Maya, and go to File->Import. Select your new .FBX file, and your model will import in. Now we have Dedede inside of Maya, and his skeleton is still rigged. Before we can import our own model, we first need to delete Dedede's mesh.



    STEP 4

    Click this button. This will turn off your ability to select the joints.



    Then click-drag over your model to select him.

    STEP 5

    Go to Edit->Delete By Type->History. This will separate the model from his skeleton, and then you can simply hit the delete key to remove him from your scene.



    STEP 6

    Go to Window->Rendering Editors-> Hypershade



    STEP 7

    Hit edit->Delete All Unused Nodes. This will delete the model's materials out of the scene. If you forget this step, when you go to import your final model into Brawlbox it will import with a bunch of unused Materials. You can delete them in Brawlbox with no issue, it's just faster to do this now.



    STEP 8

    Alright. Now your scene is prepped and ready for you to import your new character. I'll be importing my Snorlax model for this tutorial. Just go up to File->Import and import like before.

    STEP 9

    So here's our first problem. He's too small!

    But that's an easy fix. Just select his mesh, and hit this button. That's the scale tool.



    Then grab the center yellow box here:



    And drag it to the right to scale your model until he lines up with the skeleton.

    Step 10

    Once you've done that, select him and go to edit->delete by type->history again. This is your construction history. Maya keeps a record of all the changes you make to any model, and it adds up. So it's a good idea to delete your history before attaching your skeleton, especially if you've built your own custom model, in which case your construction history is probably very large. When you export out as an FBX, the history is stripped away, so it's not a huge deal if you forget this step, but the more history you have, the slower Maya will run. If you feel Maya is running slower than usual, deleting your history usually frees it up. But be careful, deleting your history AFTER attaching your skeleton will separate the skeleton from the mesh, just like before.

    Step 11

    So it's time to attach the model to the skeleton. You have two options for how to connect him. You can attach him to every joint, or you can attach him to a select few joints (or even just one). Which option you pick largely depends on how many pieces your character is in. If he's basically one piece, like Snorlax here, attaching to every joint is fine. But if he has a different model for his arms or legs, there's no sense in attaching those pieces to joints in his head, is there? So in that case, you'll attach to only a handful of joints.

    If you're going to attach to the whole skeleton, all you have to do is select one joint, shift-select your mesh so that you have both selected, and proceed to step 13. If you're going to attach to only a few joints, though, head on to step 12.

    (Note: Make sure you hit this button again to let you select joints again)



    Step 12

    To attach to only a few joints, you need to select each joint you want to attach to. You'll note that if you grab your character's shoulder joint, for example, it will turn green to show it's selected, but all of it's child joints will turn green, too, such as the elbow and wrist joints.



    This is misleading. Those joints are NOT selected, and if you went to attach your mesh now, it would only attach to the shoulder. So if you wanted to attach to the elbow and wrist as well, you would need to shift-select each joint in order. I like to work "up the chain", selecting the lowest child first (the wrist) and then shift-selecting up until I get to the main parent (the shoulder). Once you have all the joints you want to attach to selected, shift-select your model.



    (NOTE: Selecting them in this order will leave them all green, visually indistinguishable from the first way. But trust me, it's different. Maya's doing some background work here.)


    Step 13

    With your joints and model both selected, make sure you're in the Animation menu set here:




    Then go to Skin->Bind Skin->Smooth Bind, and then hit the little square next to it (called the Option Box) to pull up this menu.



    Now, depending on whether you're attaching to all the joints, or just a select few, you'll change the "bind to:" setting. "Joint Hierarchy" will attach to every joint, and "Selected Joints" will attach to only the joints you have selected.

    The rest of the settings here are VERY important. Maya is designed for Film Animation first, and video games second, so many of Maya's settings are NOT compatible with Brawlbox, or any video games, for that matter. Among them are Bind Method: "Heat Map", and Skinning Method: "Dual Quarternion". These are basically more advanced history-based rigs, which do wonders when your animating for film, but both of these are incompatible with FBX and DAE files, so you'll get errors if you use them.

    But most important of all is the setting "Normalize Weights." Maya defaults to "Post." You MUST change this to "Interactive." I CAN'T STRESS THIS ENOUGH. If you bind using "Post" it will import into Brawl with messed up weights, and ANY weight-painting you do in this method will have to be redone from scratch.



    "Post" allows vertices to have non-100% weights. That is, a vertex can have greater than 100% total influence spread across it's joints, as well as less than 100%. This is amazing if you're doing animation, but it is NOT compatible with Brawl.

    Brawl requires every vertex to have EXACTLY 100% influence. No more, no less, and if you import a model with non-100% influence into Brawlbox, all your weights will be recalculated and look like garbage. Setting the "Normalize Weights" to "Interactive" ensures every vertex has 100% influence.

    The rest of the settings can be left at default. So, hit "Bind Skin" and you're ready to paint some weights.


    Step 14

    Select your model, then go to Skin->Edit Smooth Skin->Paint Skin Weights Tool and then hit the option box. This will pop up the Paint Skin Weights Tool tab on the left, and you'll see your model turn black.



    What we'll be doing here is painting the amount of influence any joint has on each vertex. In the paint tab, you see a list of joints. If you click on them one in a row, you'll see parts of your model light up. These lit parts show you how much influence that joint has on that section of the model. The brighter the shade of white, the more influence the joint has on that section. The more influence, the more that section moves when the joint is rotated.



    Now, Maya defaults to showing influences in Black and White. There's nothing wrong with this, per se, but my students always find it MUCH easier to paint in Color Mode. So scroll down to the bottom of the paint tab, and check "Use Color Ramp."



    You'll see your model light up with a gradient of colors. Black has zero influence and White has 100% influence, just like before, but now the in between amounts are show with color. Yellow is 50%, red is 99%>, blue is <1%, and so on. By grabbing the circles on this gradient box you can re-position the sliders to change what each color represents, and you can also add more colors, should you desire. I personally like dragging the green circle almost all the way to the left, as seen here.



    Alright, so to begin painting, we need to first select a joint. Generally I like to go down to list and paint any weights that don't belong to Zero, before I go in and paint other influences. It's the easiest step, so you might as well get it out of the way first. Select each joint in turn, and if you see some influence that doesn't belong, you'll paint that away. For example, Dedede has these extra joints for his cloak that Snorlax doesn't need, so I need to paint all the influence away from those joints.

    In the Paint Tool tab, you'll see these options. One is brush shape, the otheris value. The brush shape changes how opaque your brush is. I like to use the second brush when adding influence, since it results in more smooth influence gradients, and I like to use the hard-edge circle when removing influence, because it makes sure all that influence is gone (if you use the soft brush, you might be left with a really small amount of influence instead of removing all influence like you wanted).



    The other important option is your value setting. A value of 0 paints 0% influence onto a vertex, and a value of 1 paints 100% influence on a vertex. Weight painting is not additive; what this means is if you have a joint with an influence of 50% and you paint on it with a value of 0.3 (30%) you will NOT be left with 80% influence, but instead the 30% influence will override the original 50%, leaving you with just 30% influence.



    Because every joint requires a total of 100% spread out across all the joints, Maya will automatically shift this now erased 20% influence to other joints. It's usually pretty good about which joints it add this other influence, too, but occasionally it will add the influence to some random joint you don't want it to, so it's a good idea to check where this influence goes by cycling through the list of joints.

    Weight Painting is definitely more of an art than a science, so it's something you'll just have to play with until you figure out what works best for you. That said, most of my students pick it up pretty quickly, so I'm sure you guys can handle it.

    A few more tips and tricks for weight painting though:

    At any time, if you hold down the "B" key, and then left-mouse click drag left and right, you'll change the size of your paint brush. This is good for when you need to get in and paint away small sections of vertices, like at the fingers.

    Next to the Value slider is an eyedropper. Use this whenever you need to have the exact same influence on an area that you already have somewhere else on the model.

    One thing you can do to check how your weights are going is to turn off the tool (hit the "Q" key) and then pose the joints. Bend the elbow for example, and then reselect the tool. Now if you paint your weights with the elbow bent, you'll actually see your vertices move when you paint them as they recalculate where they should be located at this new influence. When you're done, you can right click the moved joints and hit "assume preferred angle" to snap the joints back to their default position, new weights in tact.

    For semetrical objects, you only need to paint half the model! Once you've got one half looking good, simply go to skin->edit smooth skin->mirror skin weights, and hit the option box. Select which axis to mirror over (I've found that Brawl models import over the YZ axis) and then check "Positive to Negative" if you've been painting on the positive side of the grid or uncheck it if you've been painting on the negative side. Leave the other settings at default and then hit "mirror" and now you'll have clean painted weights on both sides of the object.



    If your model has seperate objects for parts that should be seamless, such as a  shoulder and arm that are seperate objects, you can paint the weights on both of these at the same time by selecting both meshes before hitting the Paint Skin Weights Tool. This will let you make sure the line of vertices on both objects that should be seamless have the exact same influence on all joints. When they have the same influence, you won't get any of that icky gaps that get created on a lot of model imports.

    Step 15

    When you're done with your weights, or if you just want to check how the animations look in Brawlbox, it's time to export the model.

    Go to File->Export All and hit the Option Box. Under "General Options" you're going to set the File Type to "FBX export." Then, under "File Type Specific Options", click "Edit Preset..."



    A new window will pop up. Scroll down to the very bottom, to the section labeled "FBX File Format." Maya will default to the most recent version of the FBX file format. But FBX files encoded with the 2011, 2012 and 2013 algorithms are not compatible with Brawlbox, or else they'll import with a bunch of errors. So instead, make sure to set this to FBX 2009. I think 2010 is compatible, too, but I just use 2009.

    If your model imports with weird errors, it's likely you forgot this step.



    After changing that setting, just hit close, and then hit "Export." Maya will ask you where to export the file to, so choose a name and destination.

    Step 16

    Now it's time to open up the FBXConverter again. Open up your new FBX file in the Source Files tab, and then in the destination files tab, set the destination format as "DAE Collada". Then hit convert.



    Now you can open up BrawlBox and import your shin new DAE file the same way you always do. And Wa la! A Maya Rigged model fully functioning in Brawl.






    Closing remarks:

    This tutorial assumes you have at least a somewhat working knowledge of Maya. If this is your first time using Maya, you'll notice that in many ways it's really similar to Max and in many other ways, it's really, really different. Spend some time getting used to the camera controls before trying to paint weights.

    Hopefully we can get some other people to chime in with other Maya-related tutorials in the future, but feel free to ask any Maya-related questions you might have in this thread for now.

    Good luck.

    - - Vaan
    Logged



    Kage Ryu
    Supreme Kitten
    ********
    Offline Offline

    Posts: 552


    The Infrequent Modder

  • Awards Heart Container Featured

  • View Profile Awards
    « Reply #1 on: March 22, 2013, 03:19:48 AM »


    Well of course I decided to try more rigging earlier today instead of waiting until past midnight...Meh.


    Anywho, thanks much for writing this, Vaan! Been in school for four years now with quite a few modeling classes, not one of which fully focused on Rigging. Now I've got a grasp of what I need to know for the basics after five minutes.

    *was using Post*
    *scraps binding and switches to Interactive*
    Logged



    Demon_of_Elru
    Mega Kitten
    *****
    Offline Offline

    Posts: 149


  • Awards Hot Topic Dedicated Hacker Famous Hacker Favorite'd Featured

  • View Profile WWW Awards
    « Reply #2 on: April 01, 2013, 12:30:20 PM »


    Thanks,I really appreciate this tutorial.
    Logged


    SonicBrawler
    Magical Girl
    Overlord Kitten
    ******
    Offline Offline

    Posts: 6987


    Bae

  • Awards Star Hacker Renowned Hacker Active Contributor Heart Container Super Saiyan Topic

  • View Profile WWW Awards
    « Reply #3 on: April 01, 2013, 06:43:24 PM »


    New(ish) user
    good uploads
    good custom models
    good tutorials
    wow man, you're doing pretty good here.
    Logged

    Quotes:
    Not all people have the luxury of being able to buy things whenever they want.

    Some people are barely scraping by in the economy.
    Modding has made you guys so spoiled.

    BlueBrain
    God Kitten
    *******
    Offline Offline

    Posts: 8943


  • Awards Infinite Smash Team Super Saiyan Topic >9000 Heart Container Hey! Listen!

  • View Profile Awards
    « Reply #4 on: April 02, 2013, 01:01:48 PM »


    are you a teacher?
    cuz i did read you say:
    "my students..."

    anyway, great detail in the tutorial, it's looking nice and clean.

    if i understand correctly, maya's riging method is more like a artist painting something, while 3ds max's is more like an architecht measuring everything...
    Logged

    Vaanrose
    Hyper Kitten
    ******
    Offline Offline

    Posts: 202


    Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « Reply #5 on: April 02, 2013, 05:47:18 PM »


    Yeah, I teach Maya at my university. Only for a couple of years, and it's really informal, cause I'm only two years older than the average student, but they needed someone to teach classes and so here I am. They say the best way to learn is to teach, and in my experience that's pretty true.

    As for the rigging, Maya does both. If you're so inclined, you can enter every weight manually, vertex by vertex. I do this occasionally, but it's a damned pain most of the time. The other way is much more intuitive. You get a  nice visual representation of how much weight any vertex has, and adding or subtracting influence is super easy.
    Logged



    BlueBrain
    God Kitten
    *******
    Offline Offline

    Posts: 8943


  • Awards Infinite Smash Team Super Saiyan Topic >9000 Heart Container Hey! Listen!

  • View Profile Awards
    « Reply #6 on: April 03, 2013, 02:59:45 AM »


    i see, the only thing that troubles me is the parenting, and how it gets represented in the rig, in 3ds max, for example, first i would rig the whole model to the hip bone, since it's the root bone, then i'd rig the legs, making them fully influenced by the leg bones once passed the "bending" portion, then i do the same with their child bones, and then i do the same again, starting at the waist, then the bust, then the shoulderNs, shoulderJs, elbows, hands and fingers, and then to finish the neck and head, would doing this same process through vertex painting work the same, or is there an even simpler way?
    cuz what bothers me in 3ds max is that the skin modifier stores all the bones the vertice has ever used, making it a pain in the ass to null a certain bone's influence, cuz it will also transfer to "unused" bones...
    Logged

    Vaanrose
    Hyper Kitten
    ******
    Offline Offline

    Posts: 202


    Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « Reply #7 on: April 03, 2013, 01:27:03 PM »


    With Maya, you rig to the entire skeleton all at once, unless your model is in separate pieces, then you can just rig each piece on its own. In the tutorial I go over the two ways to do this, either by selecting the hip joint (the root bone) and binding with joint hierarchy, which will bind the model to every bone, or by selecting only the joints you want to bind to, and then binding with selected joints.

    If you do it the second way, you won't have a bunch of other joints in your skin modifier (called the skin bind pose in Maya) that things can get accidentally attached to in the weighting process, but on the other side, if you later decide you want it influenced by another joint you didn't already have, it's a bit of pain to add another joint to the influence list without screwing up your weights.

    Maya keeps track of all the bones in a vertex's skin bind pose, even when those bones no longer have any influence on the vertex. So if you remove influence from one joint, there is a chance the influence will move to a different joint you didn't want it to. This is just something that has to be dealt with, since it ensures every vertex has 100% influence spread out across all its bones, which is what Brawl requires.

    However, Maya has different paint weighting settings that do NOT do this. Painting with the setting set to "Post" instead of "Interactive" allows vertices to have non-100% influence, meaning when you paint the influence away on a joint, it won't move to another one. But this isn't compatible with Brawl, not unless you makes sure manually that every vertex has 100% influence before exporting out. Otherwise when you take it in to BrawlBox, your weights won't look anything like what they did in Maya.

    I will say this; Maya does a pretty good job at redistributing weights for you. If you paint all the influence of a joint to zero, then move to the next joint and paint it to zero, too, Maya won't just stick all that influence back on to the first joint. It remembers you didn't want it there. The influence does have to go somewhere, though, so if you go the chain painting zero on every joint for any one vertex, eventually it will get put back on to a joint you painted away earlier, so you do have to double-check every now and then.

    As for the order you paint things in? You don't need to paint weights in the same order as the parent-child hierarchy. You can jump back and forth at your leisure.
    Logged



    A6M Zero
    Newbie Kitten
    *
    Offline Offline

    Posts: 5


    View Profile Awards
    « Reply #8 on: April 08, 2013, 06:26:27 AM »


    Hey, I'm new to BrawlBox and I'm just trying to get the rigs for personal animation.

    How do I export the .dae file so that they keep their materials? Right now I'm just getting the bare rigs, so I think I'm exporting the wrong things.
    Logged

    Vaanrose
    Hyper Kitten
    ******
    Offline Offline

    Posts: 202


    Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « Reply #9 on: April 08, 2013, 01:07:27 PM »


    If you follow the first three steps you'll get a fully rigged Brawl character into Maya. Just remember when you're exporting out the model from Brawlbox to export out the textures, too. I skipped that step in the tutorial.
    Logged



    A6M Zero
    Newbie Kitten
    *
    Offline Offline

    Posts: 5


    View Profile Awards
    « Reply #10 on: April 08, 2013, 01:24:49 PM »


    Right, how do I do that is what I'm asking.
    Logged

    Vaanrose
    Hyper Kitten
    ******
    Offline Offline

    Posts: 202


    Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « Reply #11 on: April 08, 2013, 01:43:28 PM »


    Open up your character in Brawlbox. Maximize the ARC folder, then the ModelData BRRES folder, then the 3D model folder. Right-click on the MDL0 (FitCharacterXX), and then click "Export". Save it as a .DAE.

    For the textures, open up the TextureData folder, and export out each Tex0 file the same way, saving them as .PNGs.
    Logged



    A6M Zero
    Newbie Kitten
    *
    Offline Offline

    Posts: 5


    View Profile Awards
    « Reply #12 on: April 08, 2013, 02:16:37 PM »


    Did you reapply all the textures manually then for the screenshots in the OP?
    Logged

    Vaanrose
    Hyper Kitten
    ******
    Offline Offline

    Posts: 202


    Moetwo

  • Awards Hot Topic Famous Hacker Starstormer Featured Tutorial Writer

  • View Profile Awards
    « Reply #13 on: April 08, 2013, 02:27:00 PM »


    I might have. This tutorial was made after-the-fact, so I had already finished the Snorlax import. Because of that I just opened up the Dedede file I already had saved. It's not too hard to relink textures, though.
    Logged



    A6M Zero
    Newbie Kitten
    *
    Offline Offline

    Posts: 5


    View Profile Awards
    « Reply #14 on: April 08, 2013, 04:20:24 PM »


    Yeah, I know how, I was just wondering. I got the impression from the tutorial that you could port everything nice and complete from pac to fbx.
    Logged

    Pages:  [1] 2 3
    Print
    Jump to: