Customizing X-Plane 8's Default Scenery Artwork

	Revision History
		 5/08/05	Initial Draft

This tutorial explains how to create a custom scenery package that replaces some of X-Plane 8's default graphics with customized ones.

What you need to do this tutorial:

Before you begin you will need the following:

  • An installation of X-Plane 8.11.
  • A good text editor.
  • A good image editor that can edit PNG files.

Overview of the Process.

The basic steps to this process are:

  1. Clone a new version of the roads scenery package.
  2. Add night textures to the default road textures.
  3. Copy the urban texture from the default scenery to our package.

Cloning the Roads Scenery Package

To start this tutorial, we'll make a copy of the default X-Plane roads scenery package that we can modify.

1. Copy the folder 'x-plane roads' (found in the Resources/default scenery folder) into the 'Custom Scenery' folder, and rename it 'new artwork'.

From this point on we will make all of our changes to this newly copied 'new artwork' folder. Even though 'new artwork' is going to contain no DSF files, it still acts like a custom scenery package; X-Plane will search it before the default roads folder when it looks for road definitions.

How does X-Plane know how to find roads in our new scenery package? Well, we copied the "library.txt" file from the default roads folder; this library.txt file tells X-Plane what useful things are in our package. We'll use this file later to add some terrain textures.

Adding Night Textures to the Roads

The default roads do not contain lit textures, but we can add them. First we must tell X-Plane where to find our lit textures.

2. Open the text file road.net. After each TEXTURE command add a TEXTURE_LIT command.

The end results should be:

TEXTURE 3 highway.png
TEXTURE_LIT highway_LIT.png
TEXTURE 3 secondary.png
TEXTURE_LIT secondary_LIT.png
TEXTURE 3 local.png
TEXTURE_LIT local_LIT.png
TEXTURE 0 highway.png
TEXTURE_LIT highway_LIT.png
TEXTURE 0 secondary.png
TEXTURE_LIT secondary_LIT.png
TEXTURE 0 local.png
TEXTURE_LIT local_LIT.png
3. Create _LIT variants of the local, highway and secondary PNG files with night lighting.

How you make lighting textures is up to you; for the purpose of this tutorial I've made some pretty ugly ones just to save time, which you can grab here if you want:

Adding a New Customized City Texture

We can also override the default city texture from our new scenery package. We'll need to copy the related files from the default resources folder to our custom scenery package.

4. Copy the files border.png and urban.ter from Resources/default scenery/x-plane terrain to your custom scenery package.

A ".ter" file is a terrain info file - a text file that tells X-Plane how to draw terrain. It refers to the various bitmaps needed to draw the terrain and also has settings. We'll start by copying the existing urban terrain file.

5. Modify the urban.ter file.
	A
	800
	TERRAIN

	BASE_TEX urban.png
	LIT_TEX urban_LIT.png
	BORDER_TEX border.png
	PROJECTED 4000 4000
	NO_ALPHA

We are modifying the terrain file to have a base texture and a lit overlay, but no "composite" layer. The NO_ALPHA directive tells X-Plane to ignore any alpha channel (should we have one), and the PROJECTED directive tells x-plane that one copy of this texture should cover a 4000x4000 meter square.

6. Create a new 1024x1024 city terrain texture called 'urban.png'.
7. Create a new 1024x1024 city light map texture called 'urban_LIT.png'.

Again I have created two quick urban textures just for demonstration purposes in this tutorial.

Urban.png was made by copying and cutting out an area of orthophoto from the KSBD area via TerraServer-USA. urban_LIT.png was created by applying photoshop color-response curves and some blur filters to bring out certain details with a yellowish tinge.

8. Add a new line to the library.txt file in your custom scenery folder.
A
800
LIBRARY

EXPORT lib/us/roads.net road.net
EXPORT lib/terrain/urban.ter urban.ter

How is X-Pane finding all of this stuff? The answer is the library.txt file in our scenery package. This is a directory telling X-Plane what items we are providing. The first line tells us that the scenery resource "lib/us/roads.net" can be found in the file "road.net" in the root of our scenery package. The second tells us that the scenery resouces "lib/terrain/urban.ter" can be found in the local file "urban.ter" in the root of our scenery package.

The first path in these "EXPORT" directives are the virtual path, a file path into an imaginary scenery package that is then translated by X-Plane into many real scenery packages by library files. How would you know the correct virtual paths? Just look in the library.txt files of the default scenery to see what we've named our various scenery objects and terrains. Almost every art resource that is included in X-Plane for default scenery has a virtual path.

Viewing the results.

To use the results, just have your custom scenery package in the custom scenery folder and start X-Plane.

KSBD metro area - no objects or roads, day.

KSBD metro area - no objects or roads, night.

KSBD metro area - insane objects and roads, day.

KSBD metro area - insane objects and roads, night.

KSBD metro area closeup - insane objects and roads, day.

KSBD metro area closeup - insane objects and roads, night.

You can grab the entire custom scenery package from this tutorial here: new_artwork.zip.

Postscript: File Name Flexibility

It is worth noting that the file names in X-Plane 8's scenery system are for the most part not fixed! Here are some of the ways you can pick your own file names if you so desire:

  • You can name your custom scenrey package anything you want.
  • Your roads.net file can have any file name with the .net extension, as long as the second filename in the library.txt file matches it. (This is the local path of the library.txt file and can be varied. The virtual path lib/us/roads.net must be kept the same.)
  • The textures for the roads.net file can be anything - simply make sure the TEXTURE command in the text .net text file matches your PNGs. (This is just like an OBJ.)
  • The lit textures for the roads do not have to have the same names as the daytime textures - again, any file name refered to by the TEXTURE_LIT command is allowed.
  • The urban.ter file can have any file name with a .ter extension as long as the second filename in the library.txt file matches it. The virtual path lib/terrain/urban.ter is fixed.
  • The bitmaps that urban.ter refers to can have any file name as long as urban.ter matches your PNGs. Lit textures can have any name refered to by the TEX_LIT command.

You also have flexibility of location. For example, if you want to put all of your road items in a subfolder called "roadstuff" and textures in a folder called "urban" you could have this in the library.txt file:

A
800
LIBRARY

EXPORT lib/us/roads.net roadstuff/road.net
EXPORT lib/terrain/urban.ter urban/urban.ter
To adjust the package, you would have to move the highway files (highway_LIT.png, secondary_LIT.png, secondary.png, road.net, pylon.png, local.png, local_LIT.png, highway.png, powerline_tower.obj, powerline_tower.png) to the new "roadstuff" subfolder and the terrain files (urban_LIT.png, urban.png, urban.ter, border.png) to the new "urban" folder. Note that the path in library.txt points to the text file - all bitmaps and other items referred to by that text file are found using releative paths, and therefore must go with the .ter or or .net file.

The file library.txt must not be moved or renamed; X-Plane looks for it by name in the root of your scenery package.