Page 1 of 3

Making custom ground textures

Posted: Fri Jun 29, 2007 4:49 pm
by luisfeliztirado
SBuilder X will create custom ground directly from the background image. There are different methods:

1. A quick and simple method - SBuilder X will take the images in the present workspace and automatically convert them into a custom ground bgl.

The SBuilder X workspace is 1792 x 1280 pixels in size and that will be the extent of the custom ground, although the resolution will depend on the zoom level of the background.

SBuilder X will also apply a simple blend mask that will blend the custom ground into the default textures along a thin band on the edge of the image.

To create custom ground textures by this method, right-click on the SBuilder X workspace:


Select the "Background ..." option to get this window:


You will have 2 options: either immediately compile the custom ground from the workspace, or save that workspace as a GeoTIFF image file;

By selecting "Compile", SBuilder X will launch the Microsoft Resample program and create the custom ground bgl:


Once your custom ground file has been created, you can change the name of the bgl to something more descriptive.

2. The second method for creating custom ground textures - you can select the precise area for which you want custom ground, SBuilder X will make it into a Map (with its own calibration text file), and that Map can be selected and compiled into a bgl. The Map can also be edited to correct colors, add transparent areas, or as a basis for creating blend masks and water masks.

First, you should zoom out so that the entire area of your choice is visible in the SBuilder X workspace. Then, go to the File-Add Map-From Background:


This will bring up a selection window:


You can draw a selection rectangle directly over the image to select the area desired, and also choose the zoom level you want.

Once you have done so, Builder X will create a Map of this size and with this coverage, and display it in the workspace instead of the Background image.


Any part of the selection for which there are no tiles will display in pure white (RGB values = 255,255,255) and will serve as a Null Value, that is, will be completely transparent and display the underlying terrain.

Be careful, as other parts of the image may also have pure white pixels, and they too would be completely transparent, so you may want to edit the Map in any image editing program first before compiling into custom ground.

If you right-click on the edge of the Map, you can bring up its Properties window:


Note that SBuilder X will give the Map a name that begins with "Photo". This is the name that will be given to the final bgl. You can change the name of the Map to anything that you wish, but it must start with "Photo" so that SBuilder X can recognize it as a source for custom ground. Once the bgl has been created, you can change its name.

If you decide to use the Map to create seasonal or night variants of the image, you can indicate them in the second tab of the Map Properties window:


To add blend masks or water masks to your custom ground, you can create them using the original image as a basis, and then save them with the same name, but using a suffix to indicate this. The files should be saved as TIF images, for example:

original image - L17X132735X132743Y90177Y90183.BMP

blend mask - L17X132735X132743Y90177Y90183_B.TIF
water mask - L17X132735X132743Y90177Y90183_W.TIF

Make sure that those files are in the SBuilderX\Tools\Work folder even if the original image is in another folder, and SBuilder X will automatically integrate the blend and/or water mask in the custom ground.

A word about Compression Quality: FS X allows for varying the compression of the final bgl. It has been determined that reducing the Compression Quality parameter from 100 to 85 will greatly reduce the size of the final bgl (up to a quarter of the original size) as well as the time needed to compile it. You can change the Compression Quality in the SBuilder.ini configuration file.

To create the custom ground bgl, simply select the Map (either by clicking on its edge, or by using the Select menu) and click on the BGL Compile icon (the green arrow) on the tool bar, which will bring up the Compile window:


Compile as usual to get the bgl.

Posted: Fri Jul 06, 2007 4:32 pm
by TFLeonard
I'm trying to created water and blend masks per this post's instructions. I opened each BMP in Photoshop and created a water mask in a sepeerate layer and filling in the water areas with black and leaving the rest alone.

I then deleted the original photo layer leaving my water mask layer as the sole layer in the file (by flattening).

I then changed the file into a 1bit bitmap and saved it as a Tiff file with LZW compression in the same Sbuilder "work" folder as the original BMP.

I added "_W" to the end of the filename so that sbuilderX would include the water mask when creating the resample .inf file.

I repeated the steps above for the blend mask, except that I saved it out as a 8bit Tiff file to preserve the grayscale soft edges.

When I run resample, I get an error message for the water mask:

"GeoTiff: unsupported sample format (1) and/or bits (1). Unable to open data source ..."

I tried saving the water mask out as uncompressed, and tried converting it to 8 bit, and RGB(24bit), but I still get the error message.

Anyone know what I'm doing wrong or what the TIFF settings should be for each file?

Posted: Sat Jul 07, 2007 12:35 pm
by luisfeliztirado
Resample accepts a limited number of image formats.

Here is some information from Adam Szofran, developer in charge of terrain at Aces:

<b><u>geotiff and alpha channels</u>

Photoshop can add an arbitrary number of alpha channels to TIFF images, but of course it strips out the GeoTIFF tags which isn't too wonderful. The listgeo tool can be used to save the GeoTIFF tags before loading the image into Photoshop and the geotifcp can be used to put the tags back after Photoshop works its evil.

If that proves to be too much of a pain, then you can actually read the alpha channels (water mask and/or blend mask) from one or more separate files. I've attached an example showing how to do this. It's a modification of the DayNight_Variations example in the Terrain SDK. Unzip it into the Terrain SDK directory because it references some of the source bitmaps included there. The key thing is the use of Channel_BlendMask=[<source>.]<band> and Channel_LandWaterMask=[<source>.]<band> to pull channel data from different source files.

The masks are just regular 8-bit grayscale TIFF files (not GeoTIFF, although those would work too). Unfortunately, you can't use 8-bit grayscale BMP files with Resample but TIFFs work great.

Here are a few things to keep in mind about the land/water masks. White (255) is land; black (0) is water. If you want the default water color to show through, you must paint entirely black (RGB=0,0,0) pixels into the the source image containing the color channels. Anything other than black will be used as is but with reflective water effects. That's how we got the water colors from the satellite imagery of St. Maarten to show through near the shore. We used a blend mask to fade out the satellite image water colors and fade in the default water colors further offshore.

<u>water mask</u>

With the FS9 Resample tool, the water mask punched a hole in your image to reveal default water beneath.

With the FSX Resample tool, we wanted to allow more flexibility, so we changed how the water mask works and we also added a blend mask. Now the water mask triggers reflective and specular water effects, but it doesn't punch a hole in your image. The benefit of this is that you can now paint the water any color you want. For example, if your source imagery contains murky brown swamp water, you can now get the muck to show up in FSX with reflections and specular effects.

If you'd rather just see the default water colors, you have to use a blend mask to punch a hole in your image to reveal the default textures below. Note, however, that the default textures revealed by the blend mask might not be water; they could very well be land textures! Therefore, if you want to guarantee that the blend mask will expose default water textures, you need to create a water polygon (a big square one will do) that covers the area where you want water to appear. For information about creating water polygons, look for the documentation of the shp2vec tool in the FSX SDK.</b>

And this from the Terrain S.D.K. documentation:

<b><u>Notes on Acquiring Raw Terrain Imagery</u>

More than likely, the image you want to use will be an aerial or satellite photo. The raw image must be either a 24-bit per pixel Windows .bmp file or a 32-bit per pixel Targa .tga file.</b>

Posted: Sat Jul 07, 2007 8:36 pm
by Artur Santos
Great tutorial, Luis. I just made my first photoreal scenery after reading it. I don't know how to make the night textures though. At night, the Google image i used for the scenery doesn't blend with the default night textures because it is a daylight photo.

Thanks for teaching me how to make my first scenery. [;)]

Artur Santos

Posted: Tue Jul 10, 2007 5:10 am
by Supercar1000
It's impossible to select a big area like that with a zoom of 17... there is alway an error...

Posted: Wed Jul 11, 2007 12:48 am
by Artur Santos
Will reducing the compression quality from 100 to 85 also reduce the visual quality of the final scenery?

Artur Santos

Posted: Wed Jul 11, 2007 12:45 pm
by luisfeliztirado
Olá Artur,

Why don't you give it a try and see? I cannot tell the difference, but perhaps someone who has more experience with image analysis will see it.

Best regards.


Posted: Thu Jul 12, 2007 7:50 pm
by xhenry
Hi All!

I am having some problems with the second photo scenery tutorial using the add map from background feature.

I have gotten as far as selecting the area i would like to make scenery for (at zoom 15, 56 * 40) but when it comes time for it to display it on the screen, i get an error saying:
"cannot display maps! map view was turned OFF!"
Then i am left with a blank screen... I have the all map display checked, but each time it gets unchecked at this point...

Can someone shed some light on this???

Thanks in advance,

Posted: Thu Jul 12, 2007 10:51 pm
by Luis Sa

And what about the 28 x 20? Does it work? When I was developping SBuilder I add a 112 x 80 option and I got the message "unable to display maps". At 56 x 40 I was ok. I could generate a photo BGL. So I removed the 112 x 80 option and left the maximum size as 56 x 40. I think that the problems that you refer to depend on the resources of your computer.



Posted: Fri Jul 13, 2007 12:12 am
by xhenry
thanks for the response!

However, even with smaller areas it still does not want to generate the map file giving the same error.


Posted: Fri Jul 13, 2007 2:30 pm
by Luis Sa

In that case you need to give more details. Open a project & try to get the background and if the error appears export the project as a SBX file and send it to me or post it here. Also check if the file has been created in the ../Tools/Work folder.


Posted: Sat Jul 14, 2007 5:25 pm
by Artur Santos
Luis, my computer has 2GB RAM, i have a 512MB graphics card and this error happens all the same. Maybe it is not related to computer resources.

Artur Santos

Posted: Sat Jul 14, 2007 6:03 pm
by Luis Sa
OK Artur,

I will check your error. But you should describe exactly (step by step) what you are doing and tell me what is the stage that gives the error.


Posted: Sun Aug 05, 2007 7:51 am
by ronshani

I just made my first FSX photo scenery. It is the lowest place on Earth, the Dead Sea in Israel (altitude -405m). Available at

How do i add Autogen to a photo scenery?

Ron Shani

Posted: Sun Aug 05, 2007 12:46 pm
by luisfeliztirado
Hello Ron,

Please see <b>Using the Autogen Annotator</b>, available in the Avsim library

Best regards.