Jump to content

Welcome to OZx Forum

Welcome to OZx Forum guest,

Wouldn't it be nice if I would call you by your name or nickname of your choice ? 

Like most online communities you must register to post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of OZx Forum by signing in or creating an account.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

scottharmes6

Tutorial: How to create Photo Scenery for FSX and Prepar3D

Recommended Posts

 
 
Here's a basic rundown of how to create Photoreal (PR) Scenery for Microsoft Flight Simulator X, which will be the same as creating it for Prepar3D, the only difference being each program's own Software Development Kit (SDK) should be used depending on which simulator the scenery is being created for.
 
 
What you will need:
 
 
FSX SDK - Available on the FSX Gold discs or it can be downloaded from Microsoft or elsewhere on the net. The latest version (according to what FSX version you have installed) should be installed.
 
IrfanView - Graphics Editor - Good for converting image files and opening image files some other editors can't. Available online for free.
 
GIMP - Or some other graphics editing program. GIMP is good and it's free. There are also a huge number of plugins (addons) available from the GIMP Plugin Registry. This will be used to alter colours of the image files and to create blend masks and water masks to blend the scenery in to the surrounds.
 
An image - Should ideally be in BMP, TIFF or GEOTIFF format. Images can be acquired from many sources on the internet and they can be acquired for free or they can be purchased. There have been many programs created for the purpose of downloading satellite and aerial imagery both for Flight Simulator scenery design and more general purposes. For FSX design there is SBuilderX, FSEarthTiles, TileProxy and probably many more. Then there is Google Earth, Bing Maps, Yahoo Maps, USGS, SIX maps etc.
 
Geographical Information about that image - You will need to know the left and right boundaries and the top and bottom boundaries of the image in degrees. These will need to be in Decimal Degrees (eg 146.35245623). If you have coordinates in Degrees, Decimal Minutes (eg -32 Degrees 7.32') they can be converted to Decimal degrees:
 
Eg. 146 degrees 55.27 minutes
 
The minutes in degrees work the same as minutes in an hour with regards to time; ie there are 60 minutes in 1 degree.
 
So, 55.27 divided by 60 = 0.921167
 
=146.921167
 
 
You will also need to know the xdim (Size of each pixel in the X direction (Longitude) in degrees), and ydim (Size of each pixel in the Y direction (Latitude) in degrees).
 
Again these can be calculated.
 
Eg. Image Size: 23552 x 24832 pixels
 
Left Longitude download=146.898193359375
Right Longitude download=147.15087890625
Top Latitude download=-36.5780409982876
Bottom Latitude download=-36.7916906158468
 
Note: The minus symbol indicates this latitude is South of the Equator.
 
First work out the size in degrees by subtracting one boundary value from another for x Longitude and y latitude.
 
xdim: 147.15087890625-146.898193359375= 0.252685546875
 
0.252685546875/23552(number of pixels in the x direction)
 
= 0.0000107288360595703125
 
ydim: 36.7916906158468-36.5780409982876= 0.2136496175592
 
0.2136496175592/24832(number of pixels in the y direction)
 
= 8.6038022535115979381443298969072e-6
 
This xdim and ydim will give about a 1 metre per pixel resolution.
 
 
Note: A vital source of information regarding the Resample tool and photo scenery is the FSX SDK manual. All of the relevant information can be found under: Environment Kit - Terrain SDK - Terrain and Scenery - The Resample Tool. There is a table in this section showing QMID, LOD and Pixel Degrees values. According to other sources and my own experiences, these values should not be used as they tend to produce inaccurate results. The table can be used to roughly work out what resolution the imagery is according to the xdim and ydim values, but you should either work out the values as shown above or if applicable, use the values provided in a world file downloaded with the image.
 
Note: If you have a GeoTiff, all of the above information is already in the GeoTiff, and does not need to be worked out.
 
 
 
 
 
The Process:
 
Basically you create an INF file (Setup Information File), which is like creating and filling out a form, which will tell the Resample Tool what image to process and how to process it. There are many parameters available (see fsxsdk.chm), but they are not all required. The following are two sample INF files, one for a single image and one for a multisource (multiple images) INF. If you plan on having blend mask, water mask, seasons or night then you will need to use a multisource INF file. Create an INF file by opening a new text document in Windows Notepad, and either copy the following or start from scratch. Now save the document with .inf replacing .txt.
 
 
---------------------------------------------------------------------------------------------------------------------------------
Sample Single source .INF file
----------------------------------------------------------------------------------------------------------------------------------
 
 
 
[source]
 
Type = BMP
SourceDir = "."
SourceFile = "Melb_Nth_BL2.bmp"
Layer = Imagery
Variation = All
NullValue = ,,,,0
ulxMap = 144.912410
ulyMap = -37.733835
Xdim = 5.364418029770934e-6
Ydim = 0.0000042847196375
PixelIsPoint = 0
SamplingMethod = gaussian
 
[Destination]
 
DestDir = "C:\Users\Scott\Desktop\GSMD_Projects\bgls"
DestBaseFileName = "18_Melb_Nth_BL2_gsmd"
DestFileType = BGL
CompressionQuality = 85
LOD = Auto
 
 
 
 
----------------------------------------------------------------------------------------------------------------------------------------
Sample MultiSource .INF file
----------------------------------------------------------------------------------------------------------------------------------------
 
 
[source]
Type=Multisource
NumberOfSources=4
 
[source1]
Type = TIFF
Layer = Imagery
SourceDir = "."
SourceFile = "MtBuffaloEast1Z17a_SpringandFall2.tif"
Variation = March,April,May,September,October,November
Channel_LandWaterMask = 3.0
Channel_BlendMask = 4.0
ulxMap = 146.89812854588318
ulyMap = -36.57760630018873
Xdim = 0.00001072883606
Ydim = 0.000008592024045
PixelIsPoint = 1
NullValue = ,,,,0
 
[source2]
Type = TIFF
Layer = Imagery
SourceDir = "."
SourceFile = "MtBuffaloEast1Z17a_Winter2.tif"
Variation = December,January,February,June,July,August
Channel_LandWaterMask = 3.0
Channel_BlendMask = 4.0
ulxMap = 146.89812854588318
ulyMap = -36.57760630018873
Xdim = 0.00001072883606
Ydim = 0.000008592024045
PixelIsPoint = 1
NullValue = ,,,,0
 
[source3]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "MtBuffaloEast1Z17a_Water_96dpi11px.tif"
ulxMap = 146.89812854588318
ulyMap = -36.57760630018873
Xdim = 0.00001072883606
Ydim = 0.000008592024045
SamplingMethod = Gaussian
PixelIsPoint = 1
NullValue = ,,,,0
 
[source4]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "MtBuffaloEast1Z17a_Blend_96dpi11px.tif"
ulxMap = 146.89812854588318
ulyMap = -36.57760630018873
Xdim = 0.00001072883606
Ydim = 0.000008592024045
SamplingMethod = Gaussian
PixelIsPoint = 1
NullValue = ,,,,0
 
[Destination]
DestFileType = BGL
DestDir = ".\bgls"
DestBaseFileName = "MtBuffaloEast1Z17a_260514"
CompressionQuality = 85
LOD = Auto
MaxAutoLOD = 16
 
 
 
 
 
 
Going through the sections of the Multisource INF file:
 
 
[source]
Type=Multisource
NumberOfSources=4
 
Required when there is more than one source
 
Type = TIFF
 
Can be Tiff, GeoTiff, BMP, RAW, TGA
 
Layer = Imagery
 
Imagery for photo scenery in sources containing imagery you want to appear.
 
None for Blend mask and Water mask sources.
 
SourceDir = "."
 
Directory on PC where the file is located. "." indicates file is in the same folder as the inf file and Resample tool. This could also be written as the full location of the directory where the source (image) is located. eg "C:/Users/Admin/Desktop/Metropolis_Photo_WorkFolder"
 
SourceFile = "MtBuffaloEast1Z17a_SpringandFall2.tif"
 
Name of the image file, including the extension (.bmp, .tif etc)
 
Variation = March,April,May,September,October,November
 
Can be a month to represent a season, Day for any daytime, LightMap or
 
Night for night, All to appear at all times.
 
Channel_LandWaterMask = 3.0
 
Indicates the source number and band number of the water mask channel. Should come before Channel_BlendMask.
 
Channel_BlendMask = 4.0
 
Indicates the source number and band number of the blend mask channel.
 
ulxMap = 146.89812854588318
 
Left (West) boundary coordinate in Decimal Degrees.
 
ulyMap = -36.57760630018873
 
Top (North) boundary coordinate in Decimal Degrees.
 
 
Xdim = 0.00001072883606
 
Size of each pixel in the X direction (Longitude) in degrees.
 
 
Ydim = 0.000008592024045
 
Size of each pixel in the Y direction (Latitude) in degrees.
 
PixelIsPoint = 1
 
Can be either 0 or 1. 0 indicates top left coordinates given are at the top left corner of the top left pixel. 1 indicates the top left
 
coordinates given are in the middle of the top left pixel. Usually 0 if coordinates are manually acquired or Left, Right, Top, Bottom coordinates
 
are used. 1 if coordinates are acquired in that form via a world file or similar.
 
NullValue = ,,,,0
 
Sample value for each channel indicating that there is no data in the current pixel. For imagery sources use a comma-separated list:
 
red,green,blue,[,land/water[,blend]]. The 0 represents black.Above value is generally regarded as most common and can reduce the size of the final bgl
 
file.
 
SamplingMethod = Gaussian
 
Used when using a blend mask or water mask.
 
CompressionQuality = 85
 
Value between 0 and 100. 100 is maximum quality and file size. 85 keeps most quality but reduces file size quite a bit.
 
LOD = Auto
 
Level Of Detail -Indicates the final output resolution. Can be Auto or a range of values. eg 6,17 will give a file with LOD minimum 6 and maximum
 
17. It should never be a high number only, as the scenery would only appear at the high LOD when the user is very close.
 
MaxAutoLOD = 16
 
A number can be used here to limit the maximum output bgl's LOD if LOD = Auto is used. Reducing the maximum LOD will reduce file size and also
 
quality.
 
 
 
 
 
 
How to make a Blend Mask:
 
 
Open the image you want to blend with an image editing program. Select the area to blend out using free select tool etc. Try to follow boundaries in the scenery; ie roads, rivers, treelines, fencelines etc to make it appear natural. Use the bucketfill tool to fill the area youdon't want to appear in FSX with Black. Invert the selection and fill the area you want to appear with white. You can use a guassian blur effect or feathering to blur the transition from black to white. This can be used to soften the edge of the photo scenery, making it appear more naturally in the surrounding landscape. Any grey area in the blend mask will make the scenery partially transparent in that area, the level of transparency being dictated by the darkness of the grey. This can be saved as a greyscale (grayscale) image.
 
 
 
 
How to Make a Water Mask:
 
 
Open the image you are working on with an image editing program. Select any water with the free select tool etc. Fill the water areas with black. Invert the selection. Fill the land area with white. There is usually no need for any blurring with a water mask. It can just be black and white. This can also be saved as a greyscale image.
 
 
 
 
 
Now the easy part:
 
 
Open a new work folder. Take all the images you want to run through the resample tool to create your scenery bgl. So to have a scenery with 4 seasons, night, blended, and with a water mask, you would have 7 images, requiring a 7 source INF.Make a copy of resample.exe from the FSX SDK and put it in your folder.Fill out the required fields in an INF file with the appropriate number of
sources. The water mask and blend mask should always use the last two sources.To start the process, just drag the inf file on to resample.exe and it should start to process.
 
An even better way is to create a batch file with the pause command, so if any errors occur, the program will pause so you can see what the problem is. Just type the following in a new text document:
 
resample.exe NAMEOFINFFILE.inf
Pause
 
save this file as resamplelog.bat
 
Now just open this (double click) to run the resample tool with the inf file you specified. This is also very handy if you're processing multiple inf files as you can run the batch file and it will run resample.exe as many times as you have listed it.
 
eg.
 
resample.exe NAMEOFINFFILE.inf
resample.exe NAMEOFINFFILE2.inf
resample.exe NAMEOFINFFILE3.inf
resample.exe NAMEOFINFFILE4.inf
Pause
 
 
 
Please feel free to ask anything or add anything regarding photo scenery in this thread.
 
 
Cheers,

 

Edited by scottharmes6

Share this post


Link to post
Share on other sites

Hi I have fixed up a few grammatical errors I made in this. If anything needs further explanation please let me know and I will add more to it. Any questions regarding creating photo scenery can be posted in this thread.

Cheers,

Share this post


Link to post
Share on other sites

hey guys

I.m wanting to get into scenery  building. airports and iconic aussie places. I do a lot of traveling with my job so have access to some excelent photo texture. opportunities.

Is this info current for p3dv4 ?

also

layering above the likes of orbx or ants (great airports i.ve seen updates to the real ones he has produced) even adding too.. i get the adding into fs settings hirachy . will i have to recreate all new and delete their objects ?

this part i havent researched as such. dont want to step on toes and up set before i even start .

cheers Pete

Share this post


Link to post
Share on other sites

Does anyone want pics of shute harbour ( airlie beach) airport .

i will be there in a few weeks . i can get all the pics you need .

It has been upgraded from Ants version .

I'm no where near that level if any for that project , i wish .

Share this post


Link to post
Share on other sites
On 08/10/2017 at 1:06 AM, vh-eee said:

hey guys

I.m wanting to get into scenery  building. airports and iconic aussie places. I do a lot of traveling with my job so have access to some excelent photo texture. opportunities.

Is this info current for p3dv4 ?

also

layering above the likes of orbx or ants (great airports i.ve seen updates to the real ones he has produced) even adding too.. i get the adding into fs settings hirachy . will i have to recreate all new and delete their objects ?

this part i havent researched as such. dont want to step on toes and up set before i even start .

cheers Pete

 

Hi Pete,

Just saw these posts, so I will try and answer.

This info is current for P3D V4.  There is not much  (or zero that I'm aware of) difference between the way the sims handle photoscenery from FSX through to P3D V4.  I haven't really investigated,  but if you want  more info the P3D V4 SDK manual would be the best source.  Especially the "Terrain and Scenery" section.  To ensure compatibility with all sims from FSX up it is probably recommended to use the FSX SDK tools such as the resample tool.  I think any version of the resample tool should be fine though.

Regarding the layering thing, you probably shouldn't actually delete anything from an addon airport etc. Basically you should not alter any other persons work without their prior permission.   You can always add an object that wasn't there previously.  That should be fine and does not require you to interfere with existing files.  You can simply create an addon for an addon.  You are free of course to create any airport from scratch, but another persons work can not be altered without their permission.  You are also free to contact the author for that permission and you may find they are willing.

Hope that clears things up.

Also regarding any photos, designers are always after photos, so any are great.  If you wish you can just share them in the Scenery Design forum, or share them privately with an interested designer if that suits.

 

Cheers,

Scott

Share this post


Link to post
Share on other sites

cheers Scott .

i have read a bit more into the use and changing peoples scenery on this site .. a moral and forbidden no no

Thanks ao much for the conformation though .

i.ll defenatly look into posting some pics up of recent photo shoots of airports . even if this only lends info on what more could be required if they are not usefull to anyone.

looking forward to trying my hand a scenery and if its amy good ...

thanks again

Share this post


Link to post
Share on other sites

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


×