Sign in to follow this  
denali

Prepp3d Views: Peripheral Distortion Correction

Recommended Posts

For those of you who have been following the thread 


"Multi-monitor (dual, triple, etc) Stretch/Fisheye Distortion Fix"


http://forum.avsim.net/topic/442972-multi-monitor-dual-triple-etc-stretchfisheye-distortion-fix/

 

If you display a single view with a triple monitor setup you are probably familiar with the "stretched out" distortion that is seen in your side monitors.  

 

Jackson_Hole_Distort.jpg

 

This program corrects that distortion.

 

Jackson_Hole_Prepp3d.jpg

Jackson_Hole_Prepp3d2.jpg

 

I've completed a very basic installer for a shader that acts as a "software lens", and 2 cameras that use it.  This program will install 2 cameras to your Cameras.CFG file and a PostProcess Shader.    

 

https://www.dropbox.com/s/lz420p88z9rsucd/Prepp3D%20Views.exe?dl=0

 

To install, close Prepar3d.  

 

Start Prepp3d Views, click "Install Lens Corrected Cameras".

 

 Prepp3d_Views_Before.jpg

 

The cameras are available in Prepar3d the under "custom" in the view menu, accessed by a right click on a view.   

 

Prepp3d_P3_DContext_Menu.jpg

 

On it's own, a view using the Lens Corrected Cameras will be lacking something.

 

Jackson_Hole_Lens.jpg

 

 

It needs to be expanded/enlarged beyond your display to look correct.  You can get an idea of what the expanded view looks like in the Prepp3d Views dialog.  

 

To do this expansion, Prepp3d Views will resize your Prepar3d window (you cannot do this by dragging the frame, and you probably want to be in full screen anyways).    There are buttons for both expanding, and returning to default sizing.   There are hotkeys for both functions.  

 

 

Prepp3d_Views_After.jpg

 

(If you are using NVidia Surround or Eyefinity or other type of setup, it may be necessary to set number of displays to 1.  This is how the program knows where to offset from, as the top left of the main monitor in a normal configuration is where offsets are measured from.)

 

Because displays can be in different shapes and sizes, there are controls that allow you to set up for different configurations.   You can set the height and width to more accurately fit your displays, and round out the instruments to your liking.  

 

This version uses a Field Of View setting of 140 x 50.   I believe there is no longer any "graininess" to be seen.  

 

This is a BETA VERSION, no version number (just call it hello world, or beta version 1).  I hope it works well for you, and that you enjoy the undistorted views as much as I do.  I cannot go back to the old way of seeing the world.  

 

I have plans for this, and am open for requests.  It may still work for FSX, I have an idea how to get it in there.  I have a good system built for accessing and working with all of the P3D file types now and I think I can make some things easier for configurations and situations.  I have a framework up for rapid development now.  The cameras can be installed into default views as well, and some other neat camera/view stuff may be done in real-time using P3D SDKs.  It may be possible to eliminate the need for the "hack" of oversizing the window.

 

Some other ideas are bezel correction, and angle correction, accounting for the angle that the monitors are joined at.  Custom FOVs can be done.  

  • Upvote 1

Share this post


Link to post
Help AVSIM continue to serve you!
Please donate today!

I am away for a week but this to my mind trumps the release of v2.4! The awful stretch effect is something that MS and now LM should have addressed long ago. Thanks so much for making an effort to fix it, and I'll give it a try soon :) Cheers K

Share this post


Link to post

Thanks for your time and dedication to help fix this problem with widescreen setups. I will test this out when I get a chance.

Share this post


Link to post

Great and big thanks, I'll test this tomorrow for sure! By the way, I was thinking that does this work normally with EZDOK?

Share this post


Link to post

Great work !

 

Does it also work in 2D view ?

My real size cockpit uses 2d view...

Share this post


Link to post

Thanks for the great contribution!

 

I am trying your install.  It seems simple enough to activate and I can see the fisheye effect, however, I don't see the expansion.  So in effect, my view looks like the sample with the fisheye lens.  When I try to CTL Win Space / ATL Space functions, the expansion doesn't occur.

 

 

 

I running ATI with 3 24" monitors for 57x12 resolution.  I select that scale and have tried using the 1 monitor vs 3 monitor setting, same outcome.  Let me know if there is anything you recommend.

 

This is the inserted view in the Cameras.cfg file:

 

[CameraDefinition.019]
Title = Prepp3D View Lens Corrected Virtual Cockpit 140x50
Guid = {60469E4E-43D5-4f6f-9C53-3B5366645A4D}
Description = This is a non-distorted virtual cockpit
Origin = Virtual Cockpit
MomentumEffect = Yes
SnapPbhAdjust = Swivel
SnapPbhReturn = False
PanPbhAdjust = Swivel
PanPbhReturn = False
Track = None
ShowAxis = YES
AllowZoom = TRUE
InitialZoom = 0.6
SmoothZoomTime = 2.0
ZoomPanScalar = 1.0
ShowWeather = Yes
XyzAdjust = TRUE
ShowLensFlare=TRUE
Category = Custom
PitchPanRate=30
HeadingPanRate=75
PanAcceleratorTime=0
HotKeySelect=1
Transition=Yes
HorizontalFOV=140
VerticalFOV=50
PostProcess00 = Prepp3D View 140x50
[CameraDefinition.020]
Title = Prepp3D View Lens Corrected Spot View 140x50
Guid = {F6299A4A-C95E-4916-9B74-D25306991EC1}
Description = This is a non-distorted spot view
Origin = Center
SnapPbhAdjust = Ordinal
SnapPbhReturn = False
PanPbhAdjust = Swivel
PanPbhReturn = False
Track = FlatChase
ShowAxis = No
AllowZoom = Yes
InitialZoom = 1.0
SmoothZoomTime = 2.0
ShowWeather = Yes
XyzAdjust = FALSE
Transition = Yes
ShowLensFlare=TRUE
Category = Custom
ClipMode = Spot
PitchPanRate=30
HeadingPanRate=75
PanAcceleratorTime=0
Transition=Yes
HorizontalFOV=140
VerticalFOV=50
PostProcess00 = Prepp3D View 140x50

Share this post


Link to post

 

 


Does it also work in 2D view ?
  Which view/camera do you use?  It should work for any of the default views.  I can make a camera for it.

 

 


When I try to CTL Win Space / ATL Space functions, the expansion doesn't occur.
 Did you try the buttons?   There may be a bug;  the first time a button must be pressed.  It was happening in an earlier build and I may have forgotten to bring that fix forward.  Try the button first.

Share this post


Link to post

I tried pressing a keyboard button, as well as the combo buttons...no dice.   Thanks....

Share this post


Link to post

Another thing I thought of.  In order to identify the P3D window I am using the title of the window.  What title is used on your P3D window?  I've wondered if it is different in different languages.

Share this post


Link to post

This thread continues here:  http://forum.avsim.net/topic/452305-prepp3d-views-peripheral-distortion-correction/

 

I've posted a simple installer.  Let me know over there how it works!

Disregard that.  I was wondering why this post didn't show up in the forum it was meant to go into.

 

 

Reagrding my 2d view :

I am using the default Ifly 2D view , no widescreen enabled and zoom 0.80.

 I am taking a look at what the IFly views are about.  

When I use the Cockpit view I don't see a panel.  Might not be related.  I don't care to use 2d panels.  But all I see in the cockpit view is a forward looking camera.

 

I am looking around to see what you mean by the IFly 2d panel.  I'm reading about an issue with the panel not expanding to 5760.  Is that what you are referring too?  Do you have an image you can show me so I can see what you want corrected, so I can understand if I can correct it?  I may ask for a cameras.cfg file too.

 

Taking the easiest guess, do you just want the shader applied to the 2d cockpit view?  I can do that.  

Share this post


Link to post

I've updated the program.  Some changes:

        Added button to delete entries from Cameras.CFG.  You can use this to clear and then update the cameras.cfg file with new cameras.  I have plans to grow this into a featured interface.

        Version numbers to keep track of changes added to Prepar3d.

        A lens corrected cockpit view.  Use the button above to delete the previous version entries, and then add the new cameras.

        More robust P3D window finding.  This may still need work.   

 

https://www.dropbox.com/s/lz420p88z9rsucd/Prepp3D%20Views.exe?dl=0

Share this post


Link to post

Disregard that.  I was wondering why this post didn't show up in the forum it was meant to go into.

 

 

 I am taking a look at what the IFly views are about.  

When I use the Cockpit view I don't see a panel.  Might not be related.  I don't care to use 2d panels.  But all I see in the cockpit view is a forward looking camera.

 

I am looking around to see what you mean by the IFly 2d panel.  I'm reading about an issue with the panel not expanding to 5760.  Is that what you are referring too?  Do you have an image you can show me so I can see what you want corrected, so I can understand if I can correct it?  I may ask for a cameras.cfg file too.

 

Taking the easiest guess, do you just want the shader applied to the 2d cockpit view?  I can do that.  

 

I am using the forward 2D view without instruments visible, because I have the Cockpit Builders Edition.

 

Resolution is 5920x1080

Share this post


Link to post

I am using the forward 2D view without instruments visible, because I have the Cockpit Builders Edition.

 

Resolution is 5920x1080

 Then I think what I've just uploaded will work, the cockpit view.  The trouble with the 5920 is that you may have to use the virtual cockpit view to get an idea how correct the width and height you select for the expansion.  You can tell by how round the guages are.  Then go back to the cockpit and use the same setting.  

 

I think there is some math I can build in so there won't need to be any manual adjustments, just input display settings.  I might be able to get the display settings programmatically, and I may be able to set everything from within P3D.  Lots of learning and coding to do.

 

I hope it works for you now.   It would be nice to know one of those hard core full size cockpit pilots could use it.

 

The latest NVidia drivers gave much clarity to my photoscenery (somewhere around 2TB of it) I was blaming LM and a LOD issue for.  So this is even more fun for me now.

Share this post


Link to post

I use the 2d cockpit , without Widescreen enabled.

 

Enabling the Widescreen feature , makes the fisheye effect worse, causes the far distance to be nearer and the framerate goes down by 10% 

 

My current view uses zoom 0.80 and there is only a distortion at the most left and right monitor from the middle of the screen to the far outside of the screens.

 

The best view would be 1.00, but then the groundtextures are less sharp in the far distance.

To get sharper textures I should use 0.50-0.60 , but then the fisheye effect gets worse.

Share this post


Link to post

 

 


I use the 2d cockpit , without Widescreen enabled.
 Have you tried the latest upload?  It has a 2D cockpit.  I don't think widescreen matters with these.  

Share this post


Link to post

OK, I see the MESS in the Surround mode now.  I'm on it.

 

I am also aware that there is still some graininess being reported.   

Share this post


Link to post

Hi Denali,

 

I'm running at 5760x1200, I'll give it a shot in about an hour.

 

Thank you

Share this post


Link to post

I'll test the new version next friday when I'm home. And yes, I had some problems with my surround with earlier releas. Big thanks for your work with this! :Applause:

Share this post


Link to post

Hi,

 

Don't think I'm doing this right, this is what I get at 5760x1200.

 

fisheye.jpg

 

Mike

Share this post


Link to post

@Mike and others:

     With Nvidia, are you using NvSurround - with what Zoom, WideAspect=true/false? . We aren't talking about separate views for each window/monitor, correct? It would seem that we need to setup for a wider Field of View than normal so the anti-distortion has some more pixels to morph. As far as FPS, it would seem that this would be an extra pass but I'm not sure - Denali?

     I really want to have about 170 degrees field of view so that I can see the runway when I turn from base to final. Most of the time, I don't use NvSurround and instead use three separate views (minimal distortion) even though the FPS penalty is high (just use lesser CPU settings - no traffic, low water, low LOD, min shadows etc).

 

Thanks Denali! I'm about to try this but I would like to see others succeed first (what a wus!)

 

Dave

Share this post


Link to post

Hi Dave,

 

I use Nvidia - latest drivers (Titan Black) and use NvSurround (5760x1200), Windows 7 64bit shows one monitor in display via NVSurround. I have P3D2.4 WideAspect set to True. For the zoom I use 62.3 and I'm not using seperate views (VC via Surround).

 

Note: I also tried the 1 / 3 monitor selector from within Prepp3Dviews, no difference.

 

Thanks

Mike

Share this post


Link to post

@Mike,

    WRT Zoom - you said "62.3" - do you mean a Field of View set at 62.3 degrees for each monitor - i.e. about 186 deg FOV. The actual Zoom value for that might be "0.8"? - or am I confused? I would still prefer about 200 degrees of field of view with minimal distortion. What monitors do you use - I have just three 21 inch monitors but intend to go to either 27" monitors or 32+ inch 1080p HDTVs.

    OK, I am with you on the use of NVsurround (and NOT separate views) - what are your feelings about the distortion that you experience before Denali's shader fix? Would you please record a 5760x1200 image of the before and after (when Denali gets you setup correctly)? I would like it to be of an airport scene with plenty of buildings in the side views.

     Thanks much

 

Dave

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this