Creating new Animations (3DS MAX): Difference between revisions
BubbleWrap (talk | contribs) No edit summary |
m 18 revisions imported: Importing Portal Corps Wiki pages and history - Feb 6, 2020 |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
== 3DS Max == | == 3DS Max == | ||
Open 3DS Max and load the master rig file. Create an animation using the rig. | Open 3DS Max and load the master rig file. Create an animation using the rig. | ||
Load the export plugin if you don't have it already loaded: Customize > Manage Plugins > right click > | Load the export plugin if you don't have it already loaded: Customize > Manage Plugins > right click > Load Plugin > find the plugin and open it. Alternatively, the plugin will load automatically if placed in 3DS Max's plugin directory. | ||
Export from 3DS and pick the ANIMX format from the list | Export from 3DS and pick the ANIMX format from the list when saving the file. File > Export > Export > Choose ANIMX from file type > name the file > Export | ||
Save the Max file as a new name. You don't want to overwrite the Master file. | |||
You are finished with 3DS at this point. | You are finished with 3DS at this point. | ||
== ANIMX File == | |||
The ANIMX file needs to be looked at after export, use any text editor (like Notepad++). Change the <code>TotalFrames</code> number to match the amount of frames intended, for example: 30. ''This is important if you didn't set the frame rate in 3DS MAx''. Find <code>Bone "GEO_gun"</code> then select it and everything down to the end of the file and delete. Save the file. If you haven't done this, ''you will crash GetAnimation2.exe later''. This is because it will look for the GEO files that don't exist causing it to crash. | |||
<pre>Fuzzy_c Note: I think I used a different MAX master file the first attempt and didn't have this issue. It came up when using the SM_Master.max file as it must have extra geometries when exporting</pre> | |||
== GetAnimation2 == | == GetAnimation2 == | ||
This tool converts the ANIMX file exported from 3DS in to the ANIM file format which the game uses for animation. | This tool converts the ANIMX file exported from 3DS Max in to the ANIM file format which the game uses for animation. It has been referred to as "GA2". | ||
It is simple to use and only needs a | It is simple to use and only needs a one command line switch to work. For a full reference of flags, go to [[#Command Line flags Reference]]. | ||
Before you can convert to ANIM, You will need a SKELX file which can be generated by GetAnimation2. While it says "DO NOT USE" for the -s flag, it can used | Before you can convert to ANIM, You will need a SKELX file which can be generated by GetAnimation2. While it says "DO NOT USE" for the -s flag, it can used create a SKELX which will generate the ANIM file later without errors. Once you have SKELX files, you can skip this step.<br /> | ||
*Extract an ANIM file from the pigg files using tool of choice (like Piglet). | *Extract an ANIM file from the pigg files using tool of choice (like Piglet), skel_ready2.anim is a good choice as it's commonly used. | ||
*Run <code>GetAnimation2 -s <extractedfile>.anim</code> This will generate the SKELX file. | *Run <code>GetAnimation2 -s <extractedfile>.anim</code> This will generate the SKELX file. | ||
To generate the '''ANIM''' files, | To generate the '''ANIM''' files, follow these steps: | ||
Pack | *Create a body type folder called either <code>male</code>,<code>fem</code> or <code>huge</code> | ||
*Inside the body type folder, create a sub-folder called <code>models</code> | |||
*Put the SKELX file and your ANIMX file(s) in the <code>models</code> folder. | |||
*From a command prompt, change to the body type folder and run <code>path\to\GetAnimation2.exe -noperforce</code> ''This is a quirk of the tool: it writes the reference of the folder for the SKEL location into the ANIM''<br/> | |||
*Pack the ANIM file(s) in to a pigg and test it out. Alternately, you could use the file override method listed below. | |||
=== Command Line flags Reference === | === Command Line flags Reference === | ||
Line 46: | Line 55: | ||
-? Print this help</pre> | -? Print this help</pre> | ||
==Putting the Animation In-game== | |||
To test the animations, you can put the ANIM files in the <code>data</code> folder to override the version in the pigg files. I renamed the .anim file and put it at /data/player_library/animations/fem/fem_newspaper.anim | |||
Then load the game and and use the emote to read a paper <code>/em newspaper</code>. | |||
<pre>Note: Somewhere inside the anim file is a reference to the location it was built from like debug/skel_ready2.anim, so extract a copy of the one that matches where you're putting it (fem/skel_ready2.anim in this case) and put it in the similar folder, using debug example (/data/player_library/animations/debug/skel_ready2.anim).</pre> | |||
== Notes == | == Notes == | ||
<pre>Fuzzy_c: I copied the name from an emote and replaced it when testing. | <pre>Fuzzy_c: I copied the name from an emote and replaced it when testing. | ||
ANIM files have a relation to SKEL files. You can reverse an ANIM file then read the resulting ANIMX file (plain text) to find the SKEL file it used. You can then extract the SKELX file from the SKEL file using the same process as ANIM using the -s flag.</pre> | ANIM files have a relation to SKEL files. You can reverse an ANIM file then read the resulting ANIMX file (plain text) to find the SKEL file it used. You can then extract the SKELX file from the SKEL file using the same process as ANIM using the -s flag.</pre> | ||
Latest revision as of 10:02, 6 February 2020
Introduction
This page intends to document the process to create new animations for the game. It attempts to re-create some of the same steps Cryptic/Paragon would have used to achieve the same goal. You will need a few prerequisites before you will be able to build animations for the game.
- 3DS Max 2011 (or 2008) Note: I have used and tested 3DS Max 2011
- Master rig files from the Scrapyarders dump.
- ANIMX Export Plug-in for 3DS - found in the source and needs to be compiled.
- GetAnimation2.exe Note: This is the correct version, GetAnimation.exe doesn't use the new anim format
- SKELX files - These can be generated from game files. Looking for the original files.
- PIGG packing tool (Piglet, pigg tool from source)
3DS Max
Open 3DS Max and load the master rig file. Create an animation using the rig. Load the export plugin if you don't have it already loaded: Customize > Manage Plugins > right click > Load Plugin > find the plugin and open it. Alternatively, the plugin will load automatically if placed in 3DS Max's plugin directory. Export from 3DS and pick the ANIMX format from the list when saving the file. File > Export > Export > Choose ANIMX from file type > name the file > Export Save the Max file as a new name. You don't want to overwrite the Master file.
You are finished with 3DS at this point.
ANIMX File
The ANIMX file needs to be looked at after export, use any text editor (like Notepad++). Change the TotalFrames
number to match the amount of frames intended, for example: 30. This is important if you didn't set the frame rate in 3DS MAx. Find Bone "GEO_gun"
then select it and everything down to the end of the file and delete. Save the file. If you haven't done this, you will crash GetAnimation2.exe later. This is because it will look for the GEO files that don't exist causing it to crash.
Fuzzy_c Note: I think I used a different MAX master file the first attempt and didn't have this issue. It came up when using the SM_Master.max file as it must have extra geometries when exporting
GetAnimation2
This tool converts the ANIMX file exported from 3DS Max in to the ANIM file format which the game uses for animation. It has been referred to as "GA2". It is simple to use and only needs a one command line switch to work. For a full reference of flags, go to #Command Line flags Reference.
Before you can convert to ANIM, You will need a SKELX file which can be generated by GetAnimation2. While it says "DO NOT USE" for the -s flag, it can used create a SKELX which will generate the ANIM file later without errors. Once you have SKELX files, you can skip this step.
- Extract an ANIM file from the pigg files using tool of choice (like Piglet), skel_ready2.anim is a good choice as it's commonly used.
- Run
GetAnimation2 -s <extractedfile>.anim
This will generate the SKELX file.
To generate the ANIM files, follow these steps:
- Create a body type folder called either
male
,fem
orhuge
- Inside the body type folder, create a sub-folder called
models
- Put the SKELX file and your ANIMX file(s) in the
models
folder. - From a command prompt, change to the body type folder and run
path\to\GetAnimation2.exe -noperforce
This is a quirk of the tool: it writes the reference of the folder for the SKEL location into the ANIM - Pack the ANIM file(s) in to a pigg and test it out. Alternately, you could use the file override method listed below.
Command Line flags Reference
-monitor Continue running and monitor the given folder for animation changes -prescan When starting monitor mode scan the hierarchy for files that need processing -f Force all animations to be reprocessed regardless of age comparison -noperforce Does not access asset version control system during processing. This can be used to work offline from Perforce. Also handy for development testing. -e <.anim> Given a path to a runtime .anim file this will convert it to human readable text files and then quit. Useful for debugging and examining the runtime data. -s <.anim> <dest> Given a path to a runtime .anim file this will convert it to source asset files, .SKELX and .ANIMX, placed in the destination. These files can be fed back as source assets or imported to MAX. DEVELOPMENT IN PROGRESS - DO NOT USE! -batch_src Start at the current working directory and convert old .WRL associated .anim files to the new source animation formats: .SKELX and .ANIMX. Don't use this command unless you are aware of the files it will overwrite. DEVELOPMENT IN PROGRESS - DO NOT USE! -? Print this help
Putting the Animation In-game
To test the animations, you can put the ANIM files in the data
folder to override the version in the pigg files. I renamed the .anim file and put it at /data/player_library/animations/fem/fem_newspaper.anim
Then load the game and and use the emote to read a paper /em newspaper
.
Note: Somewhere inside the anim file is a reference to the location it was built from like debug/skel_ready2.anim, so extract a copy of the one that matches where you're putting it (fem/skel_ready2.anim in this case) and put it in the similar folder, using debug example (/data/player_library/animations/debug/skel_ready2.anim).
Notes
Fuzzy_c: I copied the name from an emote and replaced it when testing. ANIM files have a relation to SKEL files. You can reverse an ANIM file then read the resulting ANIMX file (plain text) to find the SKEL file it used. You can then extract the SKELX file from the SKEL file using the same process as ANIM using the -s flag.