I tried to look into forums, searched many links and watched video tutorials for to find the character rigging and player animation scripts. I had to make a decision on how to export animations using ActorX and Maya, yet ActorX is another tool set editor plugin for Maya.
The steps involved in achieving how to export it in step by step is:
Install the Plug-In
- Downloaded the ActorX plug-in for Maya and copied it to plug-ins directory.
- Launched Maya, then enabled the plug-in (go to Settings->Plug-In Manager) by checking the "loaded" check-box. I Check "auto load" Maya.
Setting up your scene
The plugin will recognize both regular polygonal, textured geometry as well as skin clusters. The main requirement is that your mesh consists of a single hierarchy, linked together with joints. The exporter doesn't care what methods are used to animate the joints; the entire scene is sampled through the desired frame range, and at each frame the end result is what gets exported.
Be aware of the axes and orientation: typically, in Maya Y is up, X points to the right, Z points towards the viewer out of the screen. On export to a .PSK, the Y coordinate signs are flipped to comply with Unreal's handedness (relative orientation of axes.) In Unreal, the Z axis is up, Y points to the right, and X out of the screen toward the viewer. So you will usually need to adjust the mesh back to the desired orientation using the Mesh properties tab in the Animation browser - expand "Mesh", then expand the Rotation variable, which offers Pitch, Roll and Yaw - these are 16 bit integers, where 65536 equals a full 360 degree rotation.
Multiple materials can be used in the scene. They will end up as multiple material slots in the final mesh, and the order will be arbitrary by default, unless you force it by appending "skinXX" tags to the names of the materials - i.e., if the material names are Body and Head , renaming them to Body__Skin00 and Head__Skin01 will tell the exporter to obey that order when creating the .PSK file. In the Maya exporter, any characters following the double underscore will be cleaned up from the final .PSK. Maya has several levels of named materials and textures; the exporter retrieves the names from the "ShadingEngine" tags - that is, the first tag that comes up in properties when you double click on a shader in the multilister. This not only affects the order of slots for skeletal (and static) meshes, but can be used to influence rendering order as well.
Note that in Maya 5.0, the effect of IK handles on animation may not get exported correctly unless you ensure they have their "Sticky" attribute set.
Export the skeleton and mesh
- Loaded a scene containing the actor to export.
- Brought up the ActorX dialog by typing "axmain" in the MEL command window at the bottom of Maya.
- Filled in the various fields as follows:
- Output folder: enter the name of the directory where you wish to save the .PSK file. We recommend putting an "Unreal Files" directory under your actor's folder. The browse button is very useful here.
- Mesh file name: enter the name for the .PSK file. We recommend the name of your actor.
- Clicked the "Save mesh/refpose button. I did this with any frame of the animation. It is recommended that the model's reference pose be in a relaxed, spread eagle pose for ease of use.
Export the animations
There are two steps for exporting animations. First, I loaded the scene containing the animation(s) and "digest" an animation to read it into memory. I Repeated for as many animations as I could like to export this session. Second, I added these new animations to a PSA file and save it back out.
Digest an animation
- Loaded the file containing the animation.
- Brought up the ActorX dialogue by typing "axmain" in the MEL command window at the bottom of Maya.
- Filled in the various fields as follows:
- Output folder: same as for skeleton/mesh above.
- Animation file name: The same as the mesh file name (they will have a different extension to help to tell them apart). Entered the name of the existing .PSA file it asks if you wish to add this animation to that existing .PSA
- Animation sequence name: this is how the animation will be identified within the .PSA file.
- Animation range: specified the frames in the current scene that define this animation. (Format is `4-45'; number, hyphen, number)
Add your animations to a .PSA file
Once you have digested one or more animations you are ready to add them to a .PSA file.
- Brought up the "axmain" dialog.
- Clicked the "animation manager" button to display the animation manager.
- I added the animations to an existing .PSA file, click "Load" to load the .PSA file. (assumes that you already provided the name of the animation file in step 3b of the previous section. If not, then use the "Load As..." button)
- On the left in the "animations" list I saw the animations that you have just digested. On the right I would see any animations that already exist in the .PSA file. This will be empty if you are creating a new .PSA file.
- Select your new animations and click "-->" to add your animations to the output package.
- Click "Save" to save the .PSA file back out. (assumes you already provided the name of the animation file previously)
Additional MEL commands
axwritesequence: A quicksave command for skeletal animations which writes out the currently loaded scene, with its entire animation range as a single sequence with the sequence- and .PSA filename identical to the Maya source art filename.axprocesssequence: always saves the .psa to the source art folder, and otherwise works just like "axwritesequence".axwriteposes: Similar to axwritesequence, but dumps each frame in a single-pose PSA file, and attaches the frame number to each file and internal sequence name. Note: Some versions of the editor's animationbrowser importer don't properly handle importing/displaying single frame sequences.See also the new persistent "no popup confirmations" checkbox in thec"axoptions" window to make these commands effectively interaction-free.
Since Version 2.24, there's the
axexecute command line with options to perform both skin- and animation export entirely from the MEL command line with the following, mostly self-explanatory options, which can be combined in random order:axexecute [options and switches]- -path "[destination path]"
- -skinfile [.psk skin file name]
- -autotri
- -unsmooth
- -sequence [sequence name]
- -range [startframe] [endframe]
- -rate [rate]
- -saveanim
- -animfile [.psa anim file name]
Vertex Exporting
Simple old style, non-skeletal vertex animation data can be exported through a separate window, called up with "axvertex". Note that using vertex animation is discouraged - the skeletal rendering is more efficient, and has an interactive import art path into the animation browser in the editor, and offers far more options like rigidizing parts and LOD sprites, that vertex animated meshes don't have.The options in the popup window are self-explanatory - for documentation on the vertex animation art path, see UnrealVertexAnimation. (Referenced from: http://udn.epicgames.com/Two/UnrealVertexAnimation.html)



No comments:
Post a Comment