-
Notifications
You must be signed in to change notification settings - Fork 4
Ripping Models
Here's a guide on how to use this Addon with the files from the Sonic Adventure titles!
Before we get started, you'll need to dump out the game assets by creating a Mod Project using the SA Tools. You can download the latest build here
Just open up the Project Manager tool in the SA Tools download. If you're a first time user, it will prompt you to setup paths to your game installs. Once you have set up the paths, all you will need to do then is setup a New Project. Select the game you want to rip the assets from, give you're project a name (something like "Rips" will do), and press the create. It'll extract all of the assets to a Projects folder.
You can read more on this, and learn more on where specific files and assets will be, on the Asset Info page.
If all has gone well so far, you should now be able to locate the new project folder in the Project folder created in the directory of the game. These projects contain all of the data from the game that have been "mapped" at this current time.
If you need something more indepth, here is a link to the SA Tools Project Setup Guide.
Additionally, if you're looking for extracting files from Sonic Adventure/Sonic Adventure 2 on Dreamcast, please refer to this guide.
The process to import a model or a stage is really straight forward. All it takes is making sure the addon is installed (see here for installation guide), and then importing through Blender.
Simply navigate to one of the following options:
- To import Model files: "File -> Import -> Sonic Adv. Model (.*mdl)"
- To import Level files: "File -> Import -> Sonic Adv. Level (.*lvl)"
Below is a screenshot of the File Dialogue box.
Once your asset is imported, you should be able to start taking a look around it in the main scene in Blender. Please note, some levels may take a second to import as they may have a lot of data to be processed. You may also need to increase your view distance if you would like to see the level without it clipping.
Example Character Import
Example Level Import
Level imports also come with two types of sub Collections when imported. A Visual and a Collision collection.
The Visual contains all level models that are rendered when the level is played. The Collision contains level models are have their attributes set to solid, but are invisible. In SA1/DX, your main level will be mostly comprised of Visual objects as it used used the level models for both visual and collidable surfaces.
Now that you have your model or stage imported, you probably want the model to have its textures. Thankfully this addon also supports auto-assigning textures.
First, you will need to export your textures to a Texture Pack. This can be done using Texture Editor in the SA Tools. In the Texture Editor tool, simply load the texture file you need to use, and use the File>Export All option to export an index.txt file. You can follow this guide for more indepth information
Once your textures are saved to a folder with index.txt, it should look a little something like this:
In Blender, navigate to the Scene Properties Tab and scroll down to the SA File Info panel:
Expand the Texture List properties, and click on the Texture List Specials button . Then select the Import SA Tex File option:
The addon, as of this writing, only supports importing Texture Packs.
Navigate to your exported Texture Pack folder and open the index.txt file. This will automatically import the textures into the scene. Now all you have to do is go to the Active Tools & Workspace Settings Tab and press the Update Materials button.
An alternative way to do this same thing is to open the Tools Sidebar options (N key), go to the SA Tools, and press the Update Materials button in there.
Once you have updated the materials, your model or level import will be textured! Huzzah!
For model files, this tool also supports loaded in animation files that have been converted from *.saanim to *.json.
The following information is extremely important
To import an animation, you will need an object that is setup as an armature. Not all models will import with an armature. Thankfully though, this addon can convert non-armature objects to armatures easily. The following are examples of an armature and non-armature object.
Example of an Armature Object:
Example of a Non-Armature Object:
If you have imported a mesh with an armature, you can skip to Animation Conversion or to Animation Import. If you do not, please complete the next step before continuing.
To convert a non-armature, simple select the root node of your object. It will be the very first object in the imported collection.
Once selected, go to the Active Tool & Workspace tab and press the Armature from Objects button.
A prompt with will open asking you for a Rotation mode and if you wish to merge the meshes.
- Rotation Mode
- Simply leaving this on the default (Quaternion) is fine.
- Merge Meshes
- This option will merge the mesh data into a single mesh on conversion.
Once you have adjusted the options the way you want them, simply press OK and a new armature containing the mesh data will be created.
Example output:
Woohoo! Now you're ready to properly import your animation data to the scene!
Once you got the armature, you need to make sure your animation files are in json before you can import them.
The simple method is you can simply drag your *.saanim file into the AnimJSONConverter program (AnimJSONConverter.exe in the root of the SA Tools). This will convert the file into a *.json for use with this addon.
The fastest way to completely convert all *.saanim files will be to run a batch program on the entire folder that has the *.saanim files you wish to convert in it.
The below batch script will convert all *.saanim files within a folder recursively. This means if you have other folders with animations, it will find those and convert them as well! Simply copy the below script, paste it into notepad, and press Save As. Be sure to set the filetype to all, and save as [whateveryouwant].bat
@ECHO OFF
FOR /R %%a in (*.saanim) do "[YOUR\PATH\TO]\AnimJSONConverter.exe" "%%a"
Note: Make sure that the "[YOUR\PATH\TO]" does not mainintain the brackets, ie "C:\SA Tools"
Now all you have to do is put that batch file wherever you want to start converting files and run it.
Example: Say you want to convert all of the Sonic Adventure 2 character animations. Simply drop a copy of your saved batch script into [YourProject]/resource/gd_PC/ and run the script. It'll locate all of the animations that have been ripped and convert them to json files for you.
Now comes the final step, actually importing the animations. Simply select your root object (the Armature), and go to the Load Anim JSON File button in the Scene Properties tab .
You are able to select as many JSON files as you would like to import. Once you have selected the files you wish to import, press the Load Anim JSON File in the dialogue box and your animations will be assigned to this model & armature.
To view the animations, you can head over to the Animations Workspace in the top bar menu in Blender.
Once here, change the Dope Sheet to the Actions Editor. Make sure the Armature for your object is still selected:
In the Actions Editor window, there will be a large New button with a drop down next to it. Select the drop down, and then select your imported animation!
Walla! The model should now be in the correct pose for the start of the animation! Simply press play and the animation will begin.