TRACKMK — A program to generate Re-Volt track sections

Re-Volt Track Creation — Straightjacket or Learning Cliff

There are basically two ways to make tracks for Re-Volt — using the built-in 'Lego' editor to make a track, or using a 3D modeling program, such as 3DS Max or Zmodeler, to create the parts of a track from scratch.

Unfortunately, the Lego editor has a number of fundamental limitations in layout, positioning, and suffers from a lack of smoothness in elevation and what passes for banking; within the limits of the Lego editor, changing track textures is about the limit of what is customizable. 3D modelers suffer from steep learning curves, which make it difficult for someone getting started with track creation to produce a decent result.

Overall, though, 3D modeling programs are the best way to create tracks for Re-Volt; the ability to create whatever is needed for the track gives a flexibility that is unmatched. Several people in the Re-Volt player community are producing tracks which are easily as good as any of the tracks that are included with Re-Volt. Tracks created with the Lego editor are easy to create, but top out fairly low in sophistication.

It is possible to create more sophisticated tracks using the Lego editor as the primary creation tool; the MAKEITGOOD editing mode in Re-Volt itself, with user-created utilities such as rvglue, allow Lego tracks to be cut up and their pieces used to create other tracks. With the ability to add objects created with 3D modeling programs to the track, this creates an intermediate level of track-making between stock Lego tracks and fully-modeled tracks.

But the inherent limitations of the Lego editor are still present; some of them can be worked around, but others are harder to overcome. For example, it is necessary to have a complete driving loop before a track can be exported in a drivable form, which limits the inventiveness of a track creator. Elevated track pieces go all the way to the ground — if you have a section of track at an elevation of, say, 8 units, the space under the track is filled by a 'platform' that the track section rests on. With the exception of the overpass track section, there is no way for one part of a track to pass over another part of the track, and an overpass track crosses one straight track over another at a 90-degree angle with both the upper and lower tracks level. And the size limits of the Lego editor limit how big a track can be created — or limit the size of the pieces that can be cut from a track built solely to have sections cut out of it to be used in another track.

The Evolution of TRACKMK

In an attempt to address some of the limitations of the Lego editor, I experimented with performing deformations on a Re-Volt instance file made by using rvglue to cut out a strung-together section of overpasses. I wrote a program that would read the instance file and write out a new file with the positions of the vertices altered so that the track section formed a 90-degree turn, and then used that instance in a Lego track. The resulting instance blended seamlessly with the rest of the track. Additionally, because the track surface used the same texture as the straight track section, the texture would continue smoothly along the curve (like the red centerline stripe in the illustration), unlike the texture mapping for the Lego editor's curve tracks. This would allow you to, for example, 'paint' a dashed white line down the center of the track like the lane divider on roads, and have it follow the curve around turns, rather than breaking up into a tangled mess.

With the success of my initial attempt at programmatically creating new track sections to use in creating Re-Volt tracks, I experimented with adding an elevation change to the track section as it was being deformed to its new shape. In order to make the ends of the track section mate smoothly with the existing Lego track pieces, the ends of the track section needed to be level; applying the height change in a sine function along the length of the instance achieved a suitable solution. The result was a smoothly-curved turn, sweeping from one level to another. Obviously, if I could produce track sections with various deformations applied to them, I could create tracks that went significantly beyond the limitations of the Lego editor.

Rather than writing one special-purpose program after another to create various deformations of Re-Volt instance files to make new track sections, I wrote a program I called prmbend. This program would take a Re-Volt instance file (.prm extension), read the mesh (the vertex and polygon data) from the file, and perform a number of different deformations on it, selected by the user through command-line options. This was not a completely effective solution. While it would create instances modified in different ways that could be inserted into tracks, it had a number of limitations.

First, the program only modified the vertex and polygon mesh of the instance; in order to make it solid so it could be driven on, a user-created utility, prm2ncp, had to be used to create the collision surface for the instance.

Second, the program modified an input instance, so an appropriate starting instance had to be created or cut from an existing track. With instances created by cutting out strung-together overpass sections from a Lego track, this was not a problem, but cutting out other types of track sections and processing them with prmbend was more problematic.

Each straight Lego track section (and the pipe sections) are made up of four rows of polygons; when a 4-piece overpass section was bent into a radius-3 curve, the 16 rows of polygons made for a smooth curve. But when an elevated track section was cut out of a Lego track and bent, visual glitches appeared; the Lego editor handled elevated track by putting the basic track section on a four-sided platform. When the elevated track was bent into a curve, the polygons of the platform didn't meet up with the polygons of the track section, creating visible gaps in the track walls.

A third problem was discovered when I added a feature to prmbend that allowed the user to create a banked track section. Banking a track section allows it to be driven at a higher speed without your car skidding across the track. The problem arose because of the way that the Lego editor created track sections. The overpass track section is made up entirely of four-sided polygons. When prmbend deformed an instance to create turns, banks, and elevation changes, depending on what deformations were applied to the instance, the four corners of each polygon in the track surface would often be moved so that they were no longer coplanar. More simply, the polygon defined by those four vertices wasn't flat any more. When the collision data — the information that Re-Volt uses to decide what parts of the track are solid — was generated for that track section, it would have to split up that four-sided polygon into two triangular polygons. This created two defects with the instances that prmbend made. First, the collision surface (what the cars drive on) didn't match the polygon surface (what you see when you drive), so it looked like the cars were sunk into the surface. Second, the triangularization of the four-sided polygons made the surface extremely bumpy, which made the track sections very difficult to drive.

In order to make the surface of the track smooth enough to remain driveable, it would be necessary to break up the polygons in the track section mesh into triangles before the instance was deformed, so that the way that the triangles were created could be controlled. I looked at various ways to do this, and finally decided that it would be simpler to have my program create the mesh itself. This would solve several problems. First, by generating the mesh internally, the program would not be dependent on the quality of the instance given to the program. For example, if you use a four-unit-long overpass instance to make a radius-3 turn, you get a much smoother curve than if you use a two-unit-long overpass instance. Particularly when banking turns, the length of the initial mesh makes a significant difference to the driving smoothness of the output track section. Second, the underside of the overpass section was extremely 'busy'; there were twenty polygons just for the underside. Since for most track sections created by my program, nobody was going to be looking at the underside, there was no point in having the ornamentation of the Lego overpass track. Finally, by creating the mesh inside the program, I was able to control precisely how the vertices and polygons would be ordered in the mesh, which made manipulating the mesh much easier.

Because the new program didn't bend instance files, just created them, it needed a different name, so I called it 'trackmk'. This program retained the limitation of prmbend in that it only created the instance file for the track section, requiring the use of prm2ncp to create the collision surface and make it drivable. However, with the triangularized mesh of the track surface, the driving surface was much smoother. Also, the program could make the mesh longer before it was deformed if the track section was going to be steeply banked, or had a large elevation change, reducing the bumpiness further.

Experimentation with the track sections produced by prmbend and trackmk identified another problem. Because of how prm2ncp created the collision surface for the track sections, if a car left the track and was repositioned, the Re-Volt gaming engine would sometimes get confused about where to put the camera viewpoint, and place it under the track surface. This could be fixed by deleting the collision data for the track undersurface, but that was a lengthy and inconvenient process. The optimum solution was to bring the creation of the collision surface — the NCP file — inside trackmk, where the polygons for which collision data was generated could be controlled. A side benefit of generating the collision surface for the track section internally was that it allowed changing the surface property of just the track surface — how the track feels to drive on (sticky, slippery, bumpy, etc.). The result was version 2.0 of trackmk, which produces both the PRM and NCP files for the track sections.

Using TRACKMK

Trackmk is a command-line program; it runs in a DOS window, and is controlled by command-line options. There are what appear to be a bewildering number of these command-line options, each of which makes trackmk do something different to the mesh it creates. All command-line options are a dash ('-') followed by a single letter. Some command-line options require a parameter, which may be a letter, number, or word. These options fall into several groups:

TRACKMK Command-Line Options by Type
Bending Options   Elevation Options
Function Command-line option Function Command-line option
90° turn -9 [diameter] Raise track at end -h [height]
U-turn -U [diameter] Raise track in center -c [height]
Sideways shift -S [shiftwidth] Track Length Options
Bend Direction Options Function Command-line option
Function Command-line option Specify length -x [length]
Left turn or shift -l Track Width Options
Right turn or shift -r Function Command-line option
Twisting Options Double Width -w
Function Command-line option Spread -s
Bank track -b [angle] Narrow -n
Tilt track -t [angle] Track Thickness Options
Dip track -d [angle] Function Command-line option
    Flatten track -f

List of Command-Line Options

-b [angle]
Bank the turn around the inner edge of the turn by 5*angle degrees (default 15 degrees)
-t [angle]
Bank a turn around the centerline of the turn by 5*angle degrees (default 15 degrees)
-d [angle]
Bank a turn around the outer edge of the turn by 5*angle degrees (default 15 degrees)
-9 [diameter]
Bend the instance into a 90° turn of radius diameter units (default 4 units)
-U [diameter]
Bend the instance into a 180° turn of radius diameter units (default 4 units)
-S [shiftwidth]
Bend the instance laterally so that the far end is shiftwidth units left of the near end (default 1 units)
-l
Make the turn a left turn, or make the sideways shift to the left
-r
Make the turn a right turn, or make the sideways shift to the right
-w
Make the track surface twice as wide.
-s
Widen the far end of the track section so that it is twice as wide (adapters between normal track and the double-width track)
-n
Create a bottleneck by narrowing the middle of the track section to half normal width
-f
Flatten the track section, making it half as thick. (as in wscale)
-x [length]
Make the track section length units long.
-h [height]
Raise the far end of the instance height units (default 0 units)
-c [height]
Raise the middle of the instance height units (default 0 units)
-m [map]
Use texture strip map from texture bitmap D for the track surface (default strip 0). Must be 0-3.
-p [surfprop]
Set the surface property value to surfprop for the track surface (default 0). Must be 0-25.
-o outfile
Write the new instance to the file named 'outfile'. If this option is not present, the modified instance will be saved in the file 'new_prm.prm'.

Units

A single Re-Volt Lego track section is 1000 units on a side, the track walls are 125 units high, and when elevating and lowering track sections in the Lego editor, the minimum height change is 125 units. The 1000-unit scale is used internally throughout Re-Volt; I will refer to this as the 'Re-Volt Unit' (RVU). When I refer to something like a 'diameter 6' turn, that means that, measured from the outside of the track at both ends of a 180° turn, the distance would be 6 RVU. The largest turn you can place in the Lego editor is a diameter 6 turn; each turn piece fills a 3x3 RVU area. The smaller turns are diameter 4 and 2. The incremental height value will be referred to as a Height Unit (HU); one RVU is eight HU. Trackmk was designed to match these dimensions so that track sections made with trackmk could be used interchangeably with track sections extracted from tracks created with the Lego editor, or pasted into track layouts created with the Lego editor.

Making Turns

A turn is a track section where the track ends pointing in a different direction from when it started; the equivalent piece from the Lego editor is the curved corner. Trackmk can create two kinds of turns — 90° turns and 180° turns, also called 'U-turns'. The command-line option for a 90° turn is '-9', and for a U-turn is '-U'. These options require a parameter; the parameter is the diameter of the turn to be created in RVU.

Turns also have a direction. For flat turns — turns where the two ends of the turn are at the same elevation — which direction the track turns isn't important, but for turns with height changes, the direction makes a difference. The command-line option for a left turn is '-l', and for a right turn is '-r'.

Examples
trackmk -l -9 6  Make a left-hand 90° turn track section with a diameter of 6 RVU
trackmk -r -U 5  Make a right-hand U-turn track section with a diameter of 5 RVU
trackmk -r -9 12  Make a right-hand 90° turn track section with a diameter of 12 RVU
trackmk -l -U 7  Make a left-hand U-turn track section with a diameter of 7 RVU

Making Shifts

A shift is a track section where the track remains pointing in the same direction as it started, but is shifted sideways so that the ends don't line up; the equivalent piece from the Lego editor is the diagonal. Trackmk can create almost any kind of shift piece. The command-line option for a shift is '-S'. In order to make the shift, a parameter is required; the parameter is the distance to move the other end of the track section relative to the start of the section in RVU.

Shifts, like turns, have a direction; the other end of the track can be moved sideways either left or right. The command-line option for a left shift is '-l', and for a right shift is '-r', just as for turns. This option requires a parameter; the parameter is the distance to shift the track sideways in RVU.

Shifts also require a length. A shift piece that moved sideways 1 RVU could be 2 RVU long, or 4 RVU long, or even longer. The command-line option to specify the length of a shift piece is '-x'. This parameter is the length of the shift piece in RVU.

Examples
trackmk -l -S 2 -x 4  Make a shift track section 4 RVU long with a left shift of 2 RVU
trackmk -r -S 1 -x 2  Make a shift track section 2 RVU long with a right shift of 1 RVU
trackmk -r -S 3 -x 6  Make a shift track section 6 RVU long with a right shift of 3 RVU
trackmk -l -S 4 - x 8  Make a shift track section 8 RVU long with a left shift of 4 RVU

Making Straights

Trackmk will make straight track sections. If neither the turn or shift options are specified, trackmk will produce a straight track section by default. Straight track sections require a length. The command-line option to specify the length of a straight track section is '-x', just as it is for shift pieces. This parameter is the length of the straight track section in RVU.

Examples
trackmk -x 4  Make a straight track section 4 RVU long
trackmk -x 2  Make a straight track section 2 RVU long
trackmk -x 6  Make a straight track section 6 RVU long
trackmk -x 8  Make a straight track section 8 RVU long

Making Banks

Turns can be banked, which angles the track surface to make it easier to drive on. By raising the outside of a turn relative to the inside, the force of the car against the track surface helps hold it in place, keeping it from skidding. Cars can drive around a banked turn faster than they can around a flat turn of the same diameter. A banked turn will have both ends of the track section level, with the maximum bank at the midpoint of the turn. There are three types of track banking, which use different command-line options:

  1. Bank the turn around the inside edge of the track section. This raises the outside of the turn, keeping the inside edge of the turn level. This keeps the inside of the turn at the same level as the end points of the turn, allowing this type of banked turn to be placed at ground level without any part of the turn falling below the ground. The command-line option for this type of bank is '-b'. In the illustration at right, the inside of the track is to the left.
  2. Bank the turn around the center of the track section. This raises the outside of the turn and lowers the inside of the turn, keeping the middle of the track level. Because the inside of the turn descends below the level of the end points of the turn, this type of banked turn may not be able to be placed at ground level; for more than a very small amount of banking, the inside of the turn would fall below ground level. The command-line option for this type of bank is '-t'. In the illustration at right, the inside of the track is to the left.
  3. Bank the turn around the outside of the track section. This lowers the inside of the turn, keeping the outside of the turn level. Because the inside of the turn descends below the level of the end points of the turn, this type of banked turn cannot be placed at ground level without most of the track section falling below ground level. The command-line option for this type of bank is '-d'. In the illustration at right, the inside of the track is to the left.

Only one bank option can be used at a time. The bank options require a parameter; the parameter is the amount to bank the turn, in 5° increments — a parameter of '3' would produce a track section banked at 15°, and a parameter of '9' would produce a track section banked at 45°.

The amount of track bank is not limited; it is possible to produce turns that are banked to more than 90 degrees. However, when creating tracks with highly banked turns, as in the illustration to the right, it may be impossible for a car to remain on the banked surface if it falls or is knocked off; an alternate route to complete the turn should be provided.

The bank angle may be negative. Negatively banked turns have the direction of bank reversed — the inside of the track is elevated relative to the outside of the bank. Reverse banking on a turn makes it harder to drive; cars will skid and leave the track at lower speeds on a reverse-banked turn than they would on a flat turn.

Examples
trackmk -l -9 6 -b 3  Make a left-hand 90° turn track section with an inside bank of 15°
trackmk -r -U 5 -t 6  Make a right-hand U-turn track section with a centerline bank of 30°
trackmk -r -9 12 -d 5  Make a right-hand 90° turn track section with an outside bank of 25°
trackmk -l -U 7 -b 9  Make a left-hand U-turn track section with an inside bank of 45°

Making Elevation Changes From One End to the Other

Any type of track section may have an overall elevation change from one end of the track section to the other. An overall elevation change raises or lowers the height of the far end of the track section relative to the near end. The command-line option for an overall elevation change is '-h'. This command-line option requires a parameter; the parameter is the amount to raise the far end of the track section in HU. The parameter may be negative, in which case the far end of the track section is lowered relative to the near end.

Examples
trackmk -l -9 6 -h 3  Make a left-hand 90° turn track section with a rise of 3 HU
trackmk -r -S 2 -x 5 -h 6  Make a right-hand slide track section with a rise of 6 HU
trackmk -x 5 -h 5  Make a straight track section with a rise of 5 HU
trackmk -l -U 7 -h 9  Make a left-hand U-turn track section with a rise of 9 HU

Making Elevation Changes in the Middle

Any type of track section may have an elevation change in the middle of the track section. A mid-section elevation change raises or lowers the middle of the track section; the ends of the track section remain at the same level, producing a hump or dip in the track. The command-line option for a mid-section elevation change is '-c'. This command-line option requires a parameter; the parameter is the amount to raise the far end of the track section in HU. The parameter may be negative, in which case the middle of the track section is lowered relative to the ends, producing a dip.

Examples
trackmk -l -9 6 -c 3  Make a left-hand 90° turn track section with a center rise of 3 HU
trackmk -r -S 2 -x 5 -c 6  Make a right-hand slide track section with a center rise of 6 HU
trackmk -x 5 -c 5  Make a straight track section with a center rise of 5 HU
trackmk -l -U 7 -c 9  Make a left-hand U-turn track section with a center rise of 9 HU

Making Narrow Track

Any type of track section may be narrowed. A narrowed track section has its width reduced in the middle, so that there is less space for the cars to pass each other; the equivalent piece from the Lego editor is the narrow track piece with an adapter piece on either end. The big difference is that trackmk can narrow any track section it produces; you can make narrow turns or shifts as easily as you can make straight narrow track. The command-line option for narrow track is '-n'.

Examples
trackmk -l -9 6 -n  Make a narrowed left-hand 90° turn track section
trackmk -r -S 2 -x 5 -n  Make a narrowed right-hand slide track section
trackmk -x 5 -n  Make a narrowed straight track section
trackmk -l -U 7 -n  Make a narrowed left-hand U-turn track section

Making Wide Track

Any type of track section may be made wide. A wide track section has its width doubled, so that there is more room for the cars to maneuver; the equivalent piece from the Lego editor is produced by exporting a track as double-wide. The command-line option for wide track is '-w'.

Examples
trackmk -l -9 6 -w  Make a wide left-hand 90° turn track section
trackmk -r -S 2 -x 5 -w  Make a wide right-hand slide track section
trackmk -x 5 -w  Make a wide straight track section
trackmk -l -U 7 -w  Make a wide left-hand U-turn track section

Making Spread Track

In order to use normal and wide track sections in the same track, there have to be adapters to mate the regular-width track to the wide track, the same way that the Lego adapters mate the narrow track to the normal-width track. A spread track section has one end normal-width and the other end double-width to match the wide track. Any type of track section may be spread. The command-line option for spread track is '-s'.

Examples
trackmk -l -9 6 -s  Make a normal-to-wide left-hand 90° turn track section
trackmk -r -S 2 -x 5 -s  Make a normal-to-wide right-hand slide track section
trackmk -x 5 -s  Make a normal-to-wide straight track section
trackmk -l -U 7 -w  Make a normal-to-wide left-hand U-turn track section

Changing the Track Surface Texture Map

Trackmk uses the same texture space for the track surface of the track sections it creates that the Lego editor does — the 192×256 section of texture map B. However, trackmk makes more efficient use of this space. For any given track section, trackmk only uses a 192×64 section of the texture bitmap; by default, trackmk uses the section labeled as ‘0’ in the illustration to the right. Trackmk can also produce tracks using each of the other numbered 192×64 sections of the texture bitmap. The command-line option to use an alternate texture map is ‘-m’. This option requires a parameter; the parameter value is a number from 0 to 3, representing the four texture blocks illustrated to the right.

Examples
trackmk -l -9 6 -m 2  Make a left-hand 90° turn track section using texture map strip 2
trackmk -r -S 2 -x 5 -m 1  Make a right-hand slide track section using texture map strip 1
trackmk -x 5 -m 3  Make a straight track section using texture map strip 3
trackmk -l -U 7 -m 1  Make a left-hand U-turn track section using texture map strip 1

Flattening the Track Mesh

Trackmk normally makes a track section with the same cross-section as the Lego overpass track section — 1 RVU wide, track walls 1 HU high from the track surface to the top of the walls, undersurface 1 HU below the track surface. Trackmk can produce track sections that have been 'flattened' to half the standard vertical dimensions, similar to the effect of using the rv-sizer program on the output track section to make it half height (i.e., 'rv-sizer section.prm SY=0.5'), or the effect of my wscale utility on a world file — except that any vertical displacement of the track mesh is not affected by the flattening. If you create a track section that had an 8 HU elevation change, and then scaled it with the rv-sizer program as described above, it would be a half-thickness track section with a 4 HU elevation change. If you create a track section that had an 8 HU elevation, but had trackmk flatten the track mesh, it would be a half-thickness track section with an 8 HU elevation change.The command-line option to flatten the track mesh is ‘-f’.

Examples
trackmk -l -9 6 -f  Make a half-thickness left-hand 90° turn track section
trackmk -r -S 2 -x 5 -f  Make a half-thickness right-hand slide track section
trackmk -x 5 -f  Make a half-thickness straight track section
trackmk -l -U 7 -f  Make a half-thickness left-hand U-turn track section

Changing the Track Surface Type

In Re-Volt, in addition to the standard surface type, there are additional types of surface that change the properties of the driving surface — how slippery the surface is to drive on, how bumpy it is, whether cars kick up particles, and what color skidmarks the cars leave. The option to change the track surface type is ‘-p’. This option requires a parameter; the parameter is a number from 0 to 25. The values for the surface type parameter correspond to the values defined in the ase2rv documentation for the –ali command-line switch.

The surface property definition table listed below is from the documentation for the ase2rv program (Copyright © 2000, 2001 by Alexander Kröller and Steven Ellis, Copyright © 2001 by Gábor Varga) and is included here for reference purposes only.

Value Descriptive
Name
Bumpy Grip
Intensity
Particle
color
Skid
color
0 Default 0 1   Gray
1 Default2 0 1   Gray
2 Grim Sunday 0 1   Dark Gray
3 Trick 0 -1   Light Gray
4 Flower Field 0 -3 Cream Light Green
5 Evil Conspiracy 0 -2   Gray
6 Grippy 0 2   Light Gray
7 Jaws 0 3   Light Gray
8 Shiny 0 1    None
9 Conspiracy 0 -2   Light Gray
10 Mega Slide 0 -5   Light Gray
11 Evil Trick 0 -1   Gray
12 Grass 0 -3 Green Green
13 Bone Shaker 1 1   Gray
14 Pebbles 2 1 Black Light Gray
15 Gravel 1 1 Black Light Gray
16 Intensely Weird Magnet 1 Weird   None
17 Mildly Weird Magnet 1 Weird   None
18 Manor Born 1 1 Brown Brown
19 Lord Muck 1 2 Brown Brown
20 Lady Muck 1 -1 Brown Brown
21 Super Slippy 0 -4   Light Gray
22 Super Slippy2 0 -4   Light Gray
23 Conspiracy2 0 -2   Light Gray
24 Head Wind 1 Weird    None
25 Side Wind 1 Weird    None
Examples
trackmk -l -9 6 -p 2  Make a left-hand 90° turn track section using the 'Grim Sunday' surface type
trackmk -r -S 2 -x 5 -p 4  Make a right-hand slide track section using the 'Flower Field' surface type
trackmk -x 5 -p 21  Make a straight track section using the 'Super Slippy' surface type
trackmk -l -U 7 -p 19  Make a left-hand U-turn track section using the 'Lord Muck' surface type

Specifying the Output File

When trackmk creates a track section, it writes the track section data to a file. In order to write the track section data to a specific file name, the output file must be specified. The command-line option to specify the output filename is '-o'. This command-line option requires a parameter; the parameter is the name of the file to write to; this file name will be used for both the PRM and NCP files.

If the filename given ends with an extension of '.prm', it is removed before creating the NCP file name; if it ends with any other extension, it is assumed that the extension is part of the file name. For example, the option '-o newprm' will create the files 'newprm.prm' and 'newprm.ncp', as will the option '-o newprm.prm', but the option '-o newprm.prn' will create the files 'newprm.prn.prm' and 'newprm.prn.ncp'. Leaving off the file extension and allowing trackmk to create it for both the PRM and NCP files is recommended.

Examples
trackmk -l -9 6 -o lturn6  Make a left-hand 90° turn track section, writing to 'lturn6.prm' and 'lturn6.ncp'
trackmk -r -S 2 -x 5 -o 2rshft5  Make a right-hand slide track section, writing to '2rshft5.prm' and '2rshft5.ncp'
trackmk -x 5 --o 5strt  Make a straight track section, writing to '5strt.prm' and '5strt.ncp'
trackmk -l -U 7 -o uturn7  Make a left-hand U-turn track section, writing to 'uturn7.prm' and 'uturn7.ncp'

Combining Command-Line Options

When making complex track sections, the various command-line options can be combined in a wide variety of ways. The table of command-line options by type groups the options into categories based on how they modify the track section being generated. Generally, only one option from each category can be used for making a track section, except for the elevation change options, which can both be used. The examples below show some compound track section generation commands, with the command-line options color-coded with their explanation.

Examples  
Command Description of track section created Picture of created track section
trackmk -l -9 6 -b 3 -h 8 -c 2 -m 1 -o btrn6  left-hand 90° turn, diameter 6 RVU, 15° bank, rising 8 HU, center rise 2 HU, texture map 1, writing to 'bturn6.prm' and 'bturn6.ncp'
trackmk -r -U 8 -t 6 -p 8 -c 8 -f -o shnyU  rightt-hand U-turn, diameter 8 RVU, 30° bank, surface type 'Shiny', center rise 8 HU, flattened, writing to 'shnyU.prm' and 'shnyU.ncp'
trackmk -l -S 2 -x 4 -h 8 -p 14 -w -o wshft  left-hand shift of 2 RVU, 4 RVU long, rising 8 HU, surface type 'Pebbles', double-wide, writing to 'wshft.prm' and 'wshft.ncp'
trackmk -x 6 -h 6 -n -m 2 -p 10 -o nrise  6 RVU straight rising 6 HU, narrowed, texture map 2, surface type 'Mega Slide', writing to 'nrise.prm' and 'nrise.ncp'

Revision History

2/3/2002  Original version of prmbend released for download
2/7/2002  Enhancement to left/right shift algorithm to eliminate necking from simple translation method
2/9/2002  Addition of 'dip' track twist; provision for correct
3/1/2002  First version of trackmk given to alpha testers
3/10/2002  Trackmk released for download
3/12/2002  Corrected three bugs in trackmk:
  1. Insertion of extra polygons to smooth track sections with large elevation changes causing shift and straight track sections to be generated with incorrect overall lengths
  2. Inverted sign on an angle causing right-shift tracks to be generated with improper track widths
  3. Wrong variable type for texture offset causing alternate track texture mapping to fail
3/23/2002  Trackmk version 2.0
  1. Added functionality to generate the NCP file from the track mesh as the PRM file is created, obviating the need for a secondary utility like prm2ncp. Additionally, because the underside of the track does not have collision data, the problem of wierd camera angles on reposition is avoided.
  2. Added -p command-line option to set the track surface property.
3/28/2002  Rewrote the documentation to provide more detailed explanations on using trackmk

trackmk and this document are copyright © 2002 by Sean R. Malloy. All rights reserved. Permission is given to use and distribute the trackmk utility as long as no fee is charged for its distribution.