don't click here

Sonic Generations Hacking (and More!)

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

  1. S0LV0

    S0LV0

    Sonic Generations Helpdesk Tech Member
    586
    1
    0
    Spagonia
    Abusing SMPS
    http://youtu.be/GzkQaLMGEaE
    early stage progress shenanigans
     
  2. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Maybe. The official statement is 'When we finish the Modern levels', but who knows how long that will be. Thankfully we have one new level modeler and a dedicated prop modeler now, so progress is already much faster than it used to be, even though I'm working on the mod far less than I used to.
     
  3. `Ilio Huhu

    `Ilio Huhu

    Member
    11
    0
    0
    Sonic Generations (Volcano Valley)
    https://www.youtube.com/watch?v=rsfDvZeHhHo&list=UUeMz-5s8Nn1M5IM6YxkhkOA

    Is it too early in development for me to be showing this to you guys? Oh, well - here's a clip anyway!
     
  4. Campbellsonic

    Campbellsonic

    Member
    19
    0
    1
    I'm currently working to import Twinkle Park into Sonic Generations, with some minor alterations to make it feel more "modern". Eventually I'll get around to making a classic version as well. All I've done so far is import the geometry of the Pleasure Castle area, and place a few objects toward the beginning of the section.

    [​IMG]

    [​IMG]

    I'm running into a major issue though. For whatever reason, no matter what I try, Sonic Generations will not accept my custom collision file. I've followed the steps here exactly, yet I continue to fall through the floor every time. I've tried importing a different collision file to test and make sure SonicGLvl was importing it properly, and it worked fine, so it's some sort of issue with the creation of the collision file.

    In case you're wondering how I'm standing on the ground if the collision won't work, I've placed a shitload of floating platforms beneath the floor so I could work on that first area. It's way too tedious though, so I've stopped working until I can get around this issue.
     
  5. StreakThunderstorm

    StreakThunderstorm

    Member
    216
    0
    0
    Mecha Madness
    Hate to ask this again but I'm really in need of the Sonic model and his animations. Would anyone savvy enough be able to dump them into something editable by maya?
     
  6. S0LV0

    S0LV0

    Sonic Generations Helpdesk Tech Member
    586
    1
    0
    Spagonia
    Abusing SMPS
    http://youtu.be/7KQXP4Nbe2I
     
  7. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    In continuation to this post and for added context:

    While I'm even busier than usual with exams and such, I decided to give the shader stuff another try and managed to fix a lot of the issues my converter had. There's still quite a few glaring issues at the moment though:

    • Inaccuracies in different shaders yet to be found or properly debugged.
    • Shaders that don't actually convert yet due to unsupported instructions.
    • No Cubemap support until I recreate the math used for it.
    • Very inefficient performance-wise as the translation from Xbox 360 GPU instructions to PC GPU instructions is expected to be. This would be a much different story if they were re-compiled from the source rather than specific optimizations for the Xbox 360. This might not be such an issue in the long run due to GPUs overpowering the game a lot anyway.

    However, despite all these issues I'm really happy with the results so far, and it seems like getting the conversion done right is possible despite how insane the task looks at first. For the sake of properly doing this from scratch, I deleted all shader-list files (the ones used by materials) and instead been porting every single shader one-by-one with the converter, making sure all the time I got the correct vertex and pixel shaders. I did this only for materials, not for post-processing effects yet. I changed the stages in several ways as well:

    • I removed all the color correction applied to the stages in the final mod (due to differences in shaders)
    • The DoF was tweaked to be an approximation to the originals (See below for more info on a recent find)
    • All the .material files and textures were reverted to their original versions, due to differences in lighting and other effects. That means no HD retextures yet, as they looked very out of place with the correct shaders. Reverting the .material files also means most of the stages now use their correct shaders, which had to be changed for the final mod since they were unsupported. (I.e. showed up as red or some other buggy effects).
    • Zoney ported back a lot of the models and materials used on the common objects to be the Unleashed ones, for the sake of testing out even more shaders.
    • Also using Zoney's Unleashed Model mod with the correct materials, which had completely different shaders assigned.

    Regarding the Depth of Field (DoF) effect, I brought up on Twitter recently that there seems to be a very odd bug with the PC version of the game, and this is not something specific to the Shaders or FxPipeline itself as far as I can tell. The DoF doesn't scale properly with the display resolution, resulting in less blurriness as the resolution is increased. For testing this I made the DoF very strong in this stage and only changed the resolution. You can see the intensity of the Blur effect is much stronger the lower the resolution is, which should not be the case when they're both displayed at native 720p. This also explains why my 8k screenshots barely had any DoF as well:

    [​IMG]

    I'm not sure if my math is right yet, but I've been getting pretty good approximations as to what the DoF values should be, and it seems to be related linearly to 720p. That is to say, if I'm playing at 1440p, simply dividing them by 2 (Increasing Blurriness) gives me something that looks much more like the original stage does. I've uploaded a Cheat Engine Table for FxPipeline that has the addresses of the DoF values, and they can even be tweaked in real-time while playing. The reason I'm posting them is because we might need a way to turn this into either an exe patch or an injection to fix this bug, and properly scale these values to whatever resolution the player might be using (720p being the one where the values actually translate properly). This would solve the problem and avoid having to do multiple versions of the same mod depending on the resolution the player is using. Add to that the fact that I wasn't copying the DoF values to the correct place in the XMLs yet, and it's no wonder I never found the ability to correct it. I realize an effect like this is more about taste than accuracy, so I will clarify this has nothing to do with the shaders and can be disabled if necessary.

    With all that said, here's some screenshots of what I have so far under the spoiler. Back to studying!

    (Discrepancies in contrast/brightness might be related to capturing or the lack of color correction. When comparing colors, remember to compare with the PS3 version as it's the one that does not have the screwed up gamma curve of the 360 version. Every single material you see rendered has been ported from the Xbox 360 version of Sonic Unleashed.)
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]


    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    [​IMG]
    [​IMG]
    [​IMG]
     
  8. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    So meaning we can go 1440p quality without it looking like its being played on an SDTV soon?
     
  9. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    My god, everything looks gorgeous. :specialed:
    So is it looking like all of the shaders will be portable, or only certain ones?
     
  10. Falk

    Falk

    Member
    1,570
    15
    18
    Man, the DoF fix is huge.

    Especially considering it concerns more than half the screen half the time.
     
  11. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,272
    17
    18
    Castlevania prettyness
    Dat last Empire City's specularity though :specialed:

    Also studying hahahaha same it sucks ;;
     
  12. Tiller

    Tiller

    Member
    836
    0
    16
    HDK & World Runner
    I normally don't like DOF but it works well to make Unleashed's artstyle seem more surreal. I wondered where it went in Generations since I've been playing at 4k. :v:
     
  13. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    What? We could always play at higher resolution just fine, the blurriness on the screenshot is exaggerated for the sake of demonstrating that the DoF's intensity is linked to the resolution that's being played at.

    As long as Cubemap shaders aren't impossible to port I'd say the majority of the materials will, but I'd be pretty doubtful that stuff like post-processing shaders will ever translate well due to depending a lot in how they're used on the rendering pipeline and what textures/parameters do they need from the program. The other notable thing that probably won't work is the Fur stuff that seems to need a custom shader parameter given to it by the game. But that's only relevant to the Werehog anyway so I don't think we want it... :v:

    Yeah, I should mention this is also a bug in the regular unmodded game as far as I can tell. Anyone who played the PC version at higher than 720p has always had significantly less DoF in the stages, vanilla or modded, than people who played at 720p. It explains very well the inconsistency of the effect I always saw in people's screenshots, and why the DoF was completely gone in my 6k-8k screenshots. I've corrected this mistake for a new set of 8k Screenshots and it's looking pretty good so far. (Had to divide the DoF values by 6)

    While I'm no big fan of DoF either, I think it's pretty beneficial on this game both due to the art style and hiding the low-detail stuff in the distance that is only ever more apparent at higher resolutions.
     
  14. Atendega

    Atendega

    Lesser Sea Sponge Member
    577
    0
    0
    Comfy couch
    Collecting insults
    So the DOF scaling bug reminded me of another (mildly related) thing: Is there a fix for the boost gauge particles? When you defeat an enemy, blue trails come out of them that are supposed to fly into the boost gauge, but at resolutions higher than 720p, they just go to where (I assume) the boost gauge coordinates WOULD be if you were playing at 720p. I tried to get a screenshot, but them particle effects gotta go fast.

    [​IMG]
     
  15. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    Gonna be uploading a few videos over the week to show the Shader conversion in motion:

    http://youtu.be/ku9QSCDiCJo

    It's not exactly the most noticeable change to see on Youtube, but hopefully it's more apparent than I thought.
     
  16. Chimera

    Chimera

    I'm not a furry. Tech Member
    1,272
    17
    18
    Castlevania prettyness
    0:56 THE FLOOR HOLY SHIT
     
  17. Does anyone have screenies of before and after? I can't watch the video on a higher bitrate for some reason x.x
     
  18. Azookara

    Azookara

    yup Member
    I knew I wasn't nuts. Unleashed is still the prettiest looking Sonic game to date thanks to how the shaders made everything look so incredible, and I could tell that something was off about the Generations Unleashed mod.

    This is so great, jesus. Thank you for this. Thank you.
     
  19. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Question, will this work with the standard game?

    This really is bringing back the beauty that was missing from Generations. Something felt off about the Unleashed mod until now. This was it.
     
  20. Dario FF

    Dario FF

    Tech Support Hotline Tech Member
    You mean with the regular renderer or the regular stages? With vertical shadows turned on they look like they have no Shadowmaps on the terrain for some reason, but with a mod that enables directional shadows they look kinda... interesting but not very fitting. Needs a lot of work gone into making it "compatible" for all the new material types they introduced in Generations and the intensity of most normal maps would need to be tweaked down to look decent (looks awful in that screenshot). This is why the Unleashed mod introduced a lot of higher intensity normal maps to make up for the fact the Generations shaders expect stronger normal texture maps but have an overall "weaker" effect on the material.