Tuesday, October 15, 2013

Divinity Dragon Commander: 3D Vision Fix

3D Vision Fix by mike_ar69

** Update 10/15/2013: Updated the installer.

Fixed
- 2D Shadows
- Lights (specular and diffuse)
- Skybox and sunlight
- 2D Fog
- Water reflections

Adds:
- Dynamic cross-hair
- Presets:
-- "L" toggles between two convergence settings (2 and 140) useful for the ship scenes, flying around etc
-- "J" toggles to a high convergence setting for real time battle overhead view
-- "K" toggles dynamic crosshair on and off

Notes:
- Cross-hair: this is dynamic but also a bit 'empirical' since the depth map I used was not a 'scene depth map' and did not change depth when moving about over the maps. It works well for the two "L" key convergence presets, but not for the high convergence "J" preset. I could fix this but in this particular view the reticule is just not that useful.

- HUD: I made no changes to the HUD specifically, since I was unable to separate textures from the crosshair, hence I provide the ability to toggle the crosshair off "K". I do also use a bounding box around the cross hair so any anomalies are minimal.

Known Issues:
- I noticed late in the day that the Skirmish map "Golem Caves" has some lighting issue - as you fly towards the robot statue things they suddenly become a uniform yellow kind of colour.  This may also happen in other levels, but I did not see it.  I know where to look to solve this and will do so in time.  Please put a comment in the blog if you see anything else.

Acknowledgements
Thanks to eqzitara for (a) identifying the original installation issue (b) spending significant time subsequently to help me test the installation solution.
Thanks to PirateguyBrush for feedback on the installation, leading to the updated installer.
 
Summary
Real Time Strategy meets Dragons.  I've not yet played it that much, but it does look nice and runs relatively well, though on Ultra settings it gives my 2x GTX 570 SLI a beating down to about 40 FPS.  I did notice that the SLI did not work in 2D mode, though both cards were definitely working in 3D mode.  When I manualy added the game to the Control Panel 3D Settings tab to make some adjustments to AA and AF I noticed an improved performance in game.

Screenshots

BEFORE
AFTER


Installation
Installation of this fix is a bit more involved than normal, since the game generates shaders with different crc's depending on where the game is installed.  So I provide an "installer" to build the correct shaders and DX9Settings file on the fly.  I have tested this and it has worked on several test installations, but the script is pretty basic with no error handling (at this point) - please ping me if you have problems.

I provide three batch scripts to make this relatively easy.  The installation is in two steps:
1. Run the game once in debug mode to generate your version of the games shader dump.
2. Run main install script to generate your fixed shaders.  When you start the game next it will be in release mode and should be fixed.

Steps:

1. Extract this zip file to the games exe directory.  In my case this is D:\Steam\steamapps\common\Divinity Dragon Commader\Shipping.
2. This will install into a subdirectory called HelixModInstall.

3. In the directory HelixModInstall open up the following 3 files in notepad or whatever you use:
- CopyDebugFiles.bat
- RemoveDebugFiles.bat
- DDC_3DFix.ini
4. You will see that these all reference files and directories in a Steam directory that has been installed on drive D:\Steam\SteamApps...etc.
5. EDIT AND CHANGE all these links to point to wherever your installation is.  Then SAVE all three.
6. If your installation is the same as this default, then leave them as is.

7. Go back into the HelixModInstall subdirectory and double click the batch file "CopyDebugFiles.bat"
8. This will copy a debug dll and a basic DX9Settings.ini file to the games exe directory.
9. Start the game.  You should see red text at the top (that's the debugger dll).  Select Single Player -> Skirmish, and pick the first map in the list.  Start the map.  Have a look at how bad things are: sky, fog, shadows, water reflections, 2D cross hair.
10. Quit out of the game.  Check that a subdirectory called "dumps" has been created.
11. Go back into the HelixModInstall subdirectory and double click the "Remove DebugFiles.bat" batch file, to remove the temporary debug files.

12. Now the main fix: double click the file "ShaderReplaceV2.vbs".  Wait about 10s until a file called "DDC_3DFix_LOG.txt" appears and a dialog box pops up.  This file will summarise the shaders that were updated by showing the mapping from my CRCs to your CRCs.
13. If there were no errors, you should be able to start the game.

If you have errors, post a note in the blog comments below, I have watch on this game and will pick it up quickly.

0 comments:

Post a Comment

 
Copyright 2009 helixmod-Newsday. Powered by Blogger
Blogger Templates created by Deluxe Templates
Wordpress by Wpthemescreator