Lens Distortion Injector

Mel
Binocular Vision CONFIRMED!
Posts: 287
Joined: Sat Nov 10, 2007 7:45 am

Re: Lens Distortion Injector

Post by Mel »

Dycus wrote:I've gotten Half-Life 2 on Steam to work. Put all the files in the "half-life 2" directory in Steam's files, where hl2.exe is. Then move d3d9.dll and dxgi.dll to the bin folder.
Done, and fail again. The game starts without crashing and runs fine, but no SBS. The log file shows:

full path: C:\Program Files (x86)\Steam\steamapps\imacmillan\half-life 2\bin\
redirecting CreateDevice
initialising shader environment
redirecting device->Reset
initialising shader environment

Not to worry, though. I'm not hung up on getting HL2 to work and am going to try various other games. I just received my TrackIR5 yesterday, so am going to try to get it to work in a supported game, along side your injector. I'll post back when/if I get it going (and off topic for this thread: my initial test of TrackIR 5 yesterday was not good. I'm not holding out much hope for it).
jf031
Cross Eyed!
Posts: 167
Joined: Fri Sep 28, 2012 4:32 pm

Re: Lens Distortion Injector

Post by jf031 »

Dycus wrote:I've gotten Half-Life 2 on Steam to work. Put all the files in the "half-life 2" directory in Steam's files, where hl2.exe is. Then move d3d9.dll and dxgi.dll to the bin folder.
Turning off anti-aliasing in-game fixed it for me. It looks like injection.ini can go in either bin or the main directory.

edit: it looks like turning off anti-aliasing is also mentioned in the text file, hah. I need to read better. :)
Last edited by jf031 on Sat Nov 17, 2012 12:00 pm, edited 1 time in total.
User avatar
Dycus
Binocular Vision CONFIRMED!
Posts: 322
Joined: Wed Aug 15, 2012 1:38 pm
Contact:

Re: Lens Distortion Injector

Post by Dycus »

You can try adding -dx9 in the launch options, but otherwise I dunno why it wouldn't work. You're waiting until at least the title screen, right? The injector doesn't take effect in the splash screen.

Edit: Ah, or anti-aliasing. I don't recall turning that off, but it may have never been on in the first place.
Mel
Binocular Vision CONFIRMED!
Posts: 287
Joined: Sat Nov 10, 2007 7:45 am

Re: Lens Distortion Injector

Post by Mel »

Dycus wrote:You can try adding -dx9 in the launch options, but otherwise I dunno why it wouldn't work. You're waiting until at least the title screen, right? The injector doesn't take effect in the splash screen.

Edit: Ah, or anti-aliasing. I don't recall turning that off, but it may have never been on in the first place.
Turning off AA did the trick.

My comments about HL 2 experience are the same as Mirror's Edge. It looks good.

Wish list (not from you, of course, but in general for HMDs): head and neck tracking full-body a bonus), and correct aspect ratio.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: Lens Distortion Injector

Post by Nick3DvB »

Mel wrote:4. Media Player Classic, set to D3D full-screen mode: Fail. I wasn't expecting this to work, but was sure hoping it would.
MPC should be able to load the shader directly without injection, I can't get it to play ball at the moment,

I'm working on it but HLSL is all greek to me! @MaterialDefender - can you take a look at it that when you get a minute? 8-)
Last edited by Nick3DvB on Sat Nov 17, 2012 12:55 pm, edited 2 times in total.
Mel
Binocular Vision CONFIRMED!
Posts: 287
Joined: Sat Nov 10, 2007 7:45 am

Re: Lens Distortion Injector

Post by Mel »

Dycus wrote:You can try adding -dx9 in the launch options, but otherwise I dunno why it wouldn't work. You're waiting until at least the title screen, right? The injector doesn't take effect in the splash screen.

Edit: Ah, or anti-aliasing. I don't recall turning that off, but it may have never been on in the first place.
Is it no possible, in your injector, to correct the aspect simply by blitting the middle 50% of each frame (assuming the game is being rendered at 1280x800, the native rez of the RIFT) onto each side of the output buffer, effectively clipping the image to the proper aspect?
jf031
Cross Eyed!
Posts: 167
Joined: Fri Sep 28, 2012 4:32 pm

Re: Lens Distortion Injector

Post by jf031 »

Mel wrote:
Dycus wrote:You can try adding -dx9 in the launch options, but otherwise I dunno why it wouldn't work. You're waiting until at least the title screen, right? The injector doesn't take effect in the splash screen.

Edit: Ah, or anti-aliasing. I don't recall turning that off, but it may have never been on in the first place.
Is it no possible, in your injector, to correct the aspect simply by blitting the middle 50% of each frame (assuming the game is being rendered at 1280x800, the native rez of the RIFT) onto each side of the output buffer, effectively clipping the image to the proper aspect?
If I'm not misunderstanding you, you can change the "Distortion Mode" in LensDistort_Settings.ini to 2, which clips instead of squishing the image horizontally.

Also, MaterialDefender is the creator of the Injector. As you may be aware, Dycus works at Oculus, though!
Mel
Binocular Vision CONFIRMED!
Posts: 287
Joined: Sat Nov 10, 2007 7:45 am

Re: Lens Distortion Injector

Post by Mel »

jf031 wrote:
Mel wrote:
Dycus wrote:You can try adding -dx9 in the launch options, but otherwise I dunno why it wouldn't work. You're waiting until at least the title screen, right? The injector doesn't take effect in the splash screen.

Edit: Ah, or anti-aliasing. I don't recall turning that off, but it may have never been on in the first place.
Is it no possible, in your injector, to correct the aspect simply by blitting the middle 50% of each frame (assuming the game is being rendered at 1280x800, the native rez of the RIFT) onto each side of the output buffer, effectively clipping the image to the proper aspect?
If I'm not misunderstanding you, you can change the "Distortion Mode" in LensDistort_Settings.ini to 2, which clips instead of squishing the image horizontally.

Also, MaterialDefender is the creator of the Injector. As you may be aware, Dycus works at Oculus, though!
Sorry, MaterialDefender. Dunno how I got confused on authorship :).

I will try the Distortion Mode setting. Sounds like it does what I was looking for. I may have missed the info about it elsewhere in this thread.
Leahy
Cross Eyed!
Posts: 181
Joined: Thu Jun 07, 2012 1:36 pm
Location: France

Re: Lens Distortion Injector

Post by Leahy »

Sorry if this is a stupid question, I'm no programmer so I don't know how difficult it might be. Would it be possible to keep the whole 1280x800 resolution in memory and map the head tracking so that if you turn your head left you see the left 640 with both eyes and the same if you turn your head right? That might work to be able to self adjust while watching widescreen films.
User avatar
Namielus
Certif-Eyable!
Posts: 957
Joined: Thu Aug 02, 2012 8:49 am
Location: Norway
Contact:

Re: Lens Distortion Injector

Post by Namielus »

to watch movies you need to see the entire image. Its not comfortable to have to turn your head to look around. Therefore the widescreen image must be rendered as a virtual screen.
I am working on that full time now.
Riftoholic

My precious 6 month project the Oculus Virtual Lounge:
Image
If you help me in any way I will be forever grateful.
2EyeGuy
Certif-Eyable!
Posts: 1139
Joined: Tue Sep 18, 2012 10:32 pm

Re: Lens Distortion Injector

Post by 2EyeGuy »

What Leahy is saying is like a virtual cinema, but with you sitting or standing closer to the screen. And I think it would work a bit, since that's what they used to do with movies to broadcast them for people's 4:3 CRT TVs (although the Rift is 4:5, not to be confused with the more common 5:4).
User avatar
Namielus
Certif-Eyable!
Posts: 957
Joined: Thu Aug 02, 2012 8:49 am
Location: Norway
Contact:

Re: Lens Distortion Injector

Post by Namielus »

I understand what he means but being that close to the screen for a movie is too much for the theater standards.
At any point where you need to turn your head to see important content of the movie, you are leaving the comfortable limit of viewing normal films.
The field of view of a movie by thx standards should be no less than 36 degrees and no more than 50.
Now everybody is entitled to their own opinion, I am just quoting the standard. And to me, even having the width of the movie fill the 640 pixels on the rift is way too much.
Riftoholic

My precious 6 month project the Oculus Virtual Lounge:
Image
If you help me in any way I will be forever grateful.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: Lens Distortion Injector

Post by Nick3DvB »

I agree, I started only using about 20% of the total FOV for my video player idea:

http://www.mtbs3d.com/phpBB/viewtopic.p ... =30#p86825

I have increased it a bit now but I don't think we should ever fill the whole screen horizontally,

even with head-tracking for viewport pan & scan I think we will still want to have a large side border.
fhsmatt
One Eyed Hopeful
Posts: 6
Joined: Thu Apr 25, 2013 9:45 am

Re: Lens Distortion Injector

Post by fhsmatt »

I know this thread has been inactive a while... but this looks like what I might be looking for to solve my DIY headset issue. I'm not looking to add 3D all the time, so I've been having trouble finding something to double the screen... this looks like it would do it! However, I cannot find a link to download it so I can try it out... is there one somewhere in this thread that I missed? If not, could someone point me at it?
User avatar
Dycus
Binocular Vision CONFIRMED!
Posts: 322
Joined: Wed Aug 15, 2012 1:38 pm
Contact:

Re: Lens Distortion Injector

Post by Dycus »

mbuehler
One Eyed Hopeful
Posts: 38
Joined: Wed Apr 17, 2013 1:16 am

Re: Lens Distortion Injector

Post by mbuehler »

This works just fine with several games (not 3d but a start), only the distortion is wrong. Is there any way to get this configured for the Rift? The ini file didn't seem to have any effect when I threw random values in there.
atomdude
One Eyed Hopeful
Posts: 11
Joined: Tue Sep 10, 2013 6:22 pm

Re: Lens Distortion Injector

Post by atomdude »

has anyone tried to get it to work on digital combat systems (DCS)?
Post Reply

Return to “Oculus VR”