don't click here

Dreamcast mods for SADX

Discussion in 'Engineering & Reverse Engineering' started by TheArcadeStriker, Jul 30, 2016.

  1. The spoiler tags aren't working for me D:
     
  2. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Update 4 release on ModDB. Highlights of this version:

    • Mod updates: today's Mod Loader update enables mod update functionality. As for the DC mods, many things have changed since Update 3, and several new mods were added. This version introduces support for modular updates. This means you don't need the MEGA mirror anymore, as the updates will be pushed to you automatically through the Mod Loader, and only the changed files will be downloaded! This was made possible thanks to ReimuHakurei, who offered to host my mods on his server. You need to download the full Update 4 package and update the Mod Loader first to be able to use the new update system.
    • Dreamcast Chao Gardens, including the VMU transporter model for the Name Machine and the Chao Race track - check out the restored flowers and cheering Omochao! The secret egg found on the Egg Carrier now hatches a two-tone gray Chao like on the Dreamcast. Two-tone black and gray eggs have also been updated with SA1 textures.
    • A "Dreamcast General" mod that introduces several non-level specific fixes and replaces all non-level textures with higher quality Dreamcast textures (thanks Onso!). So now the entire game is using SA1 textures!
    • A new 16:9 title screen for the DC Branding mod that activates automatically based on your screen resolution/window size.
    • Dreamcast water textures in Emerald Coast! You can switch back to water textures used previously in this mod by enabling SADX Style Water.
    • An updated Sound Overhaul 2 (Dreamcast sound effects) mod is included in the main mod package.
    • A new "SET layout fixes" mod by Supercoolsonic with level layout fixes and improvements for various stages.
    • A totally insane amount of bug fixes and accuracy improvements, including material color fixes, object model restorations, cutscene models and lots of other things for many areas in the game.
    • A higher quality intro movie from the X360 version that retains the SA1 logo.
    • The HD GUI mod now includes upscaled level objectives and level title cards.
    • All PNG textures have been optimized with oxipng to reduce file size with no quality loss.
     
  3. Speeps

    Speeps

    Member
    125
    48
    28
    Quick note: The Chaclon Chao in the Dreamcast SA1 isn't exactly a Two-tone grey Chao. It looks similar, but if you port it to SA2 and breed or reincarnate it you get this, which is the same Chao used for the cockroach chao race. I don't remember much because I haven't messed with SA1's Chao in a while, but I'm fairly sure it's just a black Chao except by SA1's standards (I got the same thing in the Autodemo once by changing a Chao's color values to 0).

    Good up the good work though, this is great :)
     
  4. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    According to this page, the Chao that hatches from the secret egg in SA1 is a two-tone gray Chao, and it has no relation with the Chaclon Chao you see in the races. The screenshot on that page looks kinda different from the SADX two-tone gray Chao though, so maybe the information on that page is inaccurate, or SADX colors them differently.
     
  5. Fred

    Fred

    Taking a break Oldbie
    1,563
    117
    43
    Portugal
    Sonic 3 Unlocked
    May be worth pointing out that Chaclon or Chacron are just bad localizations -- 'kuro' is black in Japanese so ????? chakuron is just wordplay on "black chao".

    A better name would've been Chacoal or something.
     
  6. Speeps

    Speeps

    Member
    125
    48
    28
    I've looked at the Chao from the races and the Chao from the garden before and can confirm that they're the same type of Chao (Here's a comparison) . In fact, a while back I copied his data into one of the garden slots and put him in a VMS file, which you can get here if you want it.
    There isn't a Chao in SADX that matches it exactly, so the twotone grey in SADX is probably the closest to what the Chao looked like anyway.

    As for his name it's pretty funny because I've seen at least 3 names used for him - SA1 calls him Chaclon, SA2 calls him Chacron, SA1's website calls him Chakuron and I think something to do with SA2 calls him Chakron.
     
  7. Hmm. How interesting. It seems that Chacron and the Chao from the Dreamcast version's Black Egg are the same after all. The picture of the Black Chao on the website made it seem as if the one from the egg was lighter-colored as well. I wonder why Chao Island states they were different colors.

    Jmtshaw's pictures are of a much better quality than the ones on the website, so I believe it. After looking at them, I immediately proceeded to take pictures of the Two-Tone Black and Two-Tone Grey Chao to compare them with his. It appears that what I said was wrong. the Two-Tone Black Chao looks more similar to Chacron and the Chao from the Black Egg than the Two-Tone Grey Chao does. Here is the picture of the Two-Tone Black Chao and here is the picture of the Two-Tone Grey Chao. I'll report the error on the website and I apologize for my unintentional misinformation.

    Jmtshaw, would you mind if we used these pictures in the website instead?

    Edit: I now wonder whether in the Dreamcast version of SA2, Chacron and the Black Chao that you could get from the online black market are both Two-Tone Grey Chao. After looking at the image of the Black Chao used in the online Black Market more closely, it seems to resembles a Two-Tone Grey Chao more than it resembles a Two-Tone Black Chao.
     
  8. Speeps

    Speeps

    Member
    125
    48
    28
    I think that's what I took those for back then in the first place anyway, so go right ahead :)

    I think part of the confusion (aside from Chacron being gray in SA2) is due to the fact that they used a monotone Black Egg for the Egg Carrier in SADX instead of a twotone one.
     
  9. Thanks! I also looked at the picture of the Chao that was used for the cockroach race and it looks like a Two-Tone Black Chao as well, so both are certainly the same.
     
  10. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    It's easy to change the secret egg to hatch a black two-tone Chao instead, but I'm currently having trouble getting the appearance to look right in my copy of SADX PC, even without mods. How do you get them to look like that? I used Fusion's Chao Editor to set different color values, and this is what it looks like on my copy:
    Two-tone black: [​IMG]
    Two-tone gray: [​IMG]
     
  11. For the Child Chao, move the magnitude slider to a value that's very close to 1 to get the right appearance. The major portions of the textures of neutral-aligned Child Chao become whiter as they age, which makes the actual base colors become more prominent. I used a Neutral Normal Chao because it closely matches the appearance of an older Chlid Chao, but there are noticeable differences between the two like the color of the emotion ball.

    The Child Chao in SA1 seem to look different, having an appearance that resembles older Child Chao in SA2 and the ports of both games. It's merely a difference in how SA1's Chao system works compared to the ports, so things like the magnitude shouldn't be altered by the mod. It will cause the Chao to evolve earlier than it should.
     
  12. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Ah alright, thanks for letting me know! I'm new to all this Chao stuff.
    I'll push an update soon that will change it to a black two-tone Chao, also I have restored the effect that shows up when using the garden transporters, and I want to improve their collision (they're using SADX collision, which is flatter).

    There's an interesting thing about the Chao I haven't been able to restore yet, there's a SET object called ZONE that is responsible for the Chao stopping and picking up toys during the Chao Race in SA1 (the SET objects aren't loaded at all in unmodded SADX). The object itself can be restored, but the game crashes when the Chao are about to pick up the toys, which I assume happens because of a missing animation or something.
    I found out that some of those Chao actions (digging with the shovel, playing the trumpet) are related to behaviors the Chao can learn from animals, which were also replaced in SADX. Most of those seem similar to SA2B behaviors, and looking at how many unused behaviors there are in SA2 PC (restored by the "Chao World Extended" mod) I'm just wondering if those are in SADX as well. If they are, it would be a matter of finding them and reassigning the values for the ZONE object to make the Chao play the correct animation.
     
  13. Hmm, Chao could do that in the SA1 Chao Races? That would be the first that I heard of it. I won't be able to be of much help with that, unfortunately.
     
  14. IndyTheGreat

    IndyTheGreat

    Member
    54
    0
    6
    Fixed Water (SADX PC)
    FYI, there seems to be 2 sets of daytime, evening and nighttime textures for the sky in the Mystic Ruins chao garden. One of them includes a jungle background and the other does not. The daytime one uses the correct jungle-less background but evening and nighttime do not despite the correct textures being there on the disc. I know it's inaccurate to the Dreamcast version to do this, but I messed with the textures so that the skies in the evening and nighttime match up better with the day. For some reason swapping the file names causes glitches, so I had to use Photoshop to swap the contents of the actual texture files (select all, copy fixed one, paste onto original in Photoshop)

    I honestly think the mod should come like this by default.


    Original:

    [​IMG]

    Fixed:

    [​IMG]

    There you go. Accurate to what the Dreamcast version was SUPPOSED to look like if the devs didn't originally mess up filenames or pointers. For those of you who don't believe me and think this is just a crappy Photoshop job of selecting the sky portion of the original texture above the jungle and stretching it, take a look in the GARDEN02 folder in the texture directory of the DC_ChaoGardens mod and take a look at what I'm talking about.
     
  15. Speeps

    Speeps

    Member
    125
    48
    28
    I had a look regarding the sky in the MR Chao Garden and it apparently uses a different skybox entirely for the day version:

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    The skybox used for the evening and night versions gets cut off by the water about halfway down. The day version is also further away from the player, which results in you being able to see the boundary of the water in certain spots.

    Yeah, the items that the Chao can pick up in the races are all toys that they use in the garden:

    [​IMG][​IMG]

    I don't know how similar the SA1 Chao are to the SA2 ones, but there's bound to be something similar in there.
     
  16. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Some of you may have seen the restored ocean wave effect in Emerald Coast Act 1, and for those who might be interested I just wanted to share a few technical details on how it was accomplished.

    First, the water in several stages is set up differently in SADX vs SA1. In SA1, all levels use ordinary models for water objects, in most cases they're just parts of the level model, sometimes with additional position adjustments done in code. In SADX, many levels (Twinkle Park, Hot Shelter, Casino etc.) still have the SA1 water, but in some other levels (all Adventure Fields, Emerald Coast, Chao Gardens) there are no actual models for the water/ocean. Instead, there is a function that draws a number of squares (usually twice, since the SADX water has 2 layers - water texture and transparent waves) to fill the area with water. The way the UVs/tiling is set up for those squares I haven't been able to figure out, but at the very least I managed to alter its awful blending mode to be able to use "normal" water textures that would look the way they are supposed to look. However, at some point I noticed the UVs were still kinda inaccurate, so I decided to try and recreate the way Emerald Coast water is set up in SA1.

    In STG01.BIN I found two models that looked like they were ocean-related. One of them was a simple square, and another was the high-poly ocean model. At some point I tried looking for the high-poly model in SADX, and it turned out it was in the EXE, and even identified previously in the disassembly. But I knew something was wrong because the ocean drawing function doesn't touch any models - it only draws simple squares. So I looked up the model and found its main function, which had a lot of interesting code involving sine and vertex shifting, obviously used by the wave effect. But that model's display function... doesn't render the model at all because it was replaced with a function that draws the SADX ocean. So my guess about all the stuff being still there but disabled turned out to be correct. I didn't expect much at first, but out of curiosity I wrote a simple function to render the high-poly ocean model and swapped the ocean drawing function with it. The entire level's ocean was replaced by a small square of water that moved with the camera. But the biggest surprise came when I reached the whale chase - the wave effect was working! So from that point the wave effect itself was functional, but 2 other problems still remained:

    1) The rest of the ocean still needed to be recreated.
    At first I didn't understand how the "big" ocean worked in SA1, but at some point I noticed that the low-poly model is simply offset to make room for the wave effect (which is why you see no ocean behind you if you look around fast enough), and when the effect finishes it just deletes the high-poly model and moves the low-poly one back in its place. In addition, I found out that swapping the high-poly model with the low-poly one in my function made the low-poly one fit the level pretty much perfectly. So I rewrote the function to always render the low-poly model, and, when the effect starts, offset its position and render the high-poly model in its place. That made it look very much SA1-like, and I think this is how the original game does it.

    2) UV shenanigans.
    The code to adjust the models' position depending on the camera was still functional in SADX, but it didn't adjust the model's position constantly. Instead, it only shifted the model's X or Z position after the camera had moved a little bit. That was a problem because the "jump" was choppy and very noticeable. I believe you can even see it in SA1, it's just harder to notice because of a lower framerate and the water's fast and choppy animation. So I looked at the function to see what it does, and adjusted some of its variables to make it offset the model by a different number of units so that the UVs would look like the model hasn't moved at all. That worked, but the high-poly and the low-poly models required different variables, and even with that taken into account they would sometimes go out of sync. In addition, even though the textures looked fine, the "jump" itself was still noticeable during the whale chase because the position shift was bigger.
    So I came up with an idea: rather than altering the way the offset is calculated, I decided to shift the models' UVs "backwards" to compensate the position change. After some trial and error (and consultation with Morph) I set up some code to make the textures look like the models aren't being moved, and that was pretty much it.

    Some people have asked me about potential enhancements:
    1) The seams between the ocean models are impossible to fix without recreating the high-poly ocean model and rewriting the vertex shifting function, which I'm not going to do.
    2) It's possible to add water around the high-poly model to make it look like the ocean around it doesn't disappear, but that would require recreating the low-poly model with a hole cut in it to accommodate the high-poly model, and that still wouldn't fix the seams. This is the most realistic enhancement though, and if someone helps me fix that model, you may see it eventually.
    EDIT: Instead of (2) I implemented a better fix that uses duplicates of the high-poly ocean model for the rest of the ocean. Works well it seems.

    So I'd say I consider the wave effect finished in its current form, and this is probably as far as I'd go with the purpose of this mod taken into consideration.

    Anyway I'm glad I've been able to crack this, as it brings SADX even closer to the original Dreamcast game. There's only a handful of things of similar difficulty preventing me from being able to call it a full restoration - mainly some effects in the Perfect Chaos level, a few (sadly unfixable) transparency errors, some sounds and Chao stuff. Well, and SA1 character models and a few things in the lighting mod, which aren't my projects but I know work on them is well underway.

    While I did most of the work on the wave effect myself, this restoration probably wouldn't have happened so soon without the extremely valuable help and advice from Morph (SonicFreak94), MainMemory and ItsEasyActually. ItsEasyActually in particular did some valuable research on the stuff in STG01.BIN associated with the high-poly model, which helped me find the correct low-poly model.
     
  17. BlazeHedgehog

    BlazeHedgehog

    A "Community Enigma"? Oldbie
    1,467
    11
    18
    The wave effect being cut off like that is present in the Dreamcast version, so if anything it's just being accurate

    That being said, the waves generated look a little stronger than they were in the Dreamcast version. I don't remember the water splashing up to cover the boardwalk, but I don't suppose you could adjust the sine intensity.

    Edit: Or I'm crazy. Seeing it in game now, the wave effect looks fine.
     
  18. PkR

    PkR

    Member
    191
    24
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    That's for another mildly interesting reason. There's some difference in the way collision walls work in SA1 vs SADX, and this is one of the (very few) places affected by it. Normally Sonic would run a lot faster after hitting the dash panels, but one of the collision walls slows him down in SADX, even though the wall itself has the same position and parameters in SA1. So the part with the water covering the boardwalk you see in my video is supposed to be farther in the background in SA1 because Sonic runs faster there. The collision difference was discovered by a person on my issue tracker (it was originally assumed that the dash panels were different, which wasn't actually the case), and a fixed SET file will be included in the "SET Fixes" mod soon.
     
  19. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    I don't understand what would make you think that. Everything is adjustable, it's simply a matter of understanding the code behind the effect, and the amount of effort required to alter it.
     
  20. BlazeHedgehog

    BlazeHedgehog

    A "Community Enigma"? Oldbie
    1,467
    11
    18
    I guess that's true -- I'm thinking of it in the context of modding Sonic Generations, but I guess SADX mods are a little more flexible than that?