Version 0.7 Last Modified 29th July 2002

Creating Track Zones and Viziboxes

ASE2TAZ.exe and ASE2VIS.exe provides conversion from ASE files to Re-Volt Track Zone and Vizibox files. They provide the same functionality that is offered by the in-game editor "Track Zones" and "Vizibox" editing modes.

To make vizibox or track zone export, you must first create boxes in Max; place and size them along your racing line. Then make the listfile, which enlists the names of your boxes which will be used to generate Track Zones and Viziboxes from. Run ASE2TAZ or ASE2VIS - and you are done.

Boxes

"Box" here stands for a mesh, which has eight vertices, and the (imaginary) edges connecting the vertices are parallel / perpendicular to each other. I say imaginary, because your mesh need not have the edges. ASE2TAZ and ASE2VIS uses vertex information only, and everything else is ignored. So you need not assign material to you boxes, and can also remove all faces and/or edges, provided you answer "No" to "Delete isolated vertices?" The most convenient way to do the boxes is to create Box objects, size, position and rotate as appropriate, then leave them as they are - you don't have to collapse them to an Editable Mesh. You should not, however, apply any modifiers which deforms the box so its edges are no longer parallel / perpendicular to each other. Track Zone boxes can be rotated; Viziboxes must be parallel to the main axes.

Each box you create can serve as a basis for more than one generated Re-Volt box. For example, assume that you have a track with many camera boxes, and there is an area which is invisible from almost all. You then create a box which covers the common invisible area, and in the Visfile, list its name with all of the camera box names it applies to. Each occurrence will generate a separate cube box (covering the same area).

Listfiles

Listfiles are ASCII text files, which enlist the names of your boxes to be used to generate Track Zones and Viziboxes from. Empty lines are ignored; lines beginning with '#' character also (use '#' for commenting). Each line can contain one or more names, separated with whitespace. If the name of an object contains whitespace, you must enclose the name in single or double quotes. Without whitespace in the name, quotes can be omitted.

Note that the exported ASE file never contains double quotes in names. The exporter automatically converts double quotes to single quotes. For example, if you name an object the "red" herring in Max, you will see it as the 'red' herring in the ASE file.

Examples to valid names:

  • unquoted_name
  • 'unneeded_quote_makes_no_harm'
  • 'single quote name'
  • "double quote name"
  • "quoted quote ' here"
Be careful to close your quotes. If you don't, ASE2VIS and ASE2TAZ will treat the rest of the line (including newline character) as the name of the object, and you will get a "Panic: object not found".

Tazfiles

Tazfiles must contain the names in the order along you racing line; beginning with the starting point. TAZ id 0 will be assigned to the object named on the first line, and is incremented by each line. If there are multiple names in one line, they will have identical id-s. This is used when you have separate Track Zones for alternate routes. The name of the Tazfile can be specified to ASE2TAZ with the -f option; if that is omitted, ASE2TAZ looks for a file named "Tazfile" in the directory where the ASE file resides.

Sample Tazfile:
#Tazfile for MyTrack

#From start until house
tazbox_start
tazbox_road
tazbox_yard

#Two alternate paths:
#one goes through the house (lobby+kitchen), other one goes round the house in an alley
tazbox_house_lobby tazbox_alley_1
tazbox_house_kitchen tazbox_alley_2

#Alternate paths meet outside the house in the meadow
tazbox_meadow

#Meadow was the last one; next will be the start again

Visfiles

Visfiles list names for Camera and corresponding Cube boxes. Each line contains Camera name(s), a colon, and the Cube name(s), in this order. There can be any number of Cameras and Cubes with the same id. Having more Cameras (or Cubes) with the same id is useful when you want to cover an area, but you cannot do that with one box only. Typically, you will have one Camera with a number of Cubes in a line, but feel free to make more Camera box if it is needed.

You can also make a Camera box without Cubes, or Cubes without Cameras, but it's quite silly idea to do so (because they are useless). ase2vis gives you a warning if it encounters such useless boxes. In this case, check your Visfile for misplaced / omitted colon, or typos.

The colon must be separated from other names with whitespace. For example, camera: is just a name; but camera : is a name plus a colon. In the first case, there is no separator colon recognized.

Generated Vizibox id-s go from 0 upwards. Currently I don't know what ordering is best for Viziboxes, or does it matter at all. If you have any knowledge or experience of it, please let me know. The name of the Visfile can be specified to ASE2VIS with the -f option; if that is omitted, ASE2VIS looks for a file named "Visfile" in the directory where the ASE file resides.

Sample Visfile:
#Visfile for MyTrack

#From start we don't see the alley and the whole house
camera_start : cube_house cube_alley cube_whatnot

#From yard we can see the house and into the lobby, but not into kitchen
camera_yard : cube_whatnot cube_kitchen

#Through the house (lobby+kitchen), we don't see out; from the alley we don't see in
#Note there are two camera boxes with the same id (belonging to same Cubes)
camera_lobby camera_kitchen : cube_start cube_alley cube_whatnot
camera_alley : cube_lobby cube_kitchen

#From the meadow we don't see the yard
camera_meadow : cube_yard

Note: Support for multiple Cameras with the same id appeared in rvtmod6. This has broken Visfile backwards compatibility. Visfiles created for rvtmod5 must be modified to work with later versions (a colon must be added after the first name in each line). For example, if you had a line:
camera cube1 cube2 cube3
you must add a colon:
camera : cube1 cube2 cube3
to make it work with rvtmod6 or later.

Tips

The most important thing is that Track Zones must overlap, and it is advisable that Camera boxes also do. If Track Zones don't overlap, you can't complete a lap at all. If Camera boxes don't overlap (i.e. there are places where the camera travels in an area which is not covered by any of the camera boxes), frame rate will drop. You can do overlapping in two ways. First is that you size and position your boxes in Max that they overlap in the first place. Second one is to make boxes with snap to grid, just side-by-side, then specify -g switch to ASE2TAZ or ASE2VIS, to grow the boxes a bit. Note that -g does not affect cubes - only Track Zones and Cameras.

When making Viziboxes, try to cover the largest possible area with the least possible number of cubes. It helps you to maintain them, and I believe also boosts performance.

Plan your viziboxes carefully. If you make a cube that is "shared" between multiple cameras, make sure that it is really invisible from all of that viewpoints.

When you have your .vis file, use the in-game editor to check that you have really covered everything invisible. If your boxes have faces, you can also do it in Max: hide all your cubes, except a set belonging to the same camera, and have a look at it in a shaded viewport. You will see if objects "spike out" from boxes.

Make Track Zones first, and AI Nodes after that. AI Nodes seem to depend on Track Zones somehow, and if you delete an existing Track Zone (or move it very far from vhere it should be), Re-Volt may crash when loading the level.

Be prepared

ASE2TAZ and ASE2VIS are quite new development and have not been tested/used a lot. Take all precautions you can. Always save your work before using them. After you created your Track Zones and Viziboxes, use the in-game editor to check that what you have is what you expected.

If you encounter any problems, please go through the usual steps:
1. Check that the error is not yours.
2. Check if you have the latest version of the software.
3. Localize the problem (find the smallest possible input that produces the error).
4. Try to fix the error yourself (if you can) and send it to me.
5. Finally, if none of the above helped, write down the error, the environment, zip everything necessary to reproduce the error, then send it to me (bootes@freemail.hu).

On the other hand, if you could use ASE2TAZ and ASE2VIS successfully, you may also send me a mail. Ideas and comments are also welcome.

Acknowledgements

The algorithm used to find out a box from eight vertices, and all linear algebra stuff which is inside ASE2VIS and ASE2TAZ (and has not already been in rvtmod4) was invented by Gyula Kosa. Thank you Gyula.

Contents Page

Next