Tuesday, November 12, 2013

LEGO Batman 2 DC Superheroes - 3D Vision Fix

3D Vision Fix by mike_ar69

Fixes the game to work with any convergence and separation.  The game by default not only locks convergence at much too high value, it ties it to separation adjustment.  Some of the default convergence settings in cut scenes require almost zero depth to be tolerable, and the convergence also changes dynamically quite a lot, so you can't change the settings on the fly very easily.  Unfortunately unlocking the convergence in this game completely breaks the games otherwise perfect 3D Vision rendering, requiring a full fix from scratch, which is what this is.
This fix uses a custom nvapi.dll to unlock the game (developed from Chiri's original), then helixmod to fix it.

- All the double imaging and haloing
- Shadows
- Lights
- Water

There are 2 presets, F4 and F5.  F5 is a low convergence presets for cutscenes
You can change the convergence and depth for both presets as follows:
- press the preset key
- change convergence and separation
- press F7

Main outstanding issue is the HUD - unless convergence = 1, some parts of the hud get messed up by flickering in and out of different depths.

To be done:
- Fix hud so its all at same depth
- The targeting reticule is at screen depth, if I can I might see if that can be made dynamic.
- I plan on adding dynamic convergence for the cutscenes.

** Update 12/8/13
1. New method for unlocking the convergence is used which allows presets to work properly as in other helix-modded games.

**Update 11/30/13 v2
1. Fixed a few more 'water' rendering issues as I found them, as well as a couple of special effects.
2. Partial solution to provide 2 presets:
a. When the game starts press "0" to set the convergence to "1".  This will make all hud elements render correctly and looks pretty good for gameplay as well
b. Pressing "9" will change the convergence to whatever the default setting is for the game.  For me this always seems to be stuck at "4".  If you change this to something else, and then you toggle between "0" and "9" it will be remembered each time you press "9".  I use this key to set a low convergence for cutscenes - I go into the map view and reduce convergence until the map looks good (either at screen depth or deeper into screen) and then when cut scenes come on I can press "9" again to set that lower convergence value, and then when the cutscene is over press "0" to have the higher convergence for gameplay.

1. Extract this zip file to the games exe directory.  In my case this is D:\Steam\steamapps\common\LEGO Batman 2.
2. Run the game.

Old Versions
v1:  Extract this zip file to the games exe directory
v2:  Extract this zip file to the games exe directory


  1. hey you do great work btw. Just wondering if alien vs predator from 2010 is fixable?

    1. Have you seen this link? http://3dvision-blog.com/tag/avp/

    2. Thats like a pre-helix mod suggestion for a broken game. Nothing against 3dvision-blog but it was a different time back then. There also settings for bioshock 2/Dead Space 2 but they don't really make a difference.

    3. Ah right, maybe worth looking at then if I see it cheap at some point.

    4. I own it. Pretty much everything is broken [2d shadows/lighting/crosshairs] and its a dx9/11 game *shrug*

    5. Also Im surprised you cant edit the exe cause I can.

    6. I can edit it and replace nvapi.dll, but then get an error when I try to launch the game. What is the timestamp on your exe, mine is 6/24/12 11:36pm? I get a pop up box titled "Steam Error", with message "Application load error 3:0000065432"

    7. I havent tried it recently will try again
      Look for word nvapi and it will be something like nvapi_query_interface I think. Try to modify that instead.

      I have a similiar issue with RE5 with an XLive error. I guess it might be needed for some interface as well.

    8. It "might" work if you disable steam community but I couldnt say.

    9. Thanks for the suggestions - I tried several things but to no avail. It's a shame because the dynamic convergence in Marvel and LOTR works really well...

  2. Thanks. Not sure about AvP, never looked at it. If there is a demo I might have a look. Is the game any good?

  3. Awesome work! Love to see your fixes.

    For fixing the convergence, do you actually need presets, or would convergence mapping work for you? In other words, do you prefer to manually change the converge/separation at specific times, or would you prefer to have it automatically switch to specific values from the .ini file?

    The reason I ask is because the Chiri Unlocker doesn't do multiple presets as we've found, but it does do convergence mapping where any specific convergence can be automatically reset to something you prefer. You get the convergence mapping numbers by enabling logging in the nvapi.ini file, play a bit, and see what numbers the game uses for convergence. Then you can map those into the ConvergenceMap preset in the nvapi.ini file to have it automatically substitute better values.

    (Not positive the convergence mapping still works in latest drivers, which is what I'm trying to determine now.)

    1. Thanks bo3b. I think the issue when you unlock convergence is that whatever convergence the game had built in gets ignored as well, so that built in mapping is not useful. So it has to be done manually. I guess the idea could be that using the 'out of the box' game we try the convergence mapper, but I did try this when the game first came out and it did not work - maybe the newest nvapi.dll does work, It would be good if someone could give it a go. At some point either Chiri will fix his nvapi unlocker, or Helix might add in the unlocker function in his DLL, and if so I will come back and address this (and the other lego games). For now, I am still more than happy with being able to have controllable convergence. If people don't like it, then the out of the box game is still excellent 3d and can be used with lower depth settings.

    2. OK. The reason I ask is because I'm pretty sure I'll be able to fix Chiri's Unlocker to do what you want. It's going to take me several weeks to get this all straight though.

      Now to clarify though- what you've added to the download is Chiri's 3DMigoto, NOT Chiri's Unlocker. It'll be very confusing if we start calling 3DMigoto an unlocker. I can fix the Unlocker, but don't have the source code for 3DMigoto. Also I don't understand the editing the dll for nvapi. I don't have this game, so can't take a look just yet. (Steam sale next month, right? :-)

      Not worth changing unless you are back in to fix something else, but if you use his oldest non-DInput Chiri Unlocker here: https://s3.amazonaws.com/Chiri/nvapi.zip, and my experimental DInput8.dll here: http://bo3b.net/MetroLL/dinput8.dll I think that you would get unlocking on any driver version- and can still use Helix mod to fix the problems.

    3. Ho bo3b - sorry I am let getting back to you on this. I guess you are right that I should call it "Migoto" not "unlocker". I need to use both the d3d9.dll (to set the nvidia automatic mode to true and disable the games own renderer) and nvapi.dll since that is the essential wrapper for the nvidia api. The problem might be that the Helix DLL is also making calls to nvapi.dll and it is picking up the locally installed migoto nvapi.dll and thus not working properly with keyboard inputs, because that is intercepting them before the helix dll can.

      I tried you two files (nvapi.dll and Dinput8.dll, but had no luck - they don't work with the migoto d3d9.dll, so the 'latest' nvapi.dll is necessary. Note also that I can't just use nvapi.dll - I *must* have the d3d9.dll so that I can use the nvidia automatic = true setting.

    4. OK, good to know. The Dinput8.dll and nvapi.dll I provided would be a replacement for Migoto, not an adjunct, but is definitely not a sure bet. I think there is an off chance I can use Chiri's setup to make something that will allow for Helix key overrides too. I got the game on sale, so I'll take a look. If I can get anything working, I'll let you know.

    5. bo3b - I managed to create my own version of nvapi.dll (starting from Chiri's base code) that *only* changes the nvidia automatic setting, and does not intercept convergence changes. It thus works with Helix's dll fine now. I will update all my Lego game fixes to use this so none of them will need to edit the executable, and I can have proper presets for Lego batman 2 (It's kinda bodged right now for that game).

  4. Just took a look at the game, and if you are running on a projector, this fix will be useful. If you are running on a monitor, you may not need the fix, because the convergence is already set fairly high and might look fine on the monitor. By default it already uses some good popout effects for example.

    1. Hi bo3b - my issues with the Lego games is that the convergence is *too high* for me. I have played the whole of Batman 2 but at one point gave up because it was too much, then went back later. You will see when you play the game some of the cut scenes simply can't be focused on etc. And this is also part of the problem - massive swings in convergence while playing. Anyone who loves really high convergence does not need this fix, but my eyes ain't what they used to be and too much pop out is unpleasant for me. The only way to manage the convergence is to lower depth, and I hate low depth lol. Hence my efforts on the fix. I've been able to go back and explore this game now (I did the main story but that is only 20% of what the game has in it!) and it's much more enjoyable for me, especially as Superman flying around the city :-)

    2. Hi Mike, yep, I understand. The convergence is pretty out there for projector users (you use Optoma, right?). I just wanted to bring to people's attention that if they are using a monitor, that it might work for them out of the box. If you run a monitor, you turn convergence and separation up higher than we do using projectors. This is why some screen snapshots are not viewable for projector users, or conversely if I make a great screenshot on projector that it's too little depth when viewed on monitor.

      It looks like Lego people tested it using monitors and made something that works really well there, especially since it doesn't have an NVidia rating. It might actually be too little convergence for monitor users- in which case this fix would be good as well. It's better to have it all unlocked, but this one is sufficiently good by default that it might work for some people.

    3. Depth values between monitor / projector are drastically different.
      Convergence values don't really differentiate. It just seems they monitor users are using more because when we look at high depth gameplay of a monitor user combined with a "higher" convergence setting its hard to look at.
      Tolerance of depth on display [3d vision depth %]] / whatever size display = should be same value.

      100% depth on monitor [gun appears 2D] Convergence value = 80 in whatever game
      100% depth on projector [gun appears 2D] Convergence value = 80 in whatever game

    4. Games with "depth locks" [Crysis [can be edited]/ Deus Ex]
      Projector users will get better 3D results.

      Games with "convergence locks".[RE 5/ Metro/ racing games]
      Results will be identical across displays. [Though you can tech. depth hack if your tolerance allows it]

  5. Replies
    1. I assume you are referring to this?

      "- Fix hud so its all at same depth
      - The targeting reticule is at screen depth, if I can I might see if that can be made dynamic.
      - I plan on adding dynamic convergence for the cutscenes."

      Not sure tbh. I am going to pick up all the lego games again at some point in the next month or so, they all need the above first 2 things sorting out. I have 90% fixes for Lego Harry Potter Yrs 5-7, and Lego Pirates of the Caribbean as well which are not even posted on this blog, so I'll probably do a mass update all at the same time.