Saturday, June 8, 2013

Fable: The Lost Chapters - 3D Vision Fix

3D Vision Fix by mike_ar69

Fixed
1. Water reflections
2. Water refractions
3. Water rings when you wade in water
4. Character and Object Halos
5. Coupled HUD and world objects
6. Spinning avatar in clothing menu
7. Put HUD at small depth
8. Disabled distant objects which rendered too close
9. Provided two convergence presets (high/low) as some menus require lower convergence

Screenshot




Video
I have made a video available (and extra screenshots) here: Fable TLC Video

Outstanding Issues
1. Halos are significantly better than they were, but ultimately the technique used to create the halo/highlighting seems a bit of a bodge and its showing up in 3D.  So from a distance, halos can look clipped.  There are no Pixel shaders to see if this could be fixed.
2. I removed distant trees because they rendered too close, and trying to push them back just made them clip so much they disappeared.  If anyone knows how to deal with this, please let me know.
3. It is necessary to *remove* the Nvidia profile for this game using Nvidia Inspector (see below).  Using Aion or Prototype did not allow water to be fixed properly.  The default profile does not allow any stereo fixes to be applied (I had this problem with Overlord 2 as well).
4. The way the game creates reflections on water is flawed, even in 2D.  Sometimes something is reflected that should not be - that is a game bug, not part of this fix.

Summary
A bit of a Golden Oldie nowadays, I was amazed how good this game looked out the box - lighting and shadows, smoke fire etc - all render great.  Of the issues I fixed, the Halos where the biggest visual issue, followed by the water issues, and I moved the HUD for the sake of it, it looks a bit better in a small depth.  The distant trees were also hurtful on the eyes, but there were not many of them and removing them does not affect the visuals hardly at all - the game has a really low LOD for world objects anyway.

Installation
1. Extract this zip file to the games exe directory.  In my case this is D:\Steam\steamapps\common\Fable The Lost Chapters.
2. Remove default profile with Nvidia Inspector.
2.1 Open Nvidia Inspector
2.2 Click the litle "tools" icon on the middle RHS
2.3 Type "Fable" in the "Profiles:" box at the top
2.4 Select "Fable The Lost Chapters"
2.5 A menu icon with a red X on it will appear next to a menu icon with a green plus
2.6 Select the one with the red X
2.7 Select the game exe name when it pops up
2.8 Press the "Apply Changes" button in the top RHS



5 comments:

  1. OMG, I love FABLE 1. I kept crashing when I rewrote shaders and I was definetly rewriting them right[I tried like 20 different ones].

    Well anywho... NICE

    ReplyDelete
  2. I was going to write up here a few words about the 'experience' of looking at this game, one of which may explain the crashing you had:
    1. All shaders were VS/PS_1_1 so all had to be converted to 3_0
    2. Many shaders have Address Register statements in them such as "mov a0.x, r2.y". Leaving these in makes the game crash to desktop! It must be changed to "mova a0.x, r2.y".
    3. None of the shader files have headers. Not one. Had I less experience messing with this stuff I would have left well alone, but there was fortunately standard patterns between shaders that were easy enough to recognize.
    4. There are very few Pixel Shaders, and none that were necessary to fix what I did - I was hoping there might be one for the halos so I could try and get rid of the clipping but there isn't.
    5. The default profile for the game had the effect that it would ignore the stereo "side" component in the texture sampler i.e. it would always be "1" for both left and right views. I had this issue in Overlord 2, so was able to recognize it.
    6. I switched to the Aion profile, which enabled fixes, and also seemed to fix water reflections (but not refraction or puddle rings). However, the effct was nasty in that when looking at water, if you move the mouse around the rendering of the water seems to freeze and get out of sync until you stop moving, then would snap back into place. That was worse than the reflections not being quite right. The Prototype profile did the same thing (an I will note this happens in The Witcher (1) as well).
    7. So decided on removing the profiling and fixing it instead.
    8. Hud - I was mostly OK with the screen depth hud, but pushing it to a small fixed depth (so edges did not get cut off) is defintely easier on the eyes. If anyone wants to chnage the depth the shaders are clearly labelled in the headers as being "hud" fixes, and the value to change is the "0.2" value in "def c200, 1.6, 0.2, 0.0625, 0". A higher number (upto 1) will give higher depth.
    9. There was one "hud" fix that was bizarre since it did not come from a 2D texture. It was created by a full on 3D VS with a VPM in it. The item in question is a little light thingy that sits next to the Mana bar in the top left corner. It was coupled with actual world space objects. To start with I worked out a 'manual' fixed convergence value that would align the spot in the correct place on the hud (that I had also put at depth) - so if convergence is changed, the spot stays at teh same depth and does not screw up. then I noticed lots of other random objects moving (actually things like smoke, fire etc). It was impossible to isolate this little light spot using Textures. In the end I worked out a method of checking, in the VS, the w-depth of the object and working on the assumption that the light spot was petty close to zero depth used that in an IF statement to selectively correct it, and not other things. Note that if the hud depth is changed, then the tweak parameter for this light spot will need tweaking too. In VS 2A7A7B6C.txt, the value "-0.045" in "def c200, 0.2, 0, 0.0625, -0.045" is what will need to be tweaked to get the spot at the same depth as the hud.
    hud - avatar - use of w-depth
    10. Repeat all of the above for the spinning avatar in the "clothing" screen of the menus. This was also coupled to actual objects (like buildings!), so I used the selective w trick again. Again, if the hud depth is changed, in VS 229CC49F.txt change the "-0.12" value in "def c200, 1, 0, 0.0625, -0.12"
    As I wandered arounf I kept noticing objects with incorrect halos - because not only are there many shaders for halos for different objects, some objects have more than one shader to create the full halo outline. If I missed any, just drop me a note, or fix it yourself, they all follow exactly the same pattern, just look in one that I did.

    ReplyDelete
    Replies
    1. 2. Ah thats it.
      5. Only way I can explain now has an Nvidia has an C - D - E profile [Then the wierd offshoots/compatibility flags]. But like two years ago maybe instead of three there was only A - B. They moved all the A's to C. But forgot to fix B so they are on a null profile. Games made over three years ago have a high chance of being on wrong profile/ on a null profile where we cant fix till we change it. Like Helix I know didnt know of this/might still not. If you look at Jericho's fix. He actually did it from scratch. The problem was game was just on the null profile. Changing profile not only fixed what he did but fixed remaining issues.
      10. Yup. Effects get MESSED UP on same shaders as models.

      Got me interested in seeing it though. Do you happen to have the original or converted for tree's?

      Delete
  3. It's quite a good fix, I have been waiting for a fix like this for awhile....great job mike_ar69. Only problem I have which was present in the previous fix is my characters head is black...not sure whether there is a shader issue or video setting....anyone else seen this?

    Cheers!

    ReplyDelete
    Replies
    1. Hi thanks for the feedback. Been on vacation so just seen it. Never seen this issue so can you provide a screenshot, driver version, game settings etc? Am happy to look at it and try and sort it out.

      Delete