• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

FBX and animations

Status
Not open for further replies.
Hey all,

I got to import models in Starcraft II that are already animated. I need help with the following:

  • Does Starcraft II allow one-sequence key framing, which you control in-game through scripting (animation 1 ends at e.g. 60 frames, at 61 animation 2 begins, etc.) or do they have to be registered individually in order to play the animations?
  • The file format is .fbx and while the model is properly imported, the importer allows me to load only one animation at a time. How do I import them all simultaneously, without using the "xaf" (Load Animation) feature?
  • If (•) #1 is not recognized in Starcraft 2, how do I import the single track animations?

Screenshots will be very much appreciated; if not, written words are fine as well. :)


I managed to solve it.

So for bullet 1, yes, StarCraft II allows multiple animations, you only have to go to SC2 Animation option in 3DS Max and set the animations through the option "New" -> Give a name to the animation (warning, if it's let's say a "Stand" variation, it should be "Stand 01" and not the WarCraft III "Stand - 1". There you define the first frame of the animation and then its duration (not the ending frame!).

Downside is that if you randomly assign animations from the beginning of the key framing, from the middle, then back from the beginning and then from the end, at some point it will not allow you to pick an animation from an earlier frame, it will keep changing your input to the next unused frame of the highest frame that you used. Not sure if this is lack of scripting or anything I didn't do correctly, but I could not find a workaround.

For bullet 2, you import it with that one animation and then you go down in the right to configure the time and set it e.g. to 3000. Then, in the key framing line, if there is a part of it blacked out, it means that right when the black part starts, there are no animations. Move your cursor in the beginning of the black part (probably with -1 frame) and check what the value is. Return to the time configuration button in the right corner of 3DS Max and change it to that value.

For bullet 3, didn't try it, but since the method with multiple animations works, you're all set (unless your animated mesh is not structured this way - in that case, I'd advise to manually import one animation (which the default model doesn't have attached on it) and go to "Animation - Save Animation..." as .xaf file; once you save it, load the other animation and repeat the process, until you are done with all of them. Then, reload the mesh and import all the animations from the menu "Animation - Load Animation...". Eventually, the animations will be added on your key frames line and you can repeat the process of bullet 2). Tested with scripting as well to load a specific animation.
 
Last edited:
Status
Not open for further replies.
Top