Sonic and Sega Retro Message Board: Need help ripping Sonic Generations Animations into blender - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

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

#1 User is offline lil-g-gamegenuis 

Posted 04 October 2017 - 05:25 AM

  • GO! GO! GO! GO! GO! GO!
  • Posts: 18
  • Joined: 03-April 12
  • Gender:Male
  • Location:olathe, ks
  • Project:Practicing to make better SMPS
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.
This post has been edited by Overlord: 04 October 2017 - 04:02 PM

#2 User is offline Chimera 

Posted 04 October 2017 - 05:57 AM

  • I'm not a furry.
  • Posts: 1228
  • Joined: 04-October 10
  • Gender:Male
  • Project:TOO MANY. BUT ONE LESS.
  • Wiki edits:5
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.


TLDR:

Exract models with this,
Convert animations with this.
This post has been edited by Chimera: 04 October 2017 - 06:54 AM

#3 User is offline Aerosol 

Posted 04 October 2017 - 03:45 PM

  • FML and FU2
  • Posts: 9758
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
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.

#4 User is offline Overlord 

Posted 04 October 2017 - 04:02 PM

  • Substitute Meerkovo IT Chief
  • Posts: 16577
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Sidenote - stop using font tags unless they're there for a reason. Making your post text bigger just because, is not a reason.

#5 User is offline lil-g-gamegenuis 

Posted 04 October 2017 - 07:01 PM

  • GO! GO! GO! GO! GO! GO!
  • Posts: 18
  • Joined: 03-April 12
  • Gender:Male
  • Location:olathe, ks
  • Project:Practicing to make better SMPS

View PostAerosol, on 04 October 2017 - 03:45 PM, said:

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.

View PostOverlord, 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

#6 User is offline lil-g-gamegenuis 

Posted 06 October 2017 - 02:18 AM

  • GO! GO! GO! GO! GO! GO!
  • Posts: 18
  • Joined: 03-April 12
  • Gender:Male
  • Location:olathe, ks
  • Project:Practicing to make better SMPS
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.

#7 User is offline Dario FF 

Posted 06 October 2017 - 10:24 AM

  • Tech Support Hotline
  • Posts: 1050
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl
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 post has been edited by Dario FF: 06 October 2017 - 10:25 AM

#8 User is offline Chimera 

Posted 06 October 2017 - 02:12 PM

  • I'm not a furry.
  • Posts: 1228
  • Joined: 04-October 10
  • Gender:Male
  • Project:TOO MANY. BUT ONE LESS.
  • Wiki edits:5

View PostDario FF, on 06 October 2017 - 10:24 AM, said:

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.


:specialed: :specialed: :specialed: :specialed: :specialed:

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.

#9 User is offline lil-g-gamegenuis 

Posted 07 October 2017 - 03:42 AM

  • GO! GO! GO! GO! GO! GO!
  • Posts: 18
  • Joined: 03-April 12
  • Gender:Male
  • Location:olathe, ks
  • Project:Practicing to make better SMPS
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.

#10 User is offline Felik 

Posted 07 October 2017 - 04:39 PM

  • Posts: 1598
  • Joined: 11-April 10
  • Gender:Male
  • Wiki edits:1
Sorry for asking here but can it be used to rip models with animations from Sonic Unleashed?

#11 User is offline Dario FF 

Posted 08 October 2017 - 03:46 PM

  • Tech Support Hotline
  • Posts: 1050
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl

View PostFelik, on 07 October 2017 - 04:39 PM, said:

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.
This post has been edited by Dario FF: 08 October 2017 - 03:47 PM

#12 User is offline Felik 

Posted 08 October 2017 - 11:57 PM

  • Posts: 1598
  • Joined: 11-April 10
  • Gender:Male
  • Wiki edits:1
Thanks, man. I'll try!
That works with all models, right? Like dark Gaia minions and Badniks
This post has been edited by Felik: 08 October 2017 - 11:57 PM

#13 User is offline Dario FF 

Posted 09 October 2017 - 10:45 AM

  • Tech Support Hotline
  • Posts: 1050
  • Joined: 03-April 10
  • Gender:Male
  • Location:Mar Del Plata
  • Project:SonicGLvl

View PostFelik, on 08 October 2017 - 11:57 PM, said:

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.
This post has been edited by Dario FF: 09 October 2017 - 10:46 AM

#14 User is offline Felik 

Posted 09 October 2017 - 11:18 AM

  • Posts: 1598
  • Joined: 11-April 10
  • Gender:Male
  • Wiki edits:1
I see. Thanks, I'll look into that!

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users