making a bus
part 1. introduction
vbus keeps models in the 'MODEL' directory. each bus is stored in a separate subdirectory that may contain a number (at least one) of folders with skins. there are a few obligatory files in these directories:
- desc.bs1 (in a model directory) - description of a bus + its parameters (more about it)
- desc.ts1 (in a skin directory) - description of a skin + its parameters (more about it)
- wysw.bus (in a skin directory) - parameters of destination boards (more about it)
- kierownica.bmp (in a model directory) - picture for the steering wheel
- bi.bmp, wh01.bmp, wh02.bmp (in a skin directory) - images for wheels.
- kier.wav, syg_kier.wav (in a model directory)- indicator sounds
- klakson.wav (in a model directory)- horn
- dclose.wav dopen.wav (in a model directory)- door sounds
- engine.wav (in a model directory)- engine sound
- rejp.bmp, rejt.bmp (in a skin directory)- rear and front registration plates.
part 2. a model
according to its documentation glScene is able to read number of 3d formats, incuding 3ds, ms3d, gl2, obj, gts, lwo, md2, md3, oct, ply, q3bsp, stl. Presonally i tried only the first one and it seems to do its job fine.
There area few rules you have to obey if you want to make a model for vbus:
to zmodeler users: for some strage reason vbus does not read 3ds files exported by zmodeler. you can use a small freeware tool called anim8or to convert 3ds files to be readable by vbus. all you have to do is Object->Import and then Object->Export. download anim8or here
- 1 lenght unit in a model = 1 meter in vbus
- 2nd axle of the bus lays over the origin
note: 2nd axle is the rear axle for 4-wheeled buses and the middle one for 6-wheeled ones
green dot - origin
blue dots - axles
red lines - wheels outlines
- second segment of articulated buses has to be placed in a separate file
- the axle of second segment of articulated buses lays over the origin.
- objects names are important. the current version uses special names for doors objects.
every door element has a name that contains 6 alphanumeric charcters:
2nd-door number (1-4 or 0)
3rd-lowercase 'l' for the left half of the door or 'r' for the right one
4th-1 for the element of the door connected both to the buses body and another element, 2 for the element not connected to the body.
5th and 6th-the underscore character and the digit 1 '_1'
- the maximum number of doors in a bus = 4 + 1 (special door for driver, marked with number '0', passengers cannot use it)
- object that you dont put into a model are wheels and the steering wheel
part 3. desc.bs1
desc.bs1 is a file in a model directory. lines 1-4 begin with double # character and contain description visible in bus selection screen. other lines contains paramaters of the bus. each line begins with a two letter, case sensitive tag.
- MO "filename"
name of file with bus body (1st segment for articulated buses)
- MB "filename
name of file with 2nd segment (for articulated buses only)
- TY ab
body type, where ab=DO for 4 wheeled buses, ab=TO for 6 wheeled, non-artculated buses, ab=AR for articulated
- O1 nn
nn=distance between the first and the second axle (wheelbase?)
- O2 nn
nn=distance between the rear and the second axle (6 wheeled busses only)
- KR nn
nn=distance between wheels on one axle
- KD nn
- DS x,y,z
drivers (internal view) position
- DK x,y,z
steerng wheel position
- S1 x,y,z
- I1 x,y,z
right indicators - left are mirrored
- PP x,y,z,w,h,a,b,c
front and rear spot lights cast od road surface (visible in night runs)x,y,z- position; w,h-dimensions; a,b,c - angular align (a=0;b=90;c=270 for front and c=90 for rear)
- PL nn
for nn=1 bus can lower itself on stops
- VW nn
nn= vehicles weigtht (in kg)
- EP nn
nn= engine power (in hp)
- R1 x,z,y
- An x,z,y
(n=1..8) orange lights, left side (for articulated buses lights A5-A8 are tied to the second segment)
- Bn x,z,y
(n=1..8) orange lights, left side (for articulated buses lights B5-B8 are tied to the second segment)
- P1 x,z,y
little white lights (usually on roofs)
- T1 x,z,y
little red lights (usually on roofs)
- Y1 x,z,y
rear lights (red)
DT nn(obsolete and ignored, use the DU tag instead)
doors type nn=1 for the 'standard' doors; nn=2 for pushed-out doors.
- DUm nn
m=number of door youre defining (0-4); doors type nn=1 for the 'standard' doors; nn=2 for pushed-out doors.
- DV nn
doors speed, nn=35 by default.
- CZ nn
bus capacity (by defalut nn=30)
- L1 nn
distance between second axle to joint, see picture below(articulated buses only)
- L2 nn
distance between joint to second segment axle, see picture below(articuated buses only)
part 4. desc.ts1
a texture/skin description file, in a skin directory. lines 1-4 begin with double # character and contain description visible in bus selection screen. other lines contains paramaters of the bus. each line begins with a two letter, case sensitive tag.
- WP x,y,z,w,h,a,b,c
the front destination board :x,y,z- position; w,h-dimensions; a,b,c-angular align (typically 90,0,0)
- WJ x,y,z,w,h,a,b,c
side destination boards (WD is tied to second segment for articulated buses) :x,y,z- position; w,h-dimensions; a,b,c-angular align (typically 0,0,0)
- WT x,y,z,w,h,a,b,c
the front destination board :x,y,z- position; w,h-dimensions; a,b,c-angular align (typically -90,0,0)
part 5. wysw.bus
(based on Kakishes post)
It's structure is presented below (ATT!! ALL HAVE TO BE WRITTEN IN LOWER CASE):
- 1. line - bus name
- 2. line - board make for now: "myl" - mozaic yellow or "dor" - LED orange (for plywood does not matter)
- 3. line - number of boards in bus
- 4.&5. lines and so on - dual line definition od board as :
- a) board name from folder tab\tablice (w/o ext), ex. 112x16ma (name format of board few lines lower)
- b) filename for board (front: przod, side: bok, back: tyl)
Names for board files (for files tab\*.tab):
Board name has pattern: aaaxbbcd
- a - board width 112,86,70,21
- b - board height 16,12,9
- c - board type
- m - mozaic or LED
- d - plywood
- d - type of board make
- a - board with number and last stop
- b - board with number, first and last stop
- c - board with number, first stop, route description, last stop
- d - board with last stop (without number)
- e - board with first and last stop (without number)
- f - board with first stop, route description, last stop (without number)
- g - board only with number
Format description: *.tab (files in folder tab\tablice):
Font to choose from (in lines 5 - 10):
- 1. line - board type : as above (m or d)
- 2. line - make : as above (a to g)
- 3. line - table width in mosaic points (for plywood optimum 84)
- 4. line - table height in mosaic points (for plywood minimum 16 can be more)
- 5. line - number font
- 6. line - font for single line caption
- 7. line - font for single line caption reduced
- 8. line - font for bold caption in dual line
- 9. line - font for normal caption in dual line
- 10. line - font for reduced caption in dual line
ATT!! If we define board without possibility of second line display in lines 9 & 10 we put 'f' but in line 8 we put ex. 'e' but not 'f'
- a - 16pt.
- b - 12pt.
- c - 9pt.
- d - 7pt.
- e - 5pt.
- f - do not show