About
Requirements
Screen shots
Movies
User Manual
Downloads
Updates
Buy
Scenery
Vehicles
Tools
Creating scenery
Creating vehicles
User survey
Forum
Links


Scenery Tools


Vehicle Simulator comes with several utility tools for assisting model and scenery making.

These tools can be found inside the tools directory of the program, you can also download the tools here.

The following section explains the available tools for Vehicle Simulator and their use.

Vehicle Simulator 2.0 already containes some of these tool inside the program itself, scenery importing is done automatically and also aerial navigation aids are imported automatically by the program for each new scenery detected.


The Model Encoder

The model encoder utility model_encoder.exe converts DirectX mesh files ( .x ) to encoded files read by the program ( .xx ),
This tool allows authors to protect their work against unauthorized use by others or for different purposes.

The x file format is an public format it can be converted and re used, the xx file is encoded by the model encoder and decoded by Vehicle Simulator, it is read whenever an .x file is expected, so you can simply replace the .x file with the encoded .xx file.

Encoded models are read for all models used by the program, for scenery and vehicles as well.

Using the model_encoder:

  1. Run it from the tools directory of the program
  2. Press "Open Directory" and browse to the directory where the models are stored.
  3. Press "Encode Files", the files are encoded in place, you will see these files with prefix of .xx.
  4. You can now remove the original .x files and the encoded files will be used by the program.


The matrix resize

The matrix resize matrix_resize.exe resizes a binary matrix to a size of your choice, this tool is particularly useful for resizing matrix which is too large or too small to fit into the resolution or disk size you want.

The result of this resize is a change of the digital elevation resolution, for example if you have a huge terrain matrix with resolution of 10 meter per elevation point you can resize the matrix by a factor of three, this will result in a matrix file with almost one tenth the size and an excellent resolution of 30 meters per elevation point.

You can also use this tool to resize a matrix with an odd scale that doesn't fit your scenery or matrix editor well, and make it smaller and more rectangular in shape.

The tool reads the terrain matrix and the header file and outputs the files out.bin and out.hdr in the same directory.

Using the matrix resize:

  1. Run the matrix resize from the tools directory of the program.
  2. Press "Load Matrix" and select the terrain matrix of your choice.
  3. Once the matrix is loaded the width and height will appear on the top row.
  4. Type the setting of your choice on the bottom row and press "Save Matrix".
  5. Check the directory you loaded the matrix from and find the output files.
  6. Move the original files to another location and run Vehicle Simulator.
  7. The new files are used instead of the original.


The matrix editor

The matrix editor matrix_editor.exe is used to open and edit a binary terrain matrix, this tool can be used to create artificial places, smooth noise elevation data, flatten areas before creating runways upon them, coastline correction and more.

This tool opens binary terrain matrix and header file and edits them in place, it can also compress the matrix and prepare it for the matrix unpack utility typically used to uncompress and install large scenery files.

Using the matrix editor:

  1. Run the matrix editor from the tools directory of the program.
  2. Press "Load Matrix" and select the scenery of your choice.
  3. The matrix of the scenery will appear onscreen in topographic colors.
  4. Pan the map using the left mouse button and drag to an area you wish to edit.
  5. Press "Zoom In" or "Zoom Out" until the area is clear and detailed enough to edit.
  6. The coordinates and elevation of the point you edit appears inside the East, North and Elevation text boxes.
  7. Select the action you wish to perform on this point using the Change, Smooth, Add, Subtract selection boxes.
  8. Type in the radius of your edit brush inside the brush radius box, this will effect an area around your mouse pointer.
  9. Type in the opacity of your brush inside the opacity box, this will effect the strength of action done with each stroke.
  10. Type value you wish to add, subtract or set inside the elevation box.
  11. Move the mouse on the points you edit and press the left mouse button for each stroke.
  12. The result of your action will be visible directly onscreen just as it would in a painting program.
  13. Save the matrix using "Save Matrix" and select a name for it, optionally saving on the old one.
  14. To compress the matrix press "Compress" and select the matrix from the file you saved, this saves a jpg and an rle file pair.
  15. To uncompress a compressed file press uncompress and select the RLE file of the compressed pair, the binary matrix file is restored.
  16. To edit depth maps select "Show Depth Map", this will edit only the negative values of the map.
  17. To change the color palette, fill minimal and maximal altitudes and press "Update Palette".
  18. You can save the depth map as grayscale image, edit it and load it into the depth of the matrix, use the "Save Depth" and "Load Depth" functions.
  19. The depth.jpg file is the saved depth map, the scale is determined by the minimal and maximal altitude values rounded to nearest 256 division.
  20. For example if the minimal altitude is -450 the nearest 256 product is 512, so the scale of the grayscale palette is 2.
  21. So each value in the depth image is palette index multiplied by this scale. ( 450 = 225 x 2 the color will be 225, 225, 225 ).
  22. In depth mode depth values are edited only, you can smooth coastlines for example and it will not effect the land or positive values.


Matrix Compression:

Binary matrix files can be very large, this makes add-on size very big and download times very long, ordinary compression methods do not handle binary matrix files well because the elevation data is arranged two bytes, this means that the fine changes are recorded in the low byte of each two byte pair of the matrix elevation file, and large changes are recorded in the high byte of each pair.

To solve this problem, the matrix compression method in the matrix editor splits the information into two chunks of data, the rough data and the fine data, ( the rough is elevation divided by 256 , the fine if the remainder of this division ).

Then the fine data is compressed by ordinary jpeg compression, and the rough data is RLE ( run length encoding ) compressed, this provide for a lossless compression for the rough data and slightly lossy compression for the fine.

The compressed matrix is split into two files, a jpg file and an rle file, these two files should be shipped together with the header file of the matrix to allow it to restore properly.

To uncompress these files into the original binary matrix file you must have the three files together, the jpg, rle and hdr, then use the matrix editor, or use the matrix unpack utility that comes with the program as well.


The matrix unpack

The matrix unpack matrix_unpack.exe is used to unpack any compressed matrix found in the program, it is used by the program installation itself after install, and can be used after installing every add-on scenery.

Using the matrix unpack:

  1. Run the matrix unpack from the tools directory of the program.
  2. Let it search and uncompress any compressed matrix it finds in any of the sceneries installed.
  3. If you are making add-on scenery, compress the matrix file and include the compressed files ( jpg + rle + hdr ) inside your scenery instead of the large binary matrix file, then create an installed for your scenery and make it run this tool after installation.


The X Files Converter 

Vehicle simulator uses the DirectX format for 3D model files, typically these files are generated by 3D modeling software and saved in the very popular 3DS format, from this format they can be converted to DirectX files using a converter created by Microsoft called Conv3ds.

Conv3ds can be downloaded on this link:

To use conv3ds you need to run a command shell on the directory containing the model file and the converter, use the command conv3ds followed by the name of your file, for example "conv3ds glider.3ds" and a file called glider.x will be created.

To start a command shell, press on your computer Start -> Run and then type cmd, a command shell will open, change the directory using DOS commands like, "cd \work" etc.., a typical command shell looks like this:

Converting from other software

Some modeling software have their own X Files exporters, for example if you are using the excellent 3D Studio Max you can use the Panda Exporter plug-in, to download the panda exporter use this link.

Download here    Pandasoft    or here    Panda Exporter for 3D Studio 9


The KML Importer

The KML importer kml_import.exe is used to import roads, objects and polygons made using Google Earth into Vehicle Simulator, this tool provides easy and standard way of designing roads, objects and areas for Vehicle Simulator, it is recommended to use this tool instead of the scenery designer, as this tool can be used to convert files you can edit using Google earth.

This tool is for advanced users only, it is recommended to use the program internal scenery editor to visually place objects and roads, this tool helps if you wish to place objects using google earth, the abs_objects.txt created by it requires additional work using the program scenery design mode, but gives you the match between google eath coordinates and scenery positions inside the program.

This tool opens and converts KML files exported from google earth, and saves them into a file called abs_objects.txt, this file can be edited by hand and added to the scenery objects using the command "add absolute file".

Using the KML importer:

  1. Open Google Earth and view the area of your choice.
  2. Add folder under "My Places" in Google earth..
  3. Add Path, Place mark or polygon under this folder.
  4. Name each object you make as you would name it in the objects.txt ( road_a.bmp, buildrw1.x, etc.. ).
  5. Select "Save place as" on the folder you created and save it as KML file inside your scenery.
  6. Run the KML importer and select this KML file.
  7. A file called "abs_objects.txt" is created and you see a map of the objects you have made.
  8. Examine the file created and adjust names, scales and angles of the objects listed there.
  9. Start Vehicle Simulator and select objects design, then load the absolute file you created.

Google earth provides easy way to lay your objects and roads in place.

The exported objects appear as a map inside the KML exporter.


The NAV Importer

The NAV importer nav_import.exe is used to create a navigation aids file navaids.txt for your scenery.

This tool is for your reference only, by default the program imports navigation aids when "navaids.txt" file is not found inside the scenery.

This tool uses a data file called earth_nav.dat which contains the list of known navigation aids for the whole world, to use this tool you must enter the coordinates of your scenery and then select this file and load it, the result is saved into the tools directory into a file called navaids.txt, you must take this file and move it inside the scenery you are making in order for it to be used as navigation aids file.

Using the NAV importer:

  1. Run the nav_importer.exe from the tools directory.
  2. Enter the extents of the scenery you are making in the form min max longitude and latitude.
  3. Press Import File and select the file called earth_nav.dat.
  4. Take the file called naviads.txt created inside the tools directory and move it inside the scenery you are making.


The Vehicle Simulator Scripting Language (VSSL)

The Vehicle Simulator Scripting Language is a simple yet high level scripting language allowing complicated missions and scenarios to be created for Vehicle Simulator, a full description of the scripting language is available here, this scripting language was added since version 1.6.

The VSSL documentation

Some samples are available inside the scripts directory inside the program, some demo situations are also available as part of version 1.6.

 

Scenery Basics Scenery Elevations Scenery textures Scenery Vegetation Scenery Objects Scenery Tools


Copyright Ilan Papini 1999 - 2008 ©
All Right Reserved