don't click here

Sonic Generations Hacking (and More!)

Discussion in 'Engineering & Reverse Engineering' started by Andrew75, Jun 23, 2011.

  1. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,272
    17
    18
    Castlevania prettyness
    Teaser.

    [​IMG]

    I'm such a douche :specialed:
     
  2. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    I like this.

    I like this a lot.
     
  3. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    I dig it too. :v: I should've sent him the version with corrected textures though. (And 5:4 aspect ratio sucks balls for this game)

    Our problems with most of these stages though is that we don't know what kind of object the game uses for water. It's definitely Havok-related, but no idea how to create a plane with water characteristics.

    As for chu-nan, the first part works fine until the spinning platforms. We don't know how feasible it is to add a custom object WITH animations and collisions as well. There's hope though. (I also wonder what about the rockets... perhaps the speed highway rocket?)
     
  4. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Could you perhaps use the Sky Sanctuary spinning platforms? They seem to be virtually the same.
     
  5. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,272
    17
    18
    Castlevania prettyness
    Actually, Guess Who proposed useing the Sky Sanctuary rotating platforms. That's not really a bad idea tbh.

    And yeah Dario y u no do this :S

    One more thing though: apparently there's an event in Sonic Unleashed that, if collided with in Generations, will break the game in that almost ALL objects sans enemies will be unable to touch Sonic. Until you turn off the game. Need to fix that.

    Oh yeah Dario, get on MSN. I need to talk to you :V

    EDIT: Ninja Sonic.
     
  6. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Wow, I honestly forgot about the Sky Sanctuary platforms. :V I guess replacing the collision in them will do the trick just fine.
     
  7. Lobotomy

    Lobotomy

    35% Cognac Banned
    4,394
    1
    0
    Traverse City
    Project: Matter/Energy
    May wanna get rid of the sparks and flames shooting out of the board. Maybe replace with a mist texture to satisfy all uses of the board?
     
  8. Rainbow Dash

    Rainbow Dash

    20
    0
    0
    New Lenox, IL
    Generations Level (Experimenting)
    http://www.youtube.com/watch?v=QkpJksTZdus
     
  9. Guess Who

    Guess Who

    It's a miracle! Oldbie
    4,296
    63
    28
    Oregon
    lol
    I hope you're all reading the video descriptions on these by the way, I'm putting more effort in those than the actual modding.

    http://www.youtube.com/watch?v=kqiJW9g3kYA
     
  10. Twilightzoney

    Twilightzoney

    Tech Member
    353
    0
    16
    Elgin, IL And Hampshire
    Unleashed and Generations Stuff and Custom Works
    That be your own opinion, unless I'm reading it wrong what your saying. About the effort, at least.

    But nice job!, it sounds great. I usually don't like music stuff like that. But I can dig it.
     
  11. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Time for some fun facts.

    As pointed out by Dark Sonic, the Sky Sanctuary platforms are virtually the same as the china ones. Not only is that right, they're actually the god damn same object. When we tried to import the .model of the China ones into that one, the collision had pretty much the same radius and floor height.

    Anyway, as we all know, we can't just reskin them since there are not any half or one quarter platforms.

    BUT

    It's actually possible to replace the collision files. As long as you export with the same name internally for the rigid body as the .hkx of the object you're trying to replace, and it should be only ONE mesh, it will work. Also, the transformation Matrix I posted above? It shouldn't be applied at all if you're basing the meshes from Darkspines' model importer script.

    Here's a video of the imported rotating floors with the right collision. Note that I haven't set the other types rights of the floors yet... but at least we figured out how to import our own custom collision for the in-game objects as well! (Also, the pillars in the center are a separate object that will be exported later as well with the correct collision and model from Unleashed).


    Also notice how the terrain indeed casts shadows(and very detailed ones) into those platforms, as well as Sonic does. This confirms that:
    A) The materials are indeed compatible and can receive shadows.
    B) Unleashed models are compatible with Generations.
     
  12. Lobotomy

    Lobotomy

    35% Cognac Banned
    4,394
    1
    0
    Traverse City
    Project: Matter/Energy
    Cool, does this mean humans can be placed in the levels like they were in Unleashed?


    Also I think the waterfall's texture is rotated 90 degrees.
     
  13. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    That would need remaking the animations in Havok format. So meh, I doubt anyone cares about those humans. :v: (Edit: Cares to do the effort of rigging and animating them)

    The texture is actually correct, but the .uv-anim files need to be binary swapped I think. From generations to Unleashed, the UVs swapped. For textures, it can be just fixed by rotating them. But some files are animated just moving the UV, so they gotta be flipped as well.
     
  14. Falk

    Falk

    Member
    1,570
    15
    18
    Wilder shot in the dark, but would messing around with the spinnies be the first step in replacing the static windmills in Apotos with spinning ones? (Obviously they don't need collision and all that, but yeah)
     
  15. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,272
    17
    18
    Castlevania prettyness
    The windmills, if I'm correct, are models that have an animation applied to them. Sonic never runs on the windmills (though that'd be cool), so I don't think any object physics rotation is necessary. Really, you can just, in Max, rotate the thing 360 degrees at the last keyframe and export the animation and call it a day :specialed:
     
  16. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    I figured out how to fix the global illumination. We still don't have shadows, but heck, this is quite a big step towards the visual quality.

    First off, we'll be using the higher quality GIA lighting provided in the DLC Packs for Unleashed. Brother Zoney has been uploading them, and I've been trying to figure out how to make them right.

    It's widely known by now that between the 360 version and the PC version, all UVs for terrain-related stuff are flipped. So even if we do flip the textures for the terrain, the lighting still needs to be fixed. But you just can't flip around the GIA lighting textures and make it work... Most of these textures hold nearly 10 to 100 sub-textures for saving up space, and if you just rotated them, it would look glitchy as hell because the coordinates would be wrong.

    But, you see, inside each of these gia.ar files, there's a little binary file called atlasinfo, with an easy to guess binary structure. Heck, I already reverse-engineered it fully:
    Code (Text):
    1.  
    2. struct atlasinfo_header {
    3.     char padding=0;
    4.     unsigned int8 textures_ammount; // How many DDS files it needs to load
    5.     char add_padding=0;
    6. };
    7.  
    8. // Read this for textures_ammount times after reading sub_texture_info
    9. struct texture_header {
    10.     unsigned int8 texture_name_size; // How many chars the texture name has
    11.     char texture_name[texture_name_size]; // DDS texture name (without the .dds extension), non-null terminated
    12.     unsigned int8 sub_texture_size; // How many subtextures are in this file
    13.     char padding=0;
    14. };
    15.  
    16. // Read the next structure structure for sub_texture_size times
    17.  
    18. struct sub_texture_info {
    19.     unsigned int8 subtexture_name_size; // How many chars the subtexture name has
    20.     char subtexture_name[subtexture_name_size]; // non-null terminated string, internal name of the texture this gia data belongs to in the terrain(or perhaps the object)
    21.  
    22.     // Multipliers for the UV coords
    23.     unsigned int8 u_mult;
    24.     unsigned int8 v_mult;
    25.  
    26.    // Absolute value of the UV coordinate this texture is
    27.   // Should be multiplied by u_mult, and v_mult
    28.     unsigned int8 u_scale;
    29.     unsigned int8 v_scale;
    30. };
    31.  
    32.  
    Followed this structure, flipped the UVs of each texture with Photoshop, swapped the uv multipliers and scales inside each atlasinfo thanks to a handy tool, and this is the result. Correct global illumination:

    Now notice there's still a few textures we missed because we didn't copy them sadly, and the GIA loading data range hasn't been tweaked yet in that video because the DLC GIA data is MUCH heavier than the normal one. This should be all fixable by editting a few xmls though.

    Now all we got left to do is figure out how to enable shadowing of the terrain(notice Sonic nor objects cast Shadows on the terrain, even if the shadows are there shown by the previous evidence). As for the darker coloring, the reason might be that the GIA textures might be lower bit-depth than the PC version, so a higher-bit depth will give it this more saturated look. Once I figure out the right settings, it should work.

    I should be able to record a run of Windmill Isle Act 2 with the correct global illumination once the Archive editor is updated for admitting a text file as a command line.
     
  17. Twilightzoney

    Twilightzoney

    Tech Member
    353
    0
    16
    Elgin, IL And Hampshire
    Unleashed and Generations Stuff and Custom Works
    So much swag! Awesome looking, but didn't make me go WOAHASDF, like you thought I would, unless that is by having to be with the xml stuff. Otherwise, "Yay no more gunky junk."Also at least Sonic doesn't look out of place now.
     
  18. Now that's just getting awesome!
     
  19. Azu

    Azu

    I must be stupid. Member
    Can we have a download please. =3
     
  20. Elratauru

    Elratauru

    Little Shiny Emurralds Member
    While the improvements are great, I feel that the stage is lacking a lot of lighting and ilumination. I know that shadows are missing, but why does this video looks a lot brighter?
    Edit; I can't read it seems. Yeah I get it now :v:



    Anyways, epic stuff. I love how even the camera works almost like it should. Looking forward to see more levels with GI fixed! :3 Keep the nice job!