(clip from old command library)
The following is a screenshot of a slightly modified Imola track from the first specific 0xc5 experiment by the author:
The cmds 0xc5 / 0xc6 are used for defining "Far-View". To understand the necessity of "Far-View" you have to understand the limits of the "View-Distance" concept. For descriptons of the "View-Distance" concept see cmds 0x81, 0x82, 0xbe, and/or 0xbf. There you see the View-Distance is limited to a distance of 255 track-length units. In long straights or twisted tracks, or tracks with crossings it can be necessary to have a greater view-distance. Thats when 0xc5 together with 0xc6 come to play.
In the following image we see a clip of the Bern-Grauholz track made by the author. This track features a crossing beyond the "regular" view-distance. The cmds 0xc5 and 0xc6 make it possible to see the cc-car on the bridge. The figures in the track-sectors are distances from s/f !
We need to insert both cmds in the same track-sector. In the example above, the cmds are in the track sector at distance 125 from s/f. 0xc5 at first (or more than 1 of them), 0xc6 afterwards. With 0xc5 we define what part of the track should become visible. We define this part by giving the distance from start s/f. In the above example we insert a2= 538 and a3 = 548 for defining the section visible where the bridge is. Of course we have to take care of the heights when making an arrangement like this !
There are two more arguments from interest in 0xc5. With a4 we can define what parts of the scenery should become visible. With a8 (if available) we somehow can define the periferal angle of visibility of the far-view-section. Its not yet clear how this argument works in detail. A possible approach could be: imagine a line from your head (point of view in the game) to the "far view"-section. This is zero degrees. Now imagine you turn your head. This is periferal angle. 0, 90, 180 and 270, all +- about 20 degrees seem to be visible all the time (e.g. at a8=0). With increasing the value of a8 you can "fill up" the gap. However you may want to check out several values for getting the best result.
Once the far-view-section is defined, we have to "open a window" by a cmd 0xc6.
More: 0xc5/0xc6 is not only useful for defining
and enabling far-view-sections. It is also very useful for defining and
enabling "rear-views" ! Imagine a hairpin. When you approach the hairpin
you have the whole section in front of you. Then you turn in. When leaving
the hairpin you see the road ahead of you. But you also should be able
to see the road that approaches the hairpin (where you drove a few seconds
ago). But in gp2 its not possible to look forward and behind at the same
time, and the mentioned section IS behind, although you see it in front
view ! Thats where you can use 0xc5/0xc6 also. With 0xc5 you define the
part of the track you do not see now, and with 0xc6 you define a window
in front of you.
Switching number of arguments
In some original tracks this cmd has 7 args, in other original tracks it has 8 args. The switch for the number of arguments is to be found in the track config section, track-sections, in the same place where you find the pit-side-switch. The TE ALWAYS inserts 0xc5 (197) with 8 args when rightclicking a tracksector in the track tree and choose "insert track command"), whatever the switch is set to. So if the switch is set to 7 args and you insert a cmd 0xc5 anyway, your track is lost ! (save and load it to see what i mean).
If you want to set up some far view areas, you may want to work with the cmds with 8 args, because a8 is a very useful argument. If your track features only cmds 0xc5 with 7 args, you can change this be deleting ALL cmds 0xc5 (197), then setting the mentioned switch to 8 args and then inserting new cmds 0xc5 (197). This works well, i tested that. But you may want to make a backup of your track anyway before trying it !
Changing the switch means inserting a different number. The following values are ok (in terms of inserting a cmd 0xc5(197) with the TE): 3968, 3978, 8064, 8074, 40832, 40842. The following table shows the values that are not ok and the values that should replace them BEFORE inserting some cmd 0xc5 (197):
value not ok! | replace by |
3456 | 3968 |
3466 | 3978 |
7552 | 8064 |
7562 | 8074 |
40320 | 40832 |
As the watchful reader already noticed, basically its adding 512, which means simply setting the 0xc5-flag.
More comments:
MK: (on a problem with a "flying armco")
"I found a solution. I told you it was leaking through with the far-view window I set up there. So I decreased the length of the window, and it disappeared. But there are some more things to say about.
First, I had a far-view that went on until exactly the finishline. It
is not possible (as far as I have seen) to get the entire area around s/f
in one window, so you either have the last part, or the first part of the
track. And only one window is active at any time.
Second, I have seen the "flying armco" before, coming from objects.The
"Flying Armco" goes from the point where the problem is, to the "disapperaring
point" in the middle of the screen, on the level of the horizon. Like it
was infinitly long. On these objects, the reason for the "F.A", was that
I made one or more "polygons" length zero. For instance, by putting two
vertices on top of one another (in 3D) which gives the connecting line
a length zero. Or by setting one of the scale-units length zero.
Anyway, GP2 doesn't like that sometimes, and perhaps by some division
operation, instead of zero, the length of that section becomes infinite.
Point is, I couldn't find an object with any length zero there. But perhaps the fact that I made the far-view window get up right untill s/f, made a similar division-problem, and thus the error. By cutting the window short by 4 units, the problem disappeared anyway."
"... the 0xc5, and this command seems sometimes to only work at a specific
angle
in which you see the "window-stuff".
PKA on a8 of 0xc5: value 8= radius of vision 16384= 90 degrees
"yeah the angle is set from the place the command is triggered, so if
you're
on a straight then 0 will do the job but once you turn things will
disappear."
*0x81 / 0x82 be/bf don't have any influence if there's a c5 code in
the vicinity."
DC: "Strange flashing switch in view could have something to do with using 0xc5 values that span the start/finish, i.e. the end and beginning of the track.
I found that if I used values that stopped just before the end of the last inch of track, the walls no longer flashed. Also, when I used values that started at the beginning of the track and ended where I normally ended the view, this second scenery bug was fixed.
Now the problem is that it is hard to string together 2 or more of these commands without making the view look poor, like one section switches on when another switches off when you pass a point. Also, when I make a third command that spans the small area on either side of the S/F straight, this small area flashes."
"Oh yeah I forgot, if its not already known, Cars and Objects are always
seen with his command, even when A4 = 0. "
LD: "0xc6 seems to work much like the 0xdb (219) "Show Pits Through
Ribbons" and/or 0xd3 "View Into Pit Entry". I had to put the 0xc6 into
t107 of Van Indy, screwed up the fences a little, but it was a compromise
between Not beeing able to see into the pits, or some weirdness with the
fences."
BC: "I also discovered that if the sections specified in the
Oxc5 and Oxc6 commands overlap, when you are in the overlap section, nothing
shows up, not even objects! What I am referring to is in the Oxc6 commandd,
the values define the distance that the Oxc5 is inacted. The Oxc5 defines
the distance from the S/F line. So, if those two sections overlap, that
is where everything shuts off. For people using tracks with oxc5 and Oxc6
commands such as Imola and Spa, if you leave these commands in, it could
cause these sort of problems if you are substantially revising the track.
I also experimented with multiple Oxc5/Oxc6 combinations. What happens
is the last command is the one recognised."
DC: "For multiple arguments, you mean:
0xC5, 0xC5, 0xC5, 0xC6 in order. I found that the last one works too, but only for objects, I think. So, an object would not show up unless it was in the last C5. In Monza, trying to fix the view of the S/F straight, I have to split it into 2 commands, since there is a problem of using 1 command to go past the start and end of the track. Since the pit building is defined in the last sector of track and corresponds to the first C5, the building does not show up.
For the overlap, you mean when C6 value lies within the values for a2:
and a3: of 0xC5? "
BC: "Yes. Since the A2 of the Oxc6 command determines the distance
from the point of the command that the Oxc5 section defined is visible;
if the area defined by the Oxc5 is within that distance, then that is the
point where everything shuts off. Since the Oxc5 defines the section as
distance from the S/F line, it is not so obvious until you actually drive."
It was MB who originally turned my attention to the 0xc5 cmd in the original Imola track.
(from commandlibrary:)
Location Code Type D
GP2 - as found by Dan Chinnapen
|
Location |
|
Location |
|
grey road(no texture) |
|
? |
|
fences/walls |
|
? |
|
road | ||
|
verges |
|
banks |
|
all ribbons | ||
|
pitroad |
|
pitroad lines |
|
ribbon 1 |
|
ribbon 3 |
|
ribbon 2 |
|
ribbon 4 |
|
? |
|
? |
its probably the same for gp3, yet to confirm. (at least bern-grauholz for grandprix3 obviously works)