PDA

View Full Version : Borders on windows, window alignment tool



wledzian
05-21-2010, 07:54 PM
Hi all -

In the course of planning my simpit, I've had many questions, most of which have been answered in existing threads. One which has not quite been answered (or at least I can't find it if it has), is how to get a true cylindrical projection out of FSX.

I've also seen many threads discussing the placement and tweaking of individual views for each projector, which usually involve manual tweaking of the zoom settings and image placement. This is good, but there would still be distortion when projected onto a cylindrical or spherical screen. Nthusim can take care of some of this, but there's still some tweaking to be done once the Nthusim grid is initially aligned.

My partial solution to an approximate cylindrical projection is to use more than three views. As more views are added, there is more tweaking to do, and that gets tedious. To avoid so much tweaking, I put together an Excel spreadsheet to crunch the numbers for me and give me the entire window list for the .flt file. This let me bump up my window count just about as high as I wanted to go. I was concerned about a framerate hit, but for equal field-of-view comparison, I didn't notice a difference.

How many? Just to see what it can do, How about 27 views configured for a full 360° FOV?

http://home.comcast.net/~wledzian1//pwpimages/360View.jpg

OK, so a 360° view might be a bit of overkill, but it shows off the window alignment. Thiis did have about a 50% framerate hit over a 180° view with 9 windows, but I suspect that's more to do with the extra polygons rather than the extra windows.

My question to you:
I could go higher on the window count, but those black lines bug me. Is there a way to get rid of the border around each window?

Thanks!

fsaviator
05-22-2010, 02:39 AM
I would need to know the process you went through that gave you the black line.

I won't lie, you have apparently accomplished something that I've never seen before. I don't have black lines as I use Nthusim, but I do have a miniscule overlap instead.

Would you mind sharing the spreadsheet and procedures?

wledzian
05-22-2010, 02:38 PM
(Old Version) (http://home.comcast.net/~wledzian1/WindowMaker.xls)

EDIT: Updated version available HERE (http://www.mycockpit.org/forums/showthread.php/23199-Windowmaker-tool-updated!?highlight=)

(It uses VBA code to work its magic. Depending on your security settings, it may pop up a message or just not work. If it doesn't work, check your macro security settings. Feel free to view the code by pressing [alt-F11].)

Procedure:
Set up and save your flight with the aircraft and airport you want to use.
Open the .flt file in notepad or your favorite text editor.
Open WindowMaker.xls
Open the cameras.cfg file and find the Guid for the camera you want to use.
Copy the Guid string (without the curly brackets) to WindowMaker.xls
In WindowMaker.xls, set the number of views and total FOV.
Click the "Go !" button.

Copy the window and camera list from column E and paste it over the [Window] and [Camera] definitions in your .flt file.
Save the .flt file.

Go back to FSX and load the saved flight.

If you prefer the 2-D panels, use the GUID from [CameraDefinition.001] and comment out the interior model from the relevant model.cfg file (add "\\" before the line).
If you prefer the virtual cockpit, use the GUID from [CameraDefinition.002] and leave model.cfg alone.

You may notice that one more window is created than what you specify. The [Window.1] section is associated with the default view. If you're using [CameraDefinition.001] and close all visible panels, this view closes and [Window.2] becomes active, resized and recentered. [Window.1] is displayed behind the others, and is defaulted to a single pixel zoomed way in to minimize any extra workload. The specified views start at [Window.2].

The lines are just the normal 1-pixel black borders (white for the selected window) that appear around each view window. If you're using 1 projector or screen per view, they'd just be an unused pixel around the edge, and have no visual impact. If you want more views, the lines become an issue.

fsaviator
05-23-2010, 02:05 AM
That is a pretty handy spreadsheet from what I can see. Excellent work.

Unfortunately, I'm running FS9, which from what I can tell does not use a camera.cfg and camera GUIDs. I appreciate you posting this though and I'm sure other FSX users will benefit greatly from it.

Cheers,

Warren

wledzian
05-24-2010, 01:54 PM
I have a feeling the FoV calculation may be a bit more involved than the simple formula listed in the spreadsheet. It works when I'm running at 1920x1080, but is not quite right at other resolutions. At 1280x720, there are gaps between the windows, and at aspects other than 16x9 the zoom is not quite right. It still needs some work before I'll call it done.

I don't have a copy of FS9, but if there's any interest and a volunteer or two to test it, I'd be willing to attempt a similar utility for FS9.

So does anyone know how to get rid of the window borders, or know for certain that there's not a way to disable them?

wledzian
01-10-2011, 01:06 PM
I've learned a bit since I made that sheet. Here's a quick summary update:

1: The issues with the zoom levels being incorrect for resolutions other than 1920x1080 were primarily due to a minimum window size. When using large numbers of windows (27 in my above example), each window is naturally very narrow. For lower resolutions, FSX honors the window placement, but not the window size. With the size being incorrect, the alignment is thrown off. This 'problem' can be avoided by using a lower window count.

2: I've learned more about the effect of WideViewAspect.
- When WideViewAspect=True, FSX holds the FOV constant on the smaller window dimension.
- When WideViewAspect=False, FSX holds the FOV constant on the larger window dimension.
In a nutshell, use WideViewAspect=False if your configuration results in windows which are wider than they are tall (ex. 3 windows for a 3x1024x768 TH2Go setup), and WideViewAspect=True if your windows are taller than they are wide (as in my example screenshot above).

3: FOV is not equal to 34/zoom. That is close, but not quite exact. That formula works well when each window has a narrow field of view, but it becomes inaccurate very quickly when each window shows a larger FOV. This leads me to believe that there is a small-angle approximation being used, and when I reverse the small angle approximation and use 33 instead of 34 in the numerator, I get much more consistent (but still not perfect) results.

I'll post a revised version of the spreadsheet sometime this week after I've had a chance to polish it a bit. In the meantime, if anyone knows how FSX actually handles the zoom-to-FOV conversion, PLEASE share your knowledge.

paul m
01-22-2011, 03:37 PM
I too use FS9 and would be VERY interested in a spreadsheet that could be used for setting up a 180 degree screen in FS9.
As far as a volunteer I could be available.

wledzian
01-24-2011, 04:29 PM
Sorry for the delay; Life has been busy, I haven't had a chance to clean up the spreadsheet.

I've found that the method of calculation for FS9 appears similar to FSX, but the method to create the different windows is NOT similar. Whereas the different windows are defined in the individual .flt file for FSX, FS9 saved flights use the pre-defined views for the saved windows. So far, I've been successful in modifying the predefined views to provide the angles I want, but it would be better if new views could be defined. I don't know how to do this, or even if new views can be defined. If someone does know how to define new views in FS9, please chime in.

One big drawback I've noticed in FS9 compared to FSX is that the zoom levels are much coarser in FS9. In FSX, the zoom level can be adjusted very precisely, but I find that while making "fine" zoom adjustments with [shift][=] and [shift][-], the zoom changes in discrete steps. What this means to the end-user is that it may be difficult to get pixel-perfect alignment on the windows.

hercules
10-15-2012, 11:10 AM
Message moved to new thread

ngidalov
05-30-2013, 02:50 AM
I have the exact formula that calculates the zoom based on the required horizontal or vertical fov and the aspect ratio.
Contact me if still interested.

With kind regards,
Nikola Gidalov
Fly Elise-ng (http://www.fly.elise-ng.net/)