edge distortion fix/plugin

Discussions about getting games to run in a Multi-Mon setup.
User avatar
Racer_S
Insiders
Insiders
Posts: 118
Joined: 29 Jul 2004, 11:47

edge distortion fix/plugin

Post by Racer_S »

after testing the new iRacing triplewide support i had the idea to try to fix the fisheye distortion effect with some other games... i went in photoshop and tried a few filters,notably 'spherize' which seems to correct the edge distortion. I figured, why not make a directx filter that does this in realitime like the Sol7 software, except it will be free.

the only drawbacks I can see if that the overall picture will be zoomed by some degree and it will not be pixel perfect anymore, also hud elements will be distorted as well.

I've already demonstrated it is possible with a proxy dll but i havent written any code that duplicates what the spherize filter in photoshop does yet.

check out these two screenshots, one without filtering, one with...

without spherize


with spherize
ToCA EDIT - Over 10 Years of Game Modding and Research
User avatar
thales100
Editors
Editors
Posts: 1898
Joined: 06 Nov 2008, 01:08

edge distortion fix/plugin

Post by thales100 »

Wow , thats fantastic ! :D
User avatar
scavvenjahh
Editors
Editors
Posts: 3424
Joined: 06 Mar 2008, 17:20

edge distortion fix/plugin

Post by scavvenjahh »

Exciting stuff indeed, although I don't mind if there's some distortion on the outer edges of my side monitors - but I do mind losing vertical FOV.
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

edge distortion fix/plugin

Post by GeneralAdmission »

Wow wow wow! This is fantastic stuff, Racer_S. I would love to play around with such a tool.

Why in the world do the vast majority of 3D games employ a fisheye camera? Humans don't see the world spherically, and it's always made games look a little "off" to me. Is it just easy to program a camera that way?

I could probably adjust to a little Vert FOV loss...considering it's not nearly as bad as most Vert- games in TH. I'm assuming that some/most Vert- hacks/fixes/mods could be tweaked a little to compensate for the filter's effect.

If you get this working well and release it into the wild, I'd say that the top 10 publishers all owe you a graphics card this time. ;) :D
redgun
Posts: 92
Joined: 09 Sep 2007, 18:11

edge distortion fix/plugin

Post by redgun »

great work. Looks very nice.

however, this edge looks kinda weird. I'm not sure if i would notice that while gaming but in the screen shot it confuses me.



unfortunately a fix like that could only be used in SP games :(
whismerhill
Posts: 760
Joined: 28 Jun 2009, 22:17

edge distortion fix/plugin

Post by whismerhill »

nice seems to correct a few discripencies
however the end result is not perfect either
for example the sides of the building on the left are not straight anymore...

and I think a real time effect like that would be rather weird if some straight buildings or other stuff bend on the sides ...

that said it's only my opinion since I'm no TH user anyway ;)
User avatar
Ryom
Insiders
Insiders
Posts: 365
Joined: 25 Jul 2004, 04:41

edge distortion fix/plugin

Post by Ryom »

http://www.cambridgeincolour.com/tutorials/image-projections.htm
User avatar
MobsterOO7
Insiders
Insiders
Posts: 1055
Joined: 19 Sep 2006, 16:25
Location: Ruckersville, Virginia

edge distortion fix/plugin

Post by MobsterOO7 »

Racer_S, this is very cool. VERY COOL. It's really too bad about the HUD getting borked though.

Now all we need is for some devs to implement something like this.
EVGA GeForce GTX 970 SC ACX 2.0 3.5GB | 3 X LG Flatron 24EA53VQ in Nvidia Surround | Optoma HD20
User avatar
BHawthorne
Insiders
Insiders
Posts: 1640
Joined: 06 May 2006, 12:46

edge distortion fix/plugin

Post by BHawthorne »

Doesn't SoftTH have some spherical correction built in? I remember seeing it when I played around with it awhile back in Warhammer Online.
Brad Hawthorne
Product Manager
Nthusim Pty. Ltd. | www.nthusim.com
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

edge distortion fix/plugin

Post by GeneralAdmission »

Doesn't SoftTH have some spherical correction built in? I remember seeing it when I played around with it awhile back in Warhammer Online.

I just looked at their site the other day. Apparently SoftTH allows you to render extra lines of resolution on either side of the image, essentially displacing the most distorted part of the image outside the visible screen area.

If I'm completely wrong please correct me. :P
User avatar
BHawthorne
Insiders
Insiders
Posts: 1640
Joined: 06 May 2006, 12:46

edge distortion fix/plugin

Post by BHawthorne »

Here's a snipit of the config file for SoftTH. Might be worth looking into the multiple methods it uses.

Code: Select all

[Direct3D]

   ; ** Advanced setting for Direct3D games **
   ; lensCorrection: Lens correction, set to 1 to enable support. >1 to enable by default
   ; lensCorrectionEdge: Lens correction edge offset
   ; hideNondefaultDevices: Hides all but the default adapter from the game
   ; forceHorizontalFOV: Forces horizontal FOV to be three times as wide
   ; forceResolutionWidth/Height: Forces device to be created with this resolution
   ; force16bitDepth: Force game to use 16bit depth buffer, can improve performance and reduce memory use
   ; sleepBeforeRead: Time in ms to sleep before reading back buffer data from video card
   ; useMultihead: Uses multihead features of primary card if available, can increase performance and reduce memory use
   ; delayedPresent: When useMultihead enabled, delay primary monitor present to sync with secondary head
   ; d3d8dll: Path to D3D8.dll/D3D9.dll to use or auto for automatic (system32 dir)
   ; altResetBehaviour: Do not reset lost main device after secondary device initialization (WDDM crash workaround)
   lensCorrection=0
   lensCorrectionEdge=0
   hideNondefaultDevices=0
   forceHorizontalFOV=0
   forceResolutionWidth=0
   forceResolutionHeight=0
   force16bitDepth=0
   sleepBeforeRead=2
   useMultihead=1
   delayedPresent=0
   autoSquash=0
   altResetBehaviour=0
   d3d8dll=auto


My curiousity is the methods used for lensCorrection, lensCorrectionEdge, forceHorizontalFOV, autoSquash?
Brad Hawthorne
Product Manager
Nthusim Pty. Ltd. | www.nthusim.com
Leapo
Posts: 144
Joined: 19 Apr 2008, 22:46

edge distortion fix/plugin

Post by Leapo »

forceHorizontalFOV attempts to force a games FOV to expand by 3 times. Better do use a games own settings if at all possible.

autoSquash attempts to detect when only 2D elements are on screen (like menus), and if it does, squishes the output to the center monitor. This helps with stretched menus in games like Bioshock.

Lens correction is the one you want. It can do pretty much what Racer_S has done in photoshop, but with one important difference. It can do it without stretching the HUD. The effect is only applied to 3D rendered elements.
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

edge distortion fix/plugin

Post by GeneralAdmission »

Lens correction is the one you want. It can do pretty much what Racer_S has done in photoshop, but with one important difference. It can do it without stretching the HUD. The effect is only applied to 3D rendered elements.

Dost I detect one Holy Grail? Or at least a pretty goblet? :wink:
geniv2
Posts: 373
Joined: 05 Oct 2008, 05:49

edge distortion fix/plugin

Post by geniv2 »

Racer_S never cease to amaze me!
this is amazing
Leapo
Posts: 144
Joined: 19 Apr 2008, 22:46

edge distortion fix/plugin

Post by Leapo »

[quote]Lens correction is the one you want. It can do pretty much what Racer_S has done in photoshop, but with one important difference. It can do it without stretching the HUD. The effect is only applied to 3D rendered elements.

Dost I detect one Holy Grail? Or at least a pretty goblet? :wink:
Sure, if you want to throw your your TripleHead2Go and join the SoftTH club :wink:
WaveZtream
Posts: 140
Joined: 07 Mar 2008, 14:00

edge distortion fix/plugin

Post by WaveZtream »

Why did I even buy a damn TH2GO if the softTH does the job better? Shame on me lol
User avatar
suiken_2mieu
Insiders
Insiders
Posts: 2351
Joined: 20 Aug 2009, 04:20
Location: Virginia
Contact:

edge distortion fix/plugin

Post by suiken_2mieu »

Why did I even buy a damn TH2GO if the softTH does the job better? Shame on me lol

it was an easier setup and is compatible with more games. =P
System Core: | Intel Core i5-2500K + ASUS P8Z68-V + 16GB Corsair XMS3 DDR3 1333 MHz | Win7 x64 | MSI R7970 Lightning 3GB [1105/1400] |
Display: | 3 x Dell Ultrasharp 3007WFP-HC @ 7680x1600 | Dell u3011 |
Leapo
Posts: 144
Joined: 19 Apr 2008, 22:46

edge distortion fix/plugin

Post by Leapo »

"Easier to set up" is debatable. Look at all the problems some people are having with the TH2G and specific drivers, and the fact that you have to make sure your screens support 57Hz if you want to run 5040x1050.

SoftTH doesn't have these hardware and driver compatibility issues, and supports resolutions upwards of 7680x1600, but it only works with DirectX8 and DirtectX9 applications (OpenGL version pending).

There's always a catch, no matter what solution you use.
mattsimis
Posts: 298
Joined: 19 Mar 2004, 15:19

edge distortion fix/plugin

Post by mattsimis »

Why did I even buy a damn TH2GO if the softTH does the job better? Shame on me lol


I thought it was common knowledge SoftTH did this. I was playing with it before I got my TH2G 6mths ago. The Lens Correction works (though like Racer-S's solution it zooms the image) and IRC it can be adjusted on the fly to allow some compromise.

It wasnt enough for me to put up with lower colour depth and obviously laggy sidescreens as well as obscure per game INI settings to keep it over a hardware solution like TH2G. I would however be interested in something that added Lens Correction to TH2G!
[GTX1080 - 4.48GHz 4690k - planning projector mayhem]
Leapo
Posts: 144
Joined: 19 Apr 2008, 22:46

edge distortion fix/plugin

Post by Leapo »

It wasnt enough for me to put up with lower colour depth and obviously laggy sidescreens as well as obscure per game INI settings to keep it over a hardware solution like TH2G. I would however be interested in something that added Lens Correction to TH2G!
The side screens have never been laggy with SoftTH as long as you have enough bandwidth for your two video cards to communicate with one another. You're also not forced to run lower bit-depth on your side screens, you can set it to 32bit color if you want. I'm using a PCIe 16x 8400GS to run one of my side screens, which seems to do the trick just fine.

There's also the CUDA based frame copy method inroduced in the latest version for Nvidia cards, which pretty much eliminates the possibility of any side screen lag and boosts performance hugely.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests