thelusiv Wrote:What other track.txt parameters are available? I have noticed "vertical tracking skyboxes", didn't know that was there.
The "vertical tracking syboxes" parameter is a boolean that most of the time should be off. The way skyboxes are drawn is they ignore the camera translation (i.e. you're always the same distance from the skybox no matter where you are). However, with this parameter set true, then the camera is allowed to translate up and down when drawing the skyboxes. A track or two is set up with this in mind.
thelusiv Wrote:What is the best way to generate roads.trk from a given road mesh object?
There's code in the track editor to do this, but basically if you have a road mesh like this (the direction the car goes is to the right, the numbers represent vertices of the mesh, the mesh is just two quads):
1--3--5
| | |
2--4--6
then you would set the corner control points for the bezier patch to be the same as the vertices of the mesh. Here are the control points for a single bezier:
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
So control points 1, 4, 13, and 16 get set to vertices 1, 2, 3, and 4. The direction of the track at control point 1 gets calculated by taking control point 1 from the next quad and control point 1 from the previous quad and taking the distance and then normalizing. Control point 5 gets set to control point 1 plus the direction of the track at control point 1 that you just calculated. You do the same thing with control point 9 and 13. This ensures that there's always a nice continuous curve between the patches. Control points 8 and 12 get the same technique. Control points 2 and 3 get interpolated from 1 and 4. Same with control points 6, 7, 10, 11, 14, 15. This would probably all make more sense if you look at the code.
thelusiv Wrote:Am I correct that a Lap Sequence is defined by two points, which make a line segment, and timing starts/stops when this segment is crossed by the vehicle?
No. A lap sequence is defined by a list of track road/patch indices that the car needs to roll over in order. As you can imagine, this causes problems if a patch is narrow and the care is very fast. Hopefully in the future we'll do something fancier.