S-22 Posted 2004年12月15日 05:12 Posted 2004年12月15日 05:12 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.
S-22 Posted 2004年12月15日 05:17 Author Posted 2004年12月15日 05:17 well there is one that i get that gives me an error about zero vector error and wut was happening was that the skl_2_skx.exe could not convert a 0 to a one so i had to move my model to a diff. part on the axis.
S-22 Posted 2004年12月15日 05:18 Author Posted 2004年12月15日 05:18 I just used the -mohaa option to get my new weapons in AA.
S-22 Posted 2004年12月15日 05:18 Author Posted 2004年12月15日 05:18 ok i have done what it said at the top with all comands and skl_2_skx.exe full path and its not workin it might just be me bein a n00b but could someone show me how it should look (what i type in run) if i'm making it for moh allied assault here is the path of skl_2_skx.exe c:\Program Files\EA GAMES\MOHAA\SDK\tools/skl_2_skX.exe this is ehat i have put in run c:\Program Files\EA GAMES\MOHAA\SDK\tools/skl_2_skX.exe colt45.SKL -baseframe -mohaa and when i press ok it says "windows canot find c:\ program files..........." can somone please corect it thanx
S-22 Posted 2004年12月15日 05:21 Author Posted 2004年12月15日 05:21 You can make a bat file or something to run it but else do it like this. First! Make sure the SKL file is saved in the same directory as the skl_2_skx.exe file Start the "command promt", the one that gives you a dos window. Change drive and dir until you are in the folder where the SKL and skl_2_skx are located. To change drive in dos promt type c:" (or d: or whatever). To change dir type cd Program Files\EA GAMES\MOHAA\SDK\tools (if that's the dir you want) To create you SKD file type (mysklfile = your skl file name and without the extension skl) skl_2_skx mysklfile -baseframe To create your SKC skl_2_skx mysklfile If you add the option -mohaa then you will get a model usable in mohaa (or else it will only be spearhead). Example for the SKD skl_2_skx mysklfile -baseframe -mohaa Now you have the basic, the rest of the options for this can be read about in the first post.
S-22 Posted 2004年12月15日 05:21 Author Posted 2004年12月15日 05:21 A small reminder when exporting the SKL from 3D max! This is for people who run their computer with Regional and Language Options that when it comes to number uses , instead of .. An exampel is the Nordic countries and I know a few other European countries. Numbers with UK/US settings are displayed like this 1,000,000.00 and 0.055995 but with other regional options it migth be displayed 1.000.000,00 / 1 000 000,00 and 0,055995. As you can see there is a different use of the , and .. Because of this the exported SKL file might get numbers like this 0,0005650 0,005497 0,479988 instead of 0.0005650 0.005497 0.479988. This means you will recive an error message when you try and run the SKL_2_SKX.EXE. The easiest way to avoid this is to temporary change the Regional setting to UK/US setting before starting 3D max. When you export the SKL file it will be correct. Any error messages after that is because of some other error. Just make sure you have checked this first in case you are uncertain that your country have the same number system as the UK/US one.
S-22 Posted 2004年12月15日 05:21 Author Posted 2004年12月15日 05:21 OK, but what is that .SKL and how to make them??? I can't find such a plugin neither in MS3D nor in LR3D...
S-22 Posted 2004年12月15日 05:24 Author Posted 2004年12月15日 05:24 OK, but what is that .SKL and how to make them??? I can't find such a plugin neither in MS3D nor in LR3D... The plugin is for 3d Max. It is included with the latest SDK. With LR3d there is no need for skl, you simply export to skd and skc.
S-22 Posted 2004年12月15日 05:37 Author Posted 2004年12月15日 05:37 Hmm...good question...I'm not sure. Sawed_Off?
S-22 Posted 2004年12月15日 05:37 Author Posted 2004年12月15日 05:37 I tried the plug-in for g-max. It don't work. It specifically said in the sdk, in the folder that has the plug-ins, they were titled, 3ds max 3 and 3ds max 4. Also, on the g-max website, it has a list of games that they support, plug-in wise. MoH:AA and MoH:AAS aren't listed. it would be cool if they came out with one for g-max. SniperMatt
S-22 Posted 2004年12月15日 05:39 Author Posted 2004年12月15日 05:39 Its driving me crazy im using 3dsm 5, just exported a simple cylinder as a .skl, I followed both ways of using the skl_2_skx thing, So if I go the start/run way it says, windows cannot find d:\ program etc.. If I use the dos command prompt I get, skl_2_skx is not recognised as an internal or external command, operable program or batch file. Please help cos I am about to give my computer some kicks. edit: I found this thread at .map that fixed me up, http://dynamic4.gamespy.com/~map/mohaa/for...617d3f5c767f384
S-22 Posted 2004年12月15日 05:40 Author Posted 2004年12月15日 05:40 I'm planning on releasing a plugin for Milk3d to create the SKL files and autorun the skl_2_skx.exe That should help all you poor modders, lol.
S-22 Posted 2004年12月15日 05:40 Author Posted 2004年12月15日 05:40 The new Milk3D Moh aa/sh/bt plugin started it's closed Alpha testing last night. 1st results looked promising. Today testing will continue, open Beta test isn't far off.
S-22 Posted 2004年12月15日 05:46 Author Posted 2004年12月15日 05:46 Plugin is going great now. It now creates a basic tik file and a shader file, creates the skc and skd and move the whole lot into the mohaa folders for instant testing. U can either use Mohaa or MohRadiant to check the model is ok. Then all u need do is modify the tik file and/or shader file. Below is a screenie of a cat i exported from Milk3d into skc/skd format.
S-22 Posted 2004年12月15日 05:46 Author Posted 2004年12月15日 05:46 Currently i'm just implementing some keyframe interpolation code, and then i'll release the plugin for beta testing.
S-22 Posted 2004年12月15日 05:47 Author Posted 2004年12月15日 05:47 Currently i'm just implementing some keyframe interpolation code, and then i'll release the plugin for beta testing. Lol!! Nice work......can you make a voice activated plugin If you say "draw cat and export to mohaa", then the program will draw a cat and export it!! (it would make modeling so much easier)!
S-22 Posted 2004年12月15日 05:50 Author Posted 2004年12月15日 05:50 Right i'm putting to gether the beta version In the meantime here's some screenies to keep ya interested: Both were exported direct from milk3d, the tiks and shaders auto created. The dog was a just a static model, the rat was fully animated.
S-22 Posted 2004年12月15日 05:52 Author Posted 2004年12月15日 05:52 Ok i will As i've had to rush, part of it is still hard coded !!! 1. Download the 2 files, stick them in your milk folder. 2. Create a folder c:\games\mohaa Run milk. load a model export MOH SKL ... follow prompts. *NOTES: exported files will be in the folders created under c:\games\mohaa, this includes textures, shader, tik, skd and skc files. If your exporting a model with animations, make sure that every keyframe is set. If it gives a warning, then just goto frame 1, set the frame, frame 2 set the frame etc all the way through the number of frames you have. Once the model is exported, the standard tik and shader, will let u view it in Radiant, or spawn them into a map. Of course you can alter the tik to your own liking (but remember if you re-export it will overwite the tik ). Anyway, it's only a beta, have fun and let me know your thoughts. SKL_2_SKX.EXE MOH Plugin
S-22 Posted 2004年12月15日 05:53 Author Posted 2004年12月15日 05:53 While your beta testing, i'm working on a new version with a dialog box. This will allow you to choose options like: Specify Mohaa folder Export SKL Only Compile SKC Compile SKD Export Basic TIK Export Basic SHADER, and copy texture files Choose Mohaa or Mohsh format Enable Looping animations.
S-22 Posted 2004年12月15日 05:53 Author Posted 2004年12月15日 05:53 you told me milkshape wasn't able to support mohaa models because it doesn't support mulit-bone weights?
S-22 Posted 2004年12月15日 05:53 Author Posted 2004年12月15日 05:53 this isnt for weapons its for static modeles.....(i think)is it scorp?
S-22 Posted 2004年12月15日 05:53 Author Posted 2004年12月15日 05:53 It's for all models, statics, weapons etc.
S-22 Posted 2004年12月15日 05:54 Author Posted 2004年12月15日 05:54 you told me milkshape wasn't able to support mohaa models because it doesn't support mulit-bone weights? Yep, it cant import some of them coz it cant support the bone weights, so i stop developing the plugin. I moved to lr3d coz it's far more powerful, and it's still the only plugin that will let you export and import This plugin for Milk3d only allows you to export, but you can export statics, weapons etc. Of course if your doing ai or dogs etc, you loose the ability to have multi weights per vertex ... not a big problem, but some of the animations wont be as good as they could be.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new account登录
Already have an account? Sign in here.
现在登录