GPL Track Creating - trk23dow - FB

From Grand Prix Legends Wiki
Jump to: navigation, search

Authored by the GPLEA

<trackname>.FB - Forward/Backward Viewing Distances

When you drive around your track, you want to be able to see everything that you would see in real life, but you don't want to see everything that is hidden around the corner, or even everything behind you (to maximise FPS).

The .FB file lets you specify the distances from the current viewpoint, in metres, that you will be able to see. Here is a small extract:

400.0 250.0 0.0 0.0

385.0 250.0 0.0 0.0

370.0 250.0 0.0 0.0

355.0 250.0 0.0 0.0

340.0 250.0 0.0 0.0

320.0 250.0 0.0 0.0

280.0 250.0 0.0 0.0

240.0 250.0 0.0 0.0

225.0 250.0 0.0 0.0

210.0 250.0 0.0 0.0

There is one line in the .FB file for every 128feet (39.0144metres) of the track length.  You should include a few extra values at the end.

First Value: Distance ahead that you can see, in metres. This is the 'normal' viewing distance

Second Value: Distance behind that you can see, when driving forwards - i.e. mirror viewing distance

Third Value: Distance ahead that you can see when you're going the wrong way.

Fourth Value: Distance behind that you can see when you're going the wrong way.

The Third and Fourth values are also used when you can see the other way up the track - e.g. when approaching a hairpin and you can see where the track goes after the turn.  There must be some minimum value at work here, because you can use 0.0.

Also note that these values are affected by the detail slider in the GPL options menu.

An Example

When creating your .FB file, you can keep the values small by considering every point on the track individually - e.g.:

On the approach to a blind hairpin (lots of trees on the infield), you cannot see anything beyond the hairpin until you turn round the corner. In this example, you can reduce the Forward viewing distance so that nothing beyond the hairpin will be drawn. Right up near the hairpin, the Forward viewing distance will be 100metres at most (to cater for any objects on the outfield).

Updated 7-Jan-2001

Transferred to the wiki: 19.04.2009