Making routes (English)

ElCono
Here are some Posts from the user Siecool who is from PL vBus Forum about Creating routes.

They are translated parts from the original polish version which was written by emka.


Overview:

General
VJ - creating the street
Bwiu - editing Map, placing Objects
PED - let's add traffic ;)




Original from Siecool (Oct 7 2005, 13:24)

The most important thing in making routes is a 3ds model of the streets you want to have in the game. If you want to create your own first find a program for 3D modelling e.g. 3DS Max (shareware), Animat8r or Zmodeler (both free). Then model some streets and export it to the 3ds file format. What you will also need are buildings, bus stops etc. also as 3ds objects.

Next step is producing a map file (with extension .ms1 - those are in the map subfolder of your vbus), here is the structure of this file according to this article written by emka:
- first line - number '3'
- second line - two numbers separated with a coma, they doesn't count in the modern versions of vbus.
- then up to four lines starting with # sign, these are the lines of comment that you see in the main menu when you choose a map.

Next lines consist of parameters, here are those that you can use:
- A1 x,y,a
x,y-starting position of the bus, a - angle
- M1 x,y,z,a,sx,sy,sz,"filename"
a single object from a 3ds file (e.g. building, road sign); x,y,z-position, a-rotation (around the z axis), sx,sy,sz - scaling (if none then write 1,1,1 ), objects from a single file should be grouped (lines inserting them should be right after each other - this would cause the program to effectively use cache memory)
- M2 x,y,z,a,sx,sy,sz,"filename"
analogically as for the M1 parameter, used for inserting CSV objects from BVE. Attention! This option may not work properly as it was tested long ago.
- M3 x,y,z,a,sx,sy,sz,"filename"
analogically as for the M1 parameter, but used for objects with transparent elements, those elements have to be joined into one object named 'b_2'
- U1 x,y,z,a,sx,sy,sz,"filename"
reads the 3ds file with roads, same parameters as in the case of M1, there can be only one U1 parameter in a single ms1 file. Attention: you can place the 3ds file with roads either with M1 parameter or U1. If you place it as a latter the bus will have different max. speed on road and outside it, in case of M1 the max speed is the same all over the map. Using the U1 parameter also uses more memory thus the FPS might be lower.
- B2 x,y,z,a,w,h,"filename"
single flat object for example a billboard; x,y,z-position; a- rotation around the z axis; w,h- width and height; "filename" - name of the graphics file (e.g. BMP)
- P2 x,y,z,a,w,h,"filename"
similar to B2 but enabling to insert partly transparent objects, transparent color must be in the top left corner of the picture (enables you to insert a fence)
- B3 x,y,z,a,w,h,"filename"
P3 x,y,z,a,w,h,"filename"
analogical objects as in the case of B2 and P2, but instead of objects placed perpendicularly to the ground, it places them parallely to it.
- L1 x,y,a
inserts a lamp-post; x,y-placement; a -angle. Lamp-posts give a light at night. ;)

Okay, now the tricky part:
- SE x,y,z,a,t0,t1,n
inserts trafic lights; x,y,z - placement; a- orientation; t0 - movement in a phase; t1 - time unit; n - for a future use; period=10*t1
examples:
SE *,*,*,*,0,1,*
period 10s, phase=0s, so we begin with the red and orange light
SE *,*,*,*,5,1,*
period 10s, phase=5s, we begin from the orange light (that's exactly half of the period 5/10=0.5)
SE *,*,*,*,0,2,*
period 20s, phase=0s, we begin with the red and orange light
SE *,*,*,*,10,2,*
period 20s, phase=10s, we begin with the orange light (another time it's the half of the period 10/20=0.5)
- ST n,x,y,z,r,"name"
a bus stop (does NOT insert any visible object - a bus stop building you have to insert with a M1 parameter); n-stop number; x,y,z-placement; r-radius - when the distance of the bus to the point with coordinates x,y,z is smaller than r then after opening the doors people will start getting on and off the bus; after closing it you may proceed to another bus stop, if bigger you have to drive closer; if the radius is 0 then program treats it as a default value 7, "name" - name of the bus stop, it will be visible later on the schedule.
- RB hh:mm:ss
this parameter starts the schedule section of ms1 file, hh:mm:ss is the beginning time.
- RS n,hh:mm:ss,l1,l2
single position in a schedule; n-number of the bus stop (exactly the same as in the ST parameter); hh:mm:ss - time of departure; l1 - number of people getting of the bus (write -1 if you want all passengers to leave); l2- number of people getting in. Attention! Program chooses a random number from the interval <0.5x; 1.5x> (where x is either l1 or l2) not exactly the number you have written.
- RE
parameter that ends the schedule section. Attention! The RS parameter MUST be between RB and RE parameters.

Below are parameters used for the direction boards:
- LN n
line symbol
- K1 description
K2 description
two lines of description for direction nr 1
- K3 description
K4 description
two lines of description for direction nr 2
- K5 description
K6 description
two lines of description for direction nr 3
- K7 description
K8 description
two lines of description for direction nr 4
- K9 description
K0 description
two lines of description for direction nr 5
- 1A description
2A description
3A description
4A description
5A description
description for plywood boards, in Poland these descriptions are names of the main streets through which the bus goes.
- 1B description
2B description
3B description
4B description
5B description
analogically, but for the 2nd direction.
- 1C description
2C description
3C description
4C description
5C description
analogically, but for the 3rd direction.
- 1D description
2D description
3D description
4D description
5D description
analogically, but for the 4th direction.
- 1E description
2E description
3E description
4E description
5E description
analogically, but for the 5th direction.
- D1 n
type using which the description will be shown on electronic boards; there are 4 types:
n=1 one line (in such case only the first parameter from each pair is shown - K1, K3, K5, K7 and K9)
n=2 two lines
n=3 two lines, but first (so K1, K3 etc.) written with bigger letters
n=4 two lines, but second (so K2, K4 etc.) written with bigger letters
- D2 n
analogically but for the 2nd direction.
- D3 n
analogically but for the 3rd direction.
- D4 n
analogically but for the 4th direction.
- D5 n
analogically but for the 5th direction.

The 3ds file with roads has to be placed in the scene folder or a subfolder in the folder scene, so for example scene/ottawa/; the ms1 file has to be in the map folder.
ElCono
Siecool @ Oct 10 2005, 21:54

The following is a translation of a document written by emka which you can find here. Unfortunatley because of board limitations number of images had to be limited to 10.

VJ manual

VJ is a very simple editor, using which you can produce a 3ds file with streets and therefore knowledge about 3d modelling is not necessary. Unfortunately using this tool you can produce only very simple and plain map.

Terminology:
- connection is a straight seection of road between two nodes.
- node is a point where the road ends, where there is a junction or a curve. Nodes are displayed as circles.

Screen
- toolbar:

A- new connection, B- delete connection, C- check node, D- move node, E- delete node, F- new lay-by, G- check lay-by
- status bar:

x, y - cursor coordinates
w, h - size of work area, in meters, these numbers change as you zoom in/out
- palette


zoom - zoom in/out the work area
sb - section about lay-by's
1 and 2 - choosing the road side where a lay-by should be;
below you can adjust the position of a lay-by;
list of all lay-by's
[era] - delete lay-by
information window

Making the streets
To start drawing the streets you have to choose (A) from the toolbar; then every single section of a road we draw by choosing two nodes between whoch it should appear. After each right click on a specific place appears a context menu:


First positon (connect to the nearest node) connects the planned end of section to the already existing node, the second one makes a new one. Attention! It makes difference which option you choose, here are some examples of using them:

Appropriate use of context menu
let's say that we want to construct street similar to letter 'P'.

On the image above you see five points (which soon will be nodes) through which our streets will go. We do not have any node so at point (1) we choose from the context menu 'create new node', the same we do at point (2).

At point (2) we already have node, so the only thing you do is put a cursor near, click and choose connect to the nearest node, at point (3) there is no node, so we create new one.

Analogically to what we've done before: at point (2) connect to the nearest node, at point (4) create new node.

And another time we act similarly: at point (4) there is node already so we choose connect to the nearest node, at point (5) create new node.
We close our letter 'P', in this case we have all needed nodes, so we choose connect to the nearest node at both points: (1) and (5).

If streets will be made appropriately there won't be any errors such as no street in places where there should be nodes. Attention! Max number of connections with one node is 6.

Deleting connections
There is a special tool for deleting connections - you have to choose (B) to use it. Then you have to point the connection to delete and left-click. The nearest connection will change color to green and a menu will appear, using which we can decide whether we want to delete it or cancel action.


Checking nodes
Icon © - after choosing connection in information window we will be able to read coordinates of connection and it's number.

Moving nodes
Icon (D) - after choosing this tool you can move node after you click the node and move your mouse.

Deleting nodes
Icon (E) - after choosing node a menu appears using which you can accept action or cancel it.


Adding lay-by's
Icon (F) - after choosing connection on which you want a lay-by to appear you can add it by clicking +Z on the menu.

Lay-by will be visible on the map as a short section of line perpendicular to the section it is on.

Lay-by appears at the side nr. 1 exactly in the middle of a section. You can edit side by choosing either (1) or (2), below this option you can edit position of the lay-by.

Checking lay-by's
Icon (G) - after choosing lay-by on the map, it 'founds' itself on the palette at the right side of the window, the you can edit its parameters or delete it (using the [era] button).

Menu
FILE
- new - new streets
- open - read the MS2 file (it is not compatible with ms1!)
- save as - saves file as MS2 file
- export to 3ds saves file as a 3DS file - for future use as streets in Vbus. Attention! Program can only save files to 3ds format, it cannot read them, so if you plan to edit your streets in future save your roads as ms2 file also!
- exit - ends the program.

TOOLS
- offset - enables you to move your streets along a vector.
- config - configuration of the 3ds file the program exports, z-level is the z coordinate of your streets. If the texture curves option is enabled then curves are textured, if not they have one color.
ElCono
Siecool @ Oct 15 2005, 21:30

Polish original written by emka.

Bwiu Manual

Bwiu is a program designed to browse maps, it cannot produce new maps, but it can edit the existing ones. Therefore work with this program we start by choosing a ms1 file to open. If we want to make new map, we need to prepare a blank ms1 file or to download this 0.ms1 After downloading open this file in notepad, find line begining with U1 and change the filename "ulice2b.3ds" to the name of your file. Program Bwiu should be located in the main vbus folder, the opened ms1 file should be in the /MAP/ subfolder.

MAIN WINDOW
It consists of three main sections: menu, map view and palette.

Menu is rather simple, using option 'zapisz jajko' you can save your work to a ms_ file, option 'zakoñcz' exits program.

Attention! Ms_ files are compatible withp ms1 files, but just in case they have other extension. You can change it to ms1 and open with vbus but there is no guarantee that it will work.

Attention #2! As I remember from my experience with bwiu when you open and save your route file there will be NO information concerning traffic lights. Program also deletes all lines begining with '//' (comments) and ay do other damages to file, so always remember to keep a backup copy of original.

Map view enables you to see location of objects, in its center there is cursor visible as a gray sphere. You can move it using arrows or [A][Z][S][X] keys - they enable you to move faster straight and backwards, the exact direction you can determine by rotating the camera (and this you can do by pressing the left mouse button and moving the mouse). Zoom at the cursor you can change using the mouse scroller.

Palette (you can adjust its size by moving the blue bar between the map view and palette). There are three sections:

- obiekty (objects)- allow you to insert and modify objects

A - objects list,
B - loaction of selected object (x,y,z),
C - location of selected object (rotation around the z axis)
D - scaling
E - adress of selected file,
F - cursor coordinates,
G - button that does nothing - it is used to disable focus from other objects (it is useful when we want to zoom on the map view using the mouse scroller, but instead the objects list gets scrolled - to avoid this we click this button)
- przystanki i rozklad (stops and schedule) - same as above but refers to stops and schedule

H - stops list
I - schedule
J - bar enabling to change the proportions of palette
Stops in the map view are shown as red cones. After selecting a stop from the stops list (H on second picture) cursor moves to the chosen one, similarly works clicking on the schedule (I on the second picture).

TUTORIAL
Inserting objects

In palette in section objects in the group entitled 'wstaw' (sector) we click the appropriate button (M1 - object form a 3DS file, B2 - two-sided not transparent billboard from a BMP file, P2 - two-sided partly transparent billboard from a BMP file, e.g. trees, fences etc.). Then we select appropriate file, after accepting our selection its adress should appear below the word 'wstaw' (E on the first pic) Afterwards we place cursor where the objects should appear and click [wstaw]. It should appear on the map view and on the objects list.

Changing the parameters of objects and deleting them
To change a parameter of an object, we have to select it. The cursor moves to it, then we can do the following things with it:

- rotate by writing the angle in the C position on the first picture and clicking OK.
- rotate using the controls on the right to the C positon.
- scale by writing amount in the D posiiton on the first picture and clicking OK.
- scale using the controls on the right to the D positon.
- move by writing in the position B on the first picture and clicking OK.
- move using the controls on the right to the B positon.
- move by moving the new cursor and clicking Ok.
- delete by clicking the [usun] button on the right side to the objects list

Inserting stops
You have to move the cursor to desired place and click [dodaj tu] button right to the stops list, a dialog box apperas in which you write the name of the bus stop and radius of it (it is the distance from the cone in which the bus is considered to be on the bus stop).

Changing the stop parameters
Choose a stop from list, click [edytuj] (edit) (on the right to the stops list) - a dialog box appears in which you write the name of the stop and radius of it.

Adding another stop to the schedule
You have to select a stop, then click [wstaw] (on the right to the schedule), then a dialog box appears in which you write the number of ppl that will enter the bus or leave it and the time, when you should apper on the stop.

Modifying the schdeule
You have to select a point in the schedule, then click [usun/edytuj] (on the right to the schedule), a similar dialog box appears as when you add new entrance to the schedule. Additional function of this window is that you can delete a stop by clicking the [usun] button.

Modifying another map parameters
You can modify some parameters of the map in the 'inne' section.

- in the first line there has to be number 3 and you should not change it.
- next line is the size of the map; it used to produce an area textured with grass.
- two to four following lines are the description of the map, it is visible when you select a map in vbus; it is recommended to put the author's name there. Those lines should begin with '#'.
- line begining with A1 is the starting position of the bus and the starting position of the cursor in bwiu. (format A1 x,y,alpha where x,y are the coordinates and alpha is the angle)
- line begining with U1 determines the file with streets (format U1 x,y,z,alfa,sx,sy,sz,"filename" - where x,y,z is the location, alfa - rotation around the z axis, sx,sy,sz - scaling).
ElCono
Siecool @ 05-04-07

Polish original is here, as always it was written by emka. ;)

PED manual
Updated 05-04-07

When opened program asks for a file to load, generally it is designed to edit existing files, but you can also start from scratch - just click [anuluj] when it asks for file.

Editing existing nodes
Routes of vehicles are Bezier curves. You can change them by moving control points and steering points. Control poinst are those through which the curve goes (there are visible as larger circles). Steering points determine the angle with which they go through the control points (steering points are visible as smaller circles). You can change between editing steering points mode or editing control points mode using the context menu after clicking the right mouse button.
Selected point is red. We can select point by clicking the left mouse button or by choosing a point from the list on the right. Location of a point can be changed by moving it or by manually editing its properties. We can display dialog box with properties by clicking the 'wlasciwosci' button (which is under the points list on the left) or by choosing the name of the point from the context menu.

Deleting points
You can delete point by choosing the option 'wywal punkt' from the context menu. When you delete a point all routes attached to it are also deleted.

Adding a new route
Routes are lines connecting two points. To add a new route you have to select an existing point, where the route will begin, then select a place where it should end and choose from the context menu 'dodaj sciezke' (add route). If you want to connect two already existing points you do the same but instead of 'dodaj sciezke' option you choose 'zamknij sciezke'.

Attention! If mouse cursor will not be near the ending point the route will not appear.

You shouldn't attach to one point more than 6 routes (3 going in and 3 going out).

Route properties
Route properties are its name and max speed with which vehicle can run on it. Both you can change under the routes list, you have to confirm by clicking 'zmien'.

You can select a route in two ways: either by selecting it from the list or by clicking a point to which it is attached and choosing it from the context menu (in submenu 'tory', you can find there only attached to this point routes). Selected route is red.

You can specify the default max speed in the 'vmax def' field on the left.

Main menu
I won't explain obvious things.
plik/wczytaj tlo (which stands for file/load background) enables you to load a 3ds file with roads, it simplifies the process of designing routes. Roads are blue.
opcje/kresk (options/lines) toggles on/off routes
opcje/siata (option/grid) toggles on/off grid
opcje/tlo (option/background) toggles on/off background (usually roads)

Ending remarks
- in the right down window corner you can zoom in/out by moving the square
- numbers on the left in the status bar are cursor coordinates
- making a new map is slightly tricky, you have to:
(1) click wherever on the map and choose 'dodaj sciezke' - a route connecting point (0,0) and selected should appear (remember that point (0,0) will not be visible as a circle)
(2) then add two another routes (so that you have three connected points in line - not counting the (0,0) point)
(3) now you can delete the point that you've created as first
Now you should have two points connected with route, you can verify that in the points list (there should be 2) and in the routes list (there should be 1)
- you should not leave points that have route going in and no route going out - in such case vehicle may do something unexpected (propably it will hang the game or display an offensive report), you shouldn't though leave dead-ends
- as I remember max number of points is 512, same applies to routes

- above you can see a junction with all possible routes, background visible, grid not.
[VNG] Sascha
Original stammt von ConeBone (01.10.2006 22:14 Uhr)
Siecool @ Oct 10 2005, 21:54

The following is a translation of a document written by emka which you can find here. Unfortunatley because of board limitations number of images had to be limited to 10.

VJ manual

[...]


Der Link dazu funktioniert nicht mehr bitte nochmal den Link...


Sascha
fuffi
woher bekomm ich das Programm VJ?
moeost
@Aldi:
schau mal hier:

http://wiki.virtualbus.info/index.php?title=Hauptseite

--> unter weitere programme
fuffi
danke
sraffi
Reicht eigentlich VJ aus, um eine neue Strecke zu erstellen?
ElCono
Original stammt von sraffi (Heute 19:57 Uhr)
Reicht eigentlich VJ aus, um eine neue Strecke zu erstellen?

VJ erstellt nur die Straße an sich, worauf der Bus nachher fährt.

Den Rest muss man dann selber erstellen.
sraffi
Und mit welchem Programm platziert man dann die Gebäude?
ElCono
Mit Bwiu (dritter Post).
CeBus
ich kann bei wiki VJ nicht runterladen wo bekomm ich es her????
flops
ich kann vj nicht finden...
woher bekomme ich es?

Greetz

Platzi
Christoph
Hallo,
wenn ihr Programme zu Vbus downloaden wollt, schaut doch 'mal hier vorbei:

http://forum.virtualbus.info/index.php?a...iewcat&cat_id=3

Allerdings müsst ihr euch da registrieren.
b1media
du Christoph das ist schon oft gesagt und lange bekannt, aber gut das du dir die Mühe machst!
Christoph
Tag b1media,
wenn wir schon bei der Seite sind, das Programm PED will sich bei mir nicht entzippen lassen :'(
b1media
? das ist hier das flashce Thema schaue doch mal im Suport Fourm nach, oder benutze die Suche, oft gibt es probleme mit Archiven, die beschädigt oder nicht vollständig sind.
SVR
Wo bekommen ich Bwiu her (sry ist eigentlich ne dumme frage)? :-[
Christoph
@SVSBUS:

wie wäre es mit diesem Link?

Du musst da allerdings anmelden, wenn du etwas downloaden willst..