Need help ripping Sonic Generations Animations into blender
Extracting data from a several year old game...

I have spent about 2 weeks trying to figure this out. Everywhere I look, it seems that its either a dead end, or I get told that it just can't be done (Despite me seeing lots of videos that proves that its been done). Anyway, enough about what I've been going through to try and find this information.
I've been following the info on this page (Bottom of the first post). I've, so far, extracted the data from the CPK, extracted the data from the Classic Sonics .ar.00 and .ar.01 files, imported the models into 3DS max 2013 (which was difficult to find), and converted the hkx animations into .kf format.
Now this is the point I'm stuck at. When i try to import the animations into 3DS max, it seems that the bones get removed from the dope sheet (aka animation editor) or at least from view. I have tried importing them many times but to no avail. I know hkx animations are valid as i viewed them in the havok previewer. The imported model also appears fine in 3DS max.
Any help is appreciated. I'm also on the IRC if that would be better for figuring this out.

I'll need to scour my harddrive for this, but there's a tool Damizean wrote a while ago that converts animations to a format readable by any version of Max, not just 2013 (if I remember right anyway). Its a smidge incomplete, if I recall, but should get the job done.

Will look around and get back to you on that.

EDIT: Couldn't find that just yet, however I found a .hka importing script that works with 3DS Max 2016 and should honestly be fine either way. Imported animations for Classic Sonic pretty cleanly. Link.

You'll want to use the "HKAImporter.ms" script in the 3DSMax folder. I'd try to ignore everything else just to be safe.

Worth noting that Generations is a Y-Up game like most games not made with UE4, and 3DS Max is a Z-Up space. There's ways to work around this but a lot of them are kinda hack-job, however if you plan on importing these files into Unity or UE4, generally those programs have ways to auto-correct Y-Up models and animations imported from 3DS Max. It's all just kinda manual which sucks honestly. A better method would be to automate this process, and I know for a fact an automated process for this *exists* somewhere, but for the life of me I can't find it at the moment. I'll keep you posted if I do though, but I'm kinda sick so thats likely not gonna happen juuuust yet. I'll try though.

Also, if you want your MODELS converted 100% quality, don't use any maxscripts or anything jank like that. Use GLVL. Particularly, the 0.5.7 version because that one supports converting .model files (what Generations uses) to .DAE pretty much flawlessly. There's also the source version on Github but that's been largely reworked and I can't guarantee how you'd convert character models that way as the tool's seemed to have shifted its focus specifically towards terrain editing and hasn't been updated in a year. It probably has some way of converting .model files to .dae as well / even better but I cba to find out right now lol

In GLVL, under the "Models" menu, click "convert .model to COLLADA(.dae)" and you should be good. I highly recommend doing this as your problem may be due to your model import script rather than your anim import script. To be safe, I'd just recommend using the methods I've linked.

I've noticed that when people use Generations Sonic animations in their 3D projects, he wobbles back and forth when running. I get that the game uses that for Sonic's leaning, but is there a way to extract that animation without any of the leaning period?

My potato can't run those tools at any reasonable speed otherwise I'd fiddle with it myself.

I've noticed that when people use Generations Sonic animations in their 3D projects, he wobbles back and forth when running. I get that the game uses that for Sonic's leaning, but is there a way to extract that animation without any of the leaning period?

My potato can't run those tools at any reasonable speed otherwise I'd fiddle with it myself.

If I get this running, I could probably look into that.

Overlord, on 04 October 2017 - 04:02 PM, said:

Sidenote - stop using font tags unless they're there for a reason. Making your post text bigger just because, is not a reason.

Sorry about that, I thought the text was smaller than normal and thought I had somehow changed the font size without noticing.

Edit after attempting:
OK so I've made some progress. I converted the animations and skeletons to the updated hkx format. Then converted them all into .hka. But now I'm a little stuck. I tried converting the .model into .dae with GLVL but the output was mostly ok but it had a lot of broken bones in the file.
however I have a different dae that I got from somewhere else that I'm 99% sure is ripped from this game but without the glitches.
Now the main problem I'm having is that despite running the importer script in 3DS Max 2013, I still don't see any way to import the animations. Looking inside the script, it seems like it's supposed to add a button to the import menu but nothing is changed, and afaik there is no error being thrown.
Also thanks for the links. This is the first time i actually got any help with this.

This post has been edited by lil-g-gamegenuis: 05 October 2017 - 02:14 AM

After looking around to see if the script has compatibility issues with the older version of 3DS Max, I haven't found anything that would lead me to believe that its incompatible.
On a post which has the script in the Sonic Generations modding thread, the person did say it was for 3DS Max 2011 and 2012 but I don't know if it was updated since then.

Have you tried modelfbx yet? You can convert a .model, .anm.hkx and .skl.hkx (exclude the .model if you don't want the mesh) all at the same time to one FBX file.

The _2012 version included there is not about the FBX version, but rather the Havok version it uses. That one is for Sonic Lost World.

This is what I was thinking rofl, or at least one of the tools. Sadly I forgot Dario was the one who made it / hosts the tool, rip.

This should definitely be a good way to extract the animations and, if you're smart about it / make a batch file, automate the conversion process. If you're planning on putting these animations into UE4, these *should* work directly on import as well, though no guarantees because I remember that not being the case (unreal can be finicky). Regardless, it should really just be a good way to get all the animations you want, assuming the tool still work. Dario MVP.

Thanks! That is just what I needed! I got the animations showing in blender perfectly (although I did have to change the orientation but that's no big deal).
Also I'm not using unreal (although i might try it later), I'm using unity which seems to have imported them just fine, Although i haven't tested it. It at least previews well.

Sorry for asking here but can it be used to rip models with animations from Sonic Unleashed?

Yes.

You can find HKXConverter on this post here and some background on why this is necessary. (Right after the "Havok reverse engineering" section, which I'd recommend reading)

Get the skeleton and animation files from the Xbox 360 version first. Then convert them to PC format with that tool and look on the "asset-cc" directory for their updated versions. Then just try to export those files with modelfbx.

An important note about modelfbx though: I believe animations that use scaling were never supported, mostly because I have no idea how to extract that information with the Havok SDK. This should only be a problem for a few animations and most of the werehog's.

Thanks, man. I'll try!
That works with all models, right? Like dark Gaia minions and Badniks

Just try and see. There's really no rule on whether a model is supported or not. Sonic Team kept upgrading the format version during development and made minor changes to it, while exporting their models at the same time. Whether it works or not depends on LibGens' parser.

If you find anything in particular that doesn't work, you're free to create an issue with the problematic file in the issue tracker so me/anyone can take a look at it.