Home Dota 2

Importing .SMD for animation

Hey all,

I'm just starting out with dota2 modding, so please excuse any lack of knowledge. What I'm trying to do is create custom taunt animations for the existing dota 2 heroes. I have gone through a few tutorials on how to get started, but where I'm running into trouble is getting a fully functional skinned model into maya. I have decompiled the model files so I have the .mdls ready to be imported and the plugins ready to go. When I import the skeleton king .smd into maya, its just his body, when I try to import more, the initial body is gone and just the new piece is in its place. Another problem is when I try to import an animation, its just the skeleton. To start, I would like to just edit a pre done animation and export it to make sure I have the pipeline down. Can anyone point me in the right direction? Do you see any obvious steps im missing? FYI, I'm using maya 2012 x64 on a windows 7 machine. Thanks for any and all help!

Replies

  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    http://www.dota2.com/workshop/requirements

    Just import the FBX files or directly use the Maya files they provide :)
  • gingervitis
    yea, I tried that, it works, but then I cant get the animations to load on that model. Thanks for the reply!
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Yeah, can't load animations in Maya. But you can open the same .fbx files in Max and import the animation .smd using one of the importers. Then export the model as an .fbx with the animation now on the bones and import it back into Maya.

    Also, I don't really know what you mean by "get the pipeline down" since there is no submission process for animations as of yet.
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    You can select "Other" and just upload any zip file with a pic/description.
  • gingervitis
    Yeah, can't load animations in Maya. But you can open the same .fbx files in Max and import the animation .smd using one of the importers. Then export the model as an .fbx with the animation now on the bones and import it back into Maya.
    Ah, alright, guess its time to install Max once again. Thats a pretty silly workaround but, at least its something!

    You can select "Other" and just upload any zip file with a pic/description.
    No kidding, I was worried about uploading animations, but that sounds pretty easy. Thanks for all the replies.
  • WRHerbert
    Please let us know if you manage to get a taunt viewable in game, I've contacted T Vidotto but I'm still confused as to how to see in in the client. Cheers
  • gingervitis
    How sure are you that its impossible to get animations into maya through just the .smd importers. I'm still getting errors when importing the static rig.
    Ex: # Error: file: C:/Users/Matt/Documents/maya/projects/Dota2/root/models/heroes/skeleton_king/skeleton_king_model.ma line 8: RuntimeError: file <maya console> line 1: Plug-in, "vsMaster.mll", was not found on MAYA_PLUG_IN_PATH.

    I thought this would be the reason.
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Well nothing's sure when it comes to that kind of stuff but as far as I'm aware, the SMD importers that are supposed to be able to import animations havent been updated and that functionality broke somewhere along the way.

    The error you're getting is trying to access a valve Plugin which to my knowledge cant import animations SMDs but can export static mesh SMDs (only 32bit Maya though). Again, though, it hasnt been updated in a while.
  • gingervitis
    alright, well, I'm using 64 bit anyway, so that might be the issue. Still, since it seems all I need to export is an .fbx to get it into the workshop, the plugin shouldnt be an issue as long as its importing the rig. So, what I'm trying to do now is import the animation as an .smd, copy the timeline, open a new scene, import the .ma of the model and paste it onto that rig. The animation seems to make the rig go all crazy however, and I believe its because the animation comes in Z-up and the .ma comes in Y-up. Does anyone have some input on that or a way to get the animation Y-up? P.S. the importer doesn't give me the option to switch the orientation like it does for the static models.

    Again thank you for your replies, spudnik, you've been a great help.

    EDIT: I am selecting the bones in the same order.
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    I'm assuming you're talking about getting a model with animation from Max to Maya? Select the meshes and export as an fbx. In the export settings there is an option to set the target up axis (Y-up for maya)

    UKA7BA0.jpg
  • gingervitis
    Actually, I'm trying to keep everything in maya since I will eventually have a rig built and wont be able to import/export so freely without breaking the thing. I'm going to keep plugging away and just try to copy/pasta from the .smd animation file to the .MA full model. But if you know of a way to change the world orientation of an already imported model, that would help.
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Huh? I'm completely confused as to what your goal is right now... Do you
    a) want to bring an already existing animation from the game into Maya
    b) make a custom animation on an existing skeleton in Maya

    Solution to
    a) import FBX files from the zip that you downloaded into Max, decompile the animation you want from the game files, import that smd animation onto the the model that you got from the FBX files in Max, select the model and export it with the the animations now on it. Import the FBX you just created into Maya. Result: Mesh with bones, weights and the animation of your choice in Maya.

    b) import FBX files from the zip that you downloaded into May, make a control rig on top of the existing bones/weights. Result: Clean character in Maya ready for animation.
  • gingervitis
    well, I'm looking to do both, here's why. Ultimately I want to make custom animations, with a custom rig built over the provided .fbx files for maya just like you say in b. However, I need to first test the already existing animations to make sure I know what I'm doing when the time comes to export and import into dota. Also, when I start to animate the custom taunt, I need the idle pose to animate from. Problem here is that your workaround for a wont work with a custom rig as importing/exporting from max to maya will break it. Sorry for being so vague and thank you for your continued support.
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    However, I need to first test the already existing animations to make sure I know what I'm doing when the time comes to export and import into dota.
    Like I said earlier, you really can't because there's no ingame compiler for pure animations yet. Also, not sure why you want one that's already made for that, ANY animation will do the job there, even if it's just the arms flailing around.
    Also, when I start to animate the custom taunt, I need the idle pose to animate from. Problem here is that your workaround for a wont work with a custom rig as importing/exporting from max to maya will break it. Sorry for being so vague and thank you for your continued support.
    Solution: Import FBX files into Maya, build your rig (can be very simple to test it before you commit). Follow the steps outlined in b) and when you import the character with the idle animation into Maya, make sure the "use namespace" option is turned on so that importing doesn't fuck up your clean rig. Then go through the bones and copy the rotation values from the bones onto your FK rig (pivot points of your FK controllers must match the bones they are controlling of course). A neat trick that makes this super easy: Select the object you want to copy TO, then select the object you wanna copy FROM. With those two selected, go into the Channel Box and click on the Rotate X value (so the number) and then hit TAB 3 times. This will copy the rotation values for XYZ over the object you selected first. Repeat this for the rest of the bones, and you should have your rigged character in the exact same pose as the the idle animation you copied it from (obviously copy the first or last frame) and you can go from there. Yes, it's a little bit of busywork that'll take 10min or so but it's a onetime thing since you only need one frame and no dota 2 model has more than 56 bones ^^ Hope that helps.

    EDIT:
    Oh and concerning the IK concern raised in the other thread: If you rig the legs (and arms/spine/whatever) so it's switchable between IK and FK, then it's as easy as starting in FK and blending to IK in the first couple of frames. You can also match IK to FK but that's a bit more complicated. For the switchable IK/FK setup, this hould get you started. There's a ton of tutorials floating around on this and if you look around, you'll find answers to most of your questions.
  • gingervitis
    Like I said earlier, you really can't because there's no ingame compiler for pure animations yet
    I've seen a few taunts in the workshop, which is all I aim to do ATM.

    I'll give your solution a try and let you know how it goes. Thanks!
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    If you don't want to compile, all you gotta do is export the skeleton as .FBX by selecting the root bone and doing "Export Selection" put it into a ZIP and upload via the "Others" option ingame ^^

    But if you want to test ingame, you gotta compile.
  • AndrewHelenek
    Offline / Send Message
    AndrewHelenek polycounter lvl 6
    That's what I did when I submitted my taunt today, I submitted an .FBX and .MA file of the animation. Once I get this pesky SMD exporter reinstalled in my maya I'll also send them an .smd

    Zipped them up and uploaded with video. Simple and Clean.
  • gingervitis
    I have a partial rig im working with ATM, and copying the XYZ values from the bones of the animation to the controls of the rig doesn't seem to work too well. The controls aren't on a 1:1 basis with the bones and the idle pose ends up looking pretty funky. My last option is to just do my best imitating the idle pose control by control. It wont be perfect, but it may not have a big enough pop to be noticeable. Anyone have another suggestions?
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    As long as you're relatively close, you shouldn't see any pop at all since as far as I remember Dota 2 blends animation into each other.
  • gingervitis
    Spudnik wrote: »
    As long as you're relatively close, you shouldn't see any pop at all since as far as I remember Dota 2 blends animation into each other.

    Awesome, thank you. I kind of thought this would be the case, but didnt want to just assume.
  • WRHerbert
    As for compiling into the game, I have a basic understanding of how that works back when I first made items for TF2. But does anyone have a nice guide online somewhere that can tell me how to preview it in game? I was also wondering if it's possible to preview a taunt for a hero that doesn't have one in game already that you can replace, or what animation do you replace if they don't have a taunt already.
  • squall787
    Sadly there is no easy way to see your animations in game unless you decompile a hero and import him as a courier. - The issue with this is that the heroes are higher poly than you can submit with a courier.

    (so its not really an option, but do-able)

    TVidotto just posted his taunt like described in this thread. The only difference was that he actually modded the game to have his taunt play. Similar to the courier method, but he actually found a hero in the game files and edited a QC file. Or just named his smd and compiled it to overwrite a hero animation.

    Example would be that he made the taunt, and called it idle, so that the Idle in game is not just the taunt playing over and over.

    Sadly this is not a process that is easy to explain. I am under the impression he would like to get around to doing a video on how to. But usually by the time he does that type of stuff, the submission process has updated.

    I think if we keep strong on creating taunts, soon they will want to capitalize on the additional revenue they will create and stream line everything for us, just like the did for the couriers.

    Since the in game importing is not easy to access for now, im just creating a rough shot of what it would look like in game with an Image plane of the ground and my taunt at an angle close to what it would look like in game.

    You can see that here - http://steamcommunity.com/sharedfiles/filedetails/?id=177028544

    if your interested.
  • squall787
    well, I'm looking to do both, here's why. Ultimately I want to make custom animations, with a custom rig built over the provided .fbx files for maya just like you say in b. However, I need to first test the already existing animations to make sure I know what I'm doing when the time comes to export and import into dota. Also, when I start to animate the custom taunt, I need the idle pose to animate from. Problem here is that your workaround for a wont work with a custom rig as importing/exporting from max to maya will break it. Sorry for being so vague and thank you for your continued support.

    This will most likely be something that Valve rolls out when the submission process is set up. But for now I personally just search for some good images on Google for the Idle pose, and replicate that. Once the real idle poses come in, it shouldn't be too hard to adjust your animation.

    I attached an image of what im using.
Sign In or Register to comment.