This is information are from Promitheas over at the Lightray 3D forum.
skl_2_skX.exe is part of ea's Spearhead SDK recently released.
--------------------------------------------------------------------------------
Simple Examples:
Go to Windows Start/Run.
Type the fullpath of skl_2skx.exe, SKL filename, commands and press OK.
Spearhead
-------------------
c:/tools/skl_2_skX.exe myfile -baseframe ---> creates a SKD file.
--
c:/tools/skl_2_skX.exe myfile --->creates a SKC file
Mohaa
---------
Just add -mohaa command
c:/tools/skl_2_skX.exe myfile -baseframe -mohaa ---> creates a SKD file.
--
c:/tools/skl_2_skX.exe myfile -mohaa --->creates a SKC file
*replace 'c:/tools/' with the path you have skl_2_skX.exe installed.
*replace myfile with your *.SKL filename(or fullpath).
Overview
------------------
skl_2_skX is a command line utility for converting. SKL files into a form usable by the Tiki model system. *.SKL files are text-based model files.
Having the functionality of skl_2_skX as a separate program from the exporter allows changes in model format without requiring the artists to re-export their models.
skl_2_skX will check the file times of the source and destination file and only rebuild them if they differ. This reduces runtime when running skl_2_skX from a batch file that converts a lot of animations when only a few have changed.
File formats
Being text-based allows .SKL files to be viewed or edited in a text editor, making diagnosing problems in models more convenient.
skl_2_skX exports two types of files:
*.SKC and *.SKD. SKD files contain the definitions of the bone heirarchy, vertex weights, surfaces, triangles, and level of detail (LOD). SKC files contain only the bone animation info.
SKD Files
--------------------
SKD files are created from the model’s baseframe.
Each model only needs one SKD file.
The baseframe is the .SKL file that has the model posed in such a way as to create the best LOD information possible.
The order that triangles are removed as the model is lowered in detail is based upon the length of the edges and the orientation of neighboring triangles.
Triangles with very short edges or whose orientation differs the least from triangles that share the same edge are chosen first.
Edges that are seams (either the triangle has a different texture from its neighbor, or doesn’t have a neighbor) can not be removed, and so limit how low detail the model can go.
In order to create the best LOD information, models should be posed such that important joints are bent so that triangles at those joints reduce detail last. For example, if a model’s arms are kept straight in the baseframe, then when the model reduces in detail the upper arm and forearm will appear to have webbing between them, like a bat. Bending the arms in the baseframe will help skl_2_skX choose more appropriate triangles when lowering detail.
Since the SKD file also contains the definition of the bone heirarchy, if the order of the bones are changed, or the bones are renamed, then the SKD file should be recreated to reflect the changes. Also, while changing the bone names is harmless, if the bone order changes in the SKD file, you should rebuild the SKC files to make sure the bone order is the same in them.
The names and triangles contained in each surface are stored in the SKD file. When surface names or IDs change in the SKL file, you should rerun skl_2_skX to recreate the baseframe to reflect the change.
SKC Files
------------------------
SKC files contain only animation information. You should have at least one SKC for each animation in the model. SKCs contain bone animation information and movement deltas for each frame.
Movement deltas are created by measuring the movement of the specified origin bone. By default, the bone named “origin” is expected, but you can use the –origin parameter to specify a different bone. No matter where the origin bone is in any frame of the original animation, it will be moved to (0, 0, 0) in the model’s coordinate space, with all other bones still in the same relative position around it.
When the model is animated in the game, it will simply sit in place if the game physics doesn’t apply the movement deltas to the position. Using this method we are able to remove any sliding of the character’s feet on the ground.
Command line options:
-------------------------------------------
skl_2_skX animname [-force] [-scale num] [-dest name]
[-ignore filename] [-origin originname] [-reverse]
[-verbose] [-nolod] [-noclampz] [-zeroz] [-noorigin]
[-clearz] [-clearxy] [-baseframe] [-maxbones num]
[-weightthreshold num]
[-offset x y z] [-clearx] [-cleary] [-loop]
[-zerox] [-zeroy] [-destdir dirname]
[-dest filename] [-ignoreflags] [-fps num]
[-newbaseframe]
[-morphbase filename] [-morphanim filename]
[-nologfile]
[-attachedModel]
[-doRotation]
[-animtype ]
[-speedscale scale]
[-mohaa]
animname
This is the name of a SKL file. (only type "myfile", not "myfile.skl")
-force
Causes skl_2_skX to re-process the animation regardless of what the time and date of the destination file is.
-scale num
Specify a scale to be used when converting the file. The default scale is 1.
-dest filename
Specify an alternate destination name for the SKC for SKD file.
Normally the destination file shares the same name as the animname but with a SKC or SKD extension.
Note that the directory remains the same.
-ignore filename
Specify an external file which contains a list of surfaces to ignore when grabbing this model. This is used extensively when grabbing a multi-part model.
-origin originname
Specify an alternate surface name for the origin. Normally, the origin surface is simply called “origin”, this allows one to choose an alternate surface name for the origin. This is used extensively when grabbing a multi-part model.
-reverse
Reverse the order of frames of the animation.
-verbose
Output a lot of information while processing the model.
-nolod
Do not create an LOD mapping for this model.
-noclampz
By default, the Z component of the origin bone is clamped to only positive and zero values. If you would like to allow negative Z values, use this option.
-zeroz
Always set the Z component of the origin bone to zero.
-noorigin
Don’t subtract the origin’s position from the model’s position. No movement deltas are produced.
-clearz
Specifies that Z movement is cleared out on deltas.
-clearxy
Specifies that X and Y movement is cleared out on deltas.
-baseframe
Save the model as SKD. The SKD file contains the bone definitions, the surfaces, texture coordinates, triangles, and the LOD mapping.
-maxbones num
Limit the number of bones that can affect a vertex to num per vertex. The num most influential bones will be used. The default (and maximum) is 8.
-weightthreshold weight
Limit the minimum influence a bone must have to be included in a vertex. Any with less influence will not affect the vertex. The default value is 0.01.
-offset x y z
Offsets the model by the specified amount. This is useful for when animations are animated at different heights or using different origin tags.
-clearx
Specifies that X movement is cleared out on deltas.
-cleary
Specifies that Y movement is cleared out on deltas.
-loop
Drops the last frame of the animation. This allows skl_2_skX to properly calculate deltas on looped animations. The last frame in the animation should be the pose as the first frame.
-destdir dirname
Specify an alternate destination directory for the SKC for SKD file.
Normally the destination directory is the current working directory.
-ignoreflags
Normally, when a bone’s parent is unused and no bone with the same leg/torso designation exists higher up the hierarchy,
the parent is kept, despite the fact that it doesn’t affect any vertices. Ignoreflags instructs skl_2_skX to not perform this check. Typically, this would be used when it isn’t feasible to use the –bones command because the hierarchies differ.
-nologfile
No log files(slg) will be created.
-fps num
Sets frames per second.
-newbaseframe
Skeletor baseframe export.
-morphbase filename
-morphanim filename
-attachedModel
-doRotation
-animtype
Default is fullbody.
-speedscale scale
Speedscale is an untested system. Frames per second will be multiplied by scale.
-mohaa
Use this command to export MOH:AA SKD,SKC files. Else MOH:AA Spearhead files will be created.