Sunday, December 31, 2017

Cuphead





3D Vision feature for Cuphead, with some extra graphics options to disable some post processing filters. This isn't a fix, because the game was just 100% flat by default. This is layered (with curves sometimes) 3D made from scratch, texture by texture.

Update (2018-04-07): updated the fix with 3Dmigoto 1.3.8, combined controller and keyboard hotkeys for convergence and HUD depth, and added two more textures for the "no flashing" mod (for run & gun levels).

Yet another update (2018-01-02): with this new update there is a new feature to disable flickering at the start of a level. Read the section below the installation steps.

Another update (2018-01-01): the last stage of Hilda Berg was missing 3D for some textures. I have updated the fix for that.

New update (2018-01-01): I have added shaders so you can disable film grain, chromatic aberration and blur in the other two color filters available. Black and white mode doesn't have chromatic aberration, so you don't need to use the chromatic aberration hotkey for that.

Update (four hours since the original post): redownload the fix again. I have included two new hotkeys to control chromatic aberration and film grain separately.


Fixed
- Geometry textures separated by custom layers that depend on separation and convergence.


Known issues
- Some elements that should be at different depths are in the same texture, so there can be some layers with wrong depth or a compromised setting, espacially the run & gun levels.
- The game can sometimes crash at boot. Just try to boot it again. This has been tested only with the GOG version.


Installation
- Download this file and extract its contents in the "Cuphead" folder, where "Cuphead.exe" is.
- The game needs to run in exclusive fullscreen mode to enable 3D. If you are going to launch the game through GOG Galaxy or Steam, make a launch command line parameter with "-window-mode exclusive" (no quotes). Do the same with a shortcut if you are booting the game standalone (for example, the GOG version without Galaxy).



- Launch the game. The first time you run it, it will ask for permission to write a setting (it's convergence) into the Nvidia game profile. Allow it.


Texture mod for no flickering at the start of levels
- This is a texture replacement mod that can't be toggled in real time. The textures come in the "ReplacementTextures" folder. To enable this mod, open "d3dx.ini", go to (currently) line 1062, and uncomment this block of text:

;[TextureOverrideFlash_1]
;Hash = f735b9a3
;ps-t0 = ResourceReplaceTexture1
;[TextureOverrideFlash_2]
;Hash = a27c9df9
;ps-t0 = ResourceReplaceTexture2
;[TextureOverrideFlash_3]
;Hash = 42cd867e
;ps-t0 = ResourceReplaceTexture3
;[TextureOverrideFlash_4]
;Hash = cacd7bdb
;ps-t0 = ResourceReplaceTexture4
;[TextureOverrideFlash_5]
;Hash = 423cf558
;ps-t0 = ResourceReplaceTexture5

So it will be:

[TextureOverrideFlash_1]
Hash = f735b9a3
ps-t0 = ResourceReplaceTexture1
[TextureOverrideFlash_2]
Hash = a27c9df9
ps-t0 = ResourceReplaceTexture2
[TextureOverrideFlash_3]
Hash = 42cd867e
ps-t0 = ResourceReplaceTexture3
[TextureOverrideFlash_4]
Hash = cacd7bdb
ps-t0 = ResourceReplaceTexture4
[TextureOverrideFlash_5]
Hash = 423cf558
ps-t0 = ResourceReplaceTexture5


Save the changes, and the next time you start the game, those textures won't flicker at the start of a level.



Hotkeys
- F1 or XB_RIGHT_THUMB: five convergence presets. Cuphead is at screen depth by default. These presets will lower convergence.
- F2 or XB_LEFT_THUMB: HUD depth presets. Screen depth by default.
- F3: HUD toggle.
- F4: film grain and chromatic aberration toggle. Not disabled by default. Warning: if you use overscan ingame, this hotkey will freeze the image. Use the separate hotkeys instead.
- F5: screen blur toggle. Not disabled by default.
- F6: aspect ratio cycle. Unmodified by default. It has also 16:9->2.37:1, 16:9->32:9 and 16:9->48:9 presets. For 21:9, it would be better to follow the pcgamingwiki steps.
- 1 (not the numpad): film grain toggle. Not disabled by default.
- 2 (not the numpad): chromatic aberration toggle. Not disabled by default.


If you liked this and want to contribute for more future fixes, you can donate to this PayPal account: masterotakusuko@gmail.com

20 comments:

  1. In the GOG.com version when I press F4 it freezes the game. Known bug?
    Btw can film grain and chromatic aberration be toggled separately?

    ReplyDelete
    Replies
    1. It's a Unity game. In my experience, they are usually unstable when booting or closing. Seems random. For example, this game closes fine for me, but Yooka-Laylee usually freezes.

      About your other question, now that you said it, I think it's possible. I have modified (in my PC) the shader and I could disable film grain without disabling chromatic aberration. I'll try to make them separated with different hotkeys. In the meantime, pcgamingwiki mentions how to disable each of them permanently: https://pcgamingwiki.com/wiki/Cuphead#Chromatic_aberration

      Delete
    2. Done. Redownload the fix. It now has two separate hotkeys. The F4 hotkey disables some extra blurring when you pause the game, at the cost of not being able to use the overscan setting (it freezes the image when that hotkey is in use). The new hotkeys are safe because they don't disable that.

      Delete
    3. That's awesome, thanks for the update!

      Delete
    4. I've noticed the film grain and chromatic aberration toggles do not seem effective for the 2-Strip and Black & White filters in the game: https://imgur.com/a/I38Gt. Could you take a look at this?

      Delete
    5. Oh... I didn't unlock them yet ingame. Then they must be different shaders. It's a bit of cheating, but I'll unlock them then and see if I can do the toggle for them too.

      Delete
    6. There you go, new update. It was a bit of cheating, unlocking these modes early. But it was for a worthy reason :).

      Delete
    7. Excellent! Thanks so much and have a happy new year. :)

      Delete
  2. You're a true 3d shaderhacker master but this is pure genius, thank you so much for this!

    ReplyDelete
  3. Pretty awesome job Master. Always outdoing yourself!

    ReplyDelete
  4. Hi. Thank you so much for this.
    Can you do anything about the flashing text that displays at the start of levels?

    ReplyDelete
    Replies
    1. Your wish is my command :p. Download the fix again and follow the "Texture mod for no flickering at the start of levels" steps. There is currently a mod that replaces original game files. But mine doesn't. It uses external textures, and can be enabled or disabled easily.

      Delete
    2. Thank you, so very much. I'm quite sensitive to blinking/flashing, so this entire mod and now this recent addition will enable me to play the game. :)

      Delete
  5. This looks surprisingly great in 3D. Super cool approach too. Thanks man!

    ReplyDelete
  6. Huge thanks for all your hard work !
    So many great fixes thanks to you

    ReplyDelete
  7. May Helix for 3DVision never die... Without you, what could we do ? where would be 3DVision ? a dead tech for years.

    ReplyDelete
  8. Hey there! Attempting to get this to work, but no 3D effects appear when I boot the game up. Am I doing something wrong? (I'm just trying to get SBS to work, so I don't have any prior 3D Vision stuff on my PC.)

    ReplyDelete
    Replies
    1. Just noticed something. The F4 shortcut is working. So the mod is there, but pressing F11 doesn't change anything. I'm using some instructions you gave me on Reddit in the past.

      "About SBS, yes. Open the "d3dx.ini" file that is included in the fix, search the line ";run = CustomShader3DVision2SBS" and uncomment it, removing the ";" character. After that, run the game and press F11 to cycle through different 3D modes. Check after the "[KeyChange3DVision2SBSOutputMode]" line to see what modes are there. I've just tested that and all modes are working fine with my PC."

      Delete
    2. Finally fixed it. Didn't enable Stereoscopic 3D in the NVIDIA Control Panel. Since I don't have a 3D monitor, I'm forced to use the Discover mode, which means it has a horrible red tint. If there is a fix, I'd appreciate it if someone told me, but I doubt there is one.

      Delete
    3. If you are going with SBS, your best bet would be to use the NVidia 3D TV Play software. It's not free, but has a 14 day trial. That would fix the red tint from the SBS shader.

      Delete