Page 2 of 2

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 11:51 am
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).

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 11:55 am
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. :)

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 11:58 am
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.

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 12:30 pm
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.

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 12:46 pm
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-)

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 12:50 pm
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?

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 12:58 pm
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!

Re: Lens Distortion Injector

Posted: Sat Nov 17, 2012 2:18 pm
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.

Re: Lens Distortion Injector

Posted: Sun Nov 18, 2012 2:07 pm
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.

Re: Lens Distortion Injector

Posted: Sun Nov 18, 2012 2:11 pm
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.

Re: Lens Distortion Injector

Posted: Sun Nov 18, 2012 3:47 pm
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).

Re: Lens Distortion Injector

Posted: Sun Nov 18, 2012 3:51 pm
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.

Re: Lens Distortion Injector

Posted: Sun Nov 18, 2012 3:59 pm
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.

Re: Lens Distortion Injector

Posted: Mon May 06, 2013 3:11 pm
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?

Re: Lens Distortion Injector

Posted: Mon May 06, 2013 3:59 pm
by Dycus

Re: Lens Distortion Injector

Posted: Tue May 07, 2013 3:40 pm
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.

Re: Lens Distortion Injector

Posted: Wed May 13, 2015 9:17 pm
by atomdude
has anyone tried to get it to work on digital combat systems (DCS)?