Home
Main Features
User Manual
Screenshots
Downloads
How to buy
Updates
Add-on boats
Add-on scenery
Add-on Library
Tools
Boat design
Scenery design
VS forum
User survey
Links
Mirror
Adding new scenery to Virtual Sailor

Adding new scenery and new objects to Virtual Sailor is a very simple task, the program was created especially to allow anyone to create scenery and add new objects into it.

In the following lines the structure of the scenery is explained and suggested tools for adding new scenery are detailed.

The scenery files:

Inside the scenery directory of Virtual Sailor there are one or more subdirectories, each of them containes one scenery area.

Inside each scenery area there are several file types:

Map.bmp - This file is the ground topography for the selected area.

Obj.bmp - This file is the object layout map for the selected area.

Scenery.bmp - This is a small picture of the area.

Scenery.cfg - This file is the basic data of the scenery area.

Land#.bmp - One or topography.

Wave#.bmp - One or conditions.

Nav.bmp - This file is the optional navigation map for the selected area.

Txt.bmp - This file is the optional texture layout map for the selected area.

Txt###.bmp - One or Several land textures that are selected according to layout map.

Depth.bmp - This file is the optional sea depth map for the selected area.

P###.def - One or Several object definition files.

The Nav.bmp file :

The nav.bmp file is a simple bmp file with any size and color count, this file is used for displaying inside the map view and can be made as a read navigation map, it can be much larger than the map.bmp and saved in compressed form.

The Map.bmp file:

The map.bmp file is a simple bmp file with 1024x1024 pixels and 256 colors, the file was made similar to an ordinary map on purpose, each pixel has a color which is directly related to it's height above sea level.

Here is a small portion of the map file enlaged to make the pixels visible,and the color palette used to make it appear as a topographic map.

As you can see the blue color which marks the sea is also the first entry in the palette ( the zero value ) and the following colors are more and more green then yellow then brown just as you would expect in a map.

Each color value is directly related to the hight of this point above the sea level which is the zero value, the ship itself can sail only in the blue areas.

To create your own map you can either import a DEM ( Digital Elevation Map ) into some image editing tool and save it as a map.bmp, or you can simple draw the image or modify it yourself with any image editing tool.

special care must be taken to work on the same palette as this file so as to keep elevations related to their palette values.

The Obj.bmp file :

The obj.bmp file is a simple bmp file with 1024x1024 pixels and 256 colors, the file sppears to be similar to an ordinary map but actually containes different pixel values, each pixel has a color value which specifies which types of objects are located on that location.

The palette of this file is made of colors 1 - 200 which are used for objects definition purposes and of colors 201 - 255 and 0 for the purpose of making it look like a map and have no other purpose.

Here is a small portion of the obj file enlaged to make the pixels visible,and the color palette it uses.

As you can see on the part of the obj file, there are several pixels with red, blue or white colors, these are color values that are in the range of 1 - 200 and therefore are used for creating objects in that place, the rest of the map is ignored by the program and is used only for visual purposes of showing the map view inside the program.

What the colors mean:

When a color value of 1 - 200 is detected, the program searches for a file called p###.def where the number is the color value, for example p200.def for color value of 200.

These files are located inside the models directory and have very simple structure which is explained in the following section.

The Txt.bmp file :

The Txt.bmp file is a simple bmp file with 1024x1024 pixels and 256 colors, the file sppears to be similar to an ordinary map but actually containes different pixel values, each pixel has a color value which specifies which types of objects are located on that location.

The palette of this file is made of colors 1 - 200 which are used for texture layout definition purposes and of colors 201 - 255 and 0 for the purpose of making it look like a map and have no other purpose.

The file is similar in structure and function to the obj.bmp file but the the color indexes are used to determine which custom texture to be used for the given land pixel.

What the colors mean:

When a color value of 1 - 200 is detected , the program searches for a file called txt###.bmp where the number is the color value, for example txt200.def for color value of 200.

These files are located inside the models directory of the program or scenery and have and are used for land texture of the given land tile instead of the default land#.bmp files.

The Txt###.bmp files :

The txt###.bmp files are optional ground texture files that can be used with the txt.bmp layout file, you can have as many as 200 specific textures associated with each sceney and use them to carefully construct an area made of actual aerial photography.

The Depth.bmp file:

The depth.bmp file is a simple bmp file with 1024x1024 pixels and 256 colors, the file was made similar to an ordinary map on purpose, each pixel has a color which is directly related to it's height above sea level.

Here is a small portion of the map file enlaged to make the pixels visible,and the color palette used to make it appear as a topographic map.

The brighter the color is the deeper the sea will be at this point, as the pixel value is used just as the values of the map.bmp file, but only in depth instead of elevation.

To create your own map you can either import a DEM ( Digital Elevation Map ) into some image editing tool and save it as a map.bmp, or you can simple draw the image or modify it yourself with any image editing tool.

special care must be taken to work on the same palette as this file so as to keep elevations related to their palette values.

The def files:

As there are 200 possible color values for object definitions, there may also be 200 different types of def files from p001.def to p200.def located inside the models directory, and also inside each scenery directory.

Each def file defines a single collection of objects and actions that may be located inside a rectangular area that is defined by one pixel on the map ( the default scenery has size of 1km x 1 km for one pixel but this value can be changed as desired ).

The structure of the def file can be seen for example in the p200.def file:

3 number of objects
lighths 0.5 0.5 -0.1 0.0 3.0 3.0 3.0 object parameters
Beam 0.5 0.5 0.24 8.0 255 255 255
Light 0.5 0.5 0.24 0.0 255 255 255
3 number of actions
Fuel action parameteres
RMusic
Sound Horn


The object name can be any name or one of the following:

Light / Sphere / Beam / Night / Array / Smoke - these are illumination objects, for these the parameters are x,y,z location , s object scale , r,g,b object color.

Floating object - the name of the object is a name of an float_##.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , s dummy , x,y,z scale.

Submerged object - the name of the object is a name of an sub_##.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , s dummy , x,y,z scale.

Ordinary object - the name of the object is a name of an object.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , a angle , x,y,z scale.

Group object - the name of the object is a name of an object.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , a angle , x,y,z scale.

This object can be a frame hierarchy and can contain multiple objects inside the same x file, it is ideal to design large areas as single objects, for example a whole port, a whole village etc.

To compile this object from 3ds file, use conv3ds filename.3ds

Animated object - the name of the object is a name of an object.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , a angle , scale, fps, animation_distance.

This object is also a frame hierarchy which contains frame animation, it is animated by itself when animation_distance is 0, and when larger, animated by pressing F11.

To compile this object from 3ds file, use conv3ds -A filename.3ds

Night object - the name of the object is a object.x by day and object_n.x by night, files are located in the models directory and may be related to textures, the parameters are x,y,z location , s dummy , x,y,z scale.

Self lighting object - the name of the object is a name of an night_##.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , s dummy , x,y,z scale.

Glowing object - the name of the object is a name of an sphere_##.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , s dummy , x,y,z scale.

Array object - a wind flixible array of surfaces at the specified location, it will use a texture called array##.bmp, the parameters are: pos_x, pos_y, pos_z, elements , width, height, size.

Rigid array object - a rigid array of surfaces at the specified location, it will use a texture called fixedarray##.bmp, the parameters are: pos_x, pos_y, pos_z, elements , width, height, size.

Light array object - a light array of points at the specified location, the parameters are: pos_x, pos_y, pos_z, elements , width, height, size.

Smoke object - a smoke created at the specified location, the parameters are: pos_x, pos_y, pos_z, interval , r_color, g_color, b_color.

Patch object - a flat road segment with a texture called patch##.bmp , the parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.

Road object - a raised road segment with a texture called road##.bmp , the parameters are:
pos_x, pos_y, pos_z, width, angle, delta_angle, height.

Blinking object - the name of the object is a name of an blink_##.x file which is located in the models directory and may be related to textures, the parameters are x,y,z location , blink time, x,y,z scale.

Blink object def files - if a Blink_##.def file exits in the scenery, additional parameters are taken from it and used to define the behavior of the blinking object, this behavior is cyclic, which means that when the last time segment is reached the sequence repeats itself.

The structure of the Blink_##.def file is as follows:

Number of time segments.

Time1, Light state ( 1 or 0 )
Time2, Light state ( 1 or 0 )
Time3, Light state ( 1 or 0 )
...

The action name can be one of the following:

Fuel - the ship will be fueled inside this area.

Music - a specified midi file will be heard at this area.

Sound - s specified wav file will be heard in this area.

RMusic - a randomly selected midi file will be heard at this area.

AddAnimal - adds the animal who's name is specified.

DeleteAnimal - deletes the animal who's name is specified.

NoAnimals - deletes all the animals currently in scene.

Additional samples:

4 (from p50.def)
Float_b1 0.25 0.25 0.0 0.0 1 1 1
Float_b1 0.75 0.75 0.0 0.0 1 1 1
Sub_build 0.25 0.25 0.0 0.0 5 3 5
Sub_build 0.75 0.75 0.0 0.0 5 3 5
0
2 (from wpt_3.def)
Floatwp 0.5 0.5 0.0 0.0 1.0 1.0 1.0
Light 0.5 0.5 0.24 0.0 255 255 255
1
Music Default
2 (from p019.def)
trs_08 0.5 0.5 -0.02 0.0 50 10 50
trs_07 0.5 0.5 -0.05 0.0 100 50 100
0
1 (from sample)
Night_a 0.5 0.5 -0.05 0.0 100 50 100
3
AddAnimal gull00
DelAnimal gull01
NoAnimals
8 (from p025.def)
marina2 0.6 0.2 0.005 0.0 3 20 50
marina2 0.8 0.2 0.005 0.0 3 20 50
lighths1 0.7 0.5 0.0 0.0 1.0 0.8 1.0
Blink 0.7 0.5 0.095 3.0 5.0 5.0 5.0
Sphere 0.6 -0.05 0.05 3.0 0 255 0
pole 0.6 -0.05 0.0 0.0 20 8 20
Sphere 0.8 -0.05 0.05 3.0 255 0 0
pole 0.8 -0.05 0.0 0.0 20 8 20
2
Fuel
RMusic


The Scenery.cfg file:

The scenery.cfg file is a very simple file that containes the basic scenery parameteres, these parameteres are:

waves_num - the number of wave#.bmp that are used in this scenery.
lands_num - the number of land#.bmp that are used in this scenery.
land_size - the size of one pixel in meters.
k_alt - factor by which to multiply values in the map.bmp to get real height.
east_coord - the east coordinate of the left side of the scenery.
south_coord - the south coordinate of the bottom side of the scenery.


The Scenery.bmp file:

The scenery.bmp file is the small picture of the scenery that is visible when selecting a scenery, use bmp files 200x150 with 256 colors.


The Land#.bmp files:

These are a series of textures with the size of 256x256 and 256 colors which are mapped by the program to different altitudes, the lowest values are the ones near the coast and the highest values are the taller mountaines, cliffs are also marked by the highest value.

You can choose different textures to customize your scenery appearance and adapt it to different locations in the world, for example you can choose ice textures for antarctica, or sandy beaches for tropical islands.



The Wave#.bmp files:

These are a series of textures with the size of 256x256 and 256 colors which are mapped by the program to different sea conditions according to wave heights, the lowest values are the ones for calm sea and the higher ones are for stormy sea.

You can choose different textures to customize your scenery appearance and adapt it to different locations in the world.


The X files:

DirectX geometry files are called X files ( no kidding ... ) , these files are used in Virtual Sailor for modeling the ships and the static objects in the scenery, such as trees and buildings.

To create an X file, use any 3D graphic software that can export this format directly or use one that can export 3DS files and convert these files using conv3ds converter written by Microsoft.

The most whidely known program to create 3DS files is ofcourse 3D studio, but other exist which can be also downloaded and evaluated to give you a quick lauch into the fascinating world of 3D object creation, for example BCad .

3DS Mesh files can be converted to the X file format by using conv3ds

Each of these files uses textures which can be in any format that the x files supports, for example bmp, jpg, gif.

In addtion to the texture itself some actions are applied by the program depending on the name of the texture and on the properties of the mesh that is using it.

These special actions are:

Color key - if the texture's name includes "_" the texture is treated as having a transparent color which is the first color index of it's palette, or the black color if it has no palette.

Greyscale alpha - if the texture's name includes "=" the texture is loaded as an alpha layer only and not as a colored texture, such alpha layer can be used for high quality smoke of transparent cloth.

Greyscale color - if the texture's name includes "#" the texture is loaded as an alpha layer with color, the strength of the alpha layer is taken from the average value of it's color, such texture can be used for rotating parts as rotors and propellers.

Chrome mapping - if the mesh using the texture is 75% to 90% opaque, the mesh is applied with a chrome mapping texture called refmap.bmp, this chrome mapping is making a reflection map upon the mesh making it look shiny.

Transparent window - if the mesh using the texture is 5% to 75% opaque, the mesh is treated as a window and is drawn last in the drawing order, this allows the body to be seen through this mesh properly without the need to build the object in this order.



Copyright Ilan Papini 1999 - 2017
All Right Reserved