This is version 1.9, not indicating that the tutorial has made a big
step forward (it has not) but it seemed like a nice number to end my involvement
in the scenery tutorial. That means, that unless some major breakthrough
is discovered, you are looking at the final version of this document. If
you don't like that, or want to notify me of something concerning this
tutorial, contact me at m.p.j.keizer@sepa.tudelft.nl
In this document, I will try to share the knowledge I accumulated over the last months about the editing of GP2-scenery structures.
Therefore I would like to start with some theoretical basics you have
to know about when trying to understand what I try to make clear. Then,
an overview of the commands used while editing scenery, from Addie’s Command-library,
supplemented by some practical tips concerning the use of these commands.
This is followed by a step- by -step guideline how to build the scenery.
In chapter 4 I made some drawings of basic structures and formations as
examples of scenery-editing. The appendix contains some things I couldn't
place elsewhere, like a FAQ and version updates. But first:
Also credits to addie, for finding the basics about scenery editing (amongst other subjects as pilanes etc.), and taking the time to write it down in the command-library, pitlane-tutorial and GP2-trackediting tutorial. Without him, command 0xB8 would still be unknown!
I would also like to thank everyone who found out thinks for GP2, it
becomes even more clear you can't do it all yourself. The funny thing is,
you don't have to! So I use sometimes pieces of information that are not
originally my own finding, but rather combinations of different sources
and quick notes by someone, that I tried to take together in a comprehensive
and easy-to-read form. So when you think your name should be explicitely
called in this tutorial, let me know, and I'll add you to the following
list of contibuters!
John Verheijen, Swervin' Irvin', Snqqpy.dog, Glenn Durden, Michael
Hompus, Babbel, Bob Culver, Jason Sinnbeck,
And of course to all trackeditors that keep making even-better-looking
tracks. On one hand I really hate that, because it costs so much more time
to make a decent track relative to others! But I really hope this tutorial
helps all trackeditors to enhance their tracks to a next "generation".
Now, the "real" distance from the middle of the road to the horizon
is determined by the Scenery 3 (0xAF) command. So if you increase the values
of this command, the whole scenery becomes more "stretched". If you decrease
this value, the whole scenery becomes more "dense", and the horizon will
appear to be closer to the track. A "normal" value for this command
is 16384, and in most original GP2 tracks, the value for this command differs
too little from this to notice anything.
The values for Scen1 are the same in both situations, the values for
Scen3 are halved. The black line is the road, the red the armco, the green,
brown and blue are
ribbons and the position for the vertical yellow line, the horizon,
is definened by Scen3. As you can see, just decreasing the values in Scen3
makes the whole
scenery more "dense".
Note that if you change the Scenery1 (0xB8) a2 value in the middle of your track, that a ribbon has to cross the track. That gives sometimes an ugly scenery flash. Therefore you have to switch the ribbons off temporarily. How to do that will be explained later.
In this document I normally presume, for most cases, that the ribbons
are equally distributed. Otherwise it will be explicitely announced.
Because the ribbons can show up on any side, I will try to explain the numbering with the following drawing.
Imagine a tunnel. You see that the ribbons are numbered consecuative. Note that it is NOT necesarry to know in this case how many ribbons come from the right, and how many from the left. So look at a2, number of ribbons to the right, as a determination of WHERE these ribbons are cut into a number to the left and a number to the right. If you remember this picture, you will also be able to see easily why you have to rotate the texture on ribbons to the left, and not on the right.
So from right-down to left-down we find the texture-location values: "19,11,12,13,14,18".
If there’s a "cut" in the middle ("2") then the right side constitues of (from bottom) rightbank (19), ribbon1 (11) and ribbon2 (12). The left side constitues of (from bottom) leftbank (18), ribbon4 (14), ribbon3 (13).
In the case there’s a value (Scenery1 (0xB8) a2=3), then the rightside consistets of rightbank (19); ribbon1 (11); ribbon2 (12); ribbon3 (13). The leftside is (f.b.) leftbank (18); ribbon4 (14);
I expect you will see the logic in this, and work the other situations
out yourself.
You could however also use the main scenery-ribbons to make a pitbuilding
that is visible from the pitlane as well as from the main straight. Therefore,
you must enable the ribbons near the start/finish-area, and make the ribbons
start at the edge of the pitlane-road. You can (for instance) make pitboxes
that seem to be carved out of a high rock. An example of the use of pitlane
scenery can be found on the "StuwLake" track.
Here you see two different solutions to the same problem. The aim is
to build a bridge. Both setups are with three ribbons to the right. On
top you see that the visible side of the ribbons (marked in a light pink
here) is faced down on the side where it matters, the water and the trees
to the right. That means that you won't see any of this scenery; it's all
transparent. On the bottem-drawing, you see that basically the structure
is the same, but that the direction in which the ribbons to the right are
defined, is flipped. All of a sudden, the visible side of the ribbons
is faced up, and thus you can now see the water and the trees. Note that
the right bank is to be removed here, and is therefore dotted.
a1: probably offset
a2: most of the time a negative value. typical values: -10240 -14336
-16384 -20480
a3: most of the time a positive value. typical values: 14336 16384
18432 20480 24576
From: "Martijn Keizer" <sa426090@sepa.tudelft.nl>
It is a distance from the center of the road to where the uttermost end of the world is located to the left and right. Therefore, if you enter a value of (-2000,2000), you will notice that most of the scenery is drawn within the margins of the road itself.
The Xvalues of scenery1 are *scaled* on this width-of-the-world. They seem to have a maximum value of 32768. So if you for example make a ribbon to (a3,-32767), it always connects precisely to the horizon. The visual distance from the track to the ribbon however depends on the Scen3 settings. If you put it to (a2,-2000) the ribbon is almost at the edge of the road. If it's put to (a2,-32767), the ribbon is very far away.
The values for Scen1 are the same in both situations, the values for
Scen3 are halved. The black line is the road, the red the armco, the green,
brown and blue are
ribbons and the position for the vertical yellow line, the horizon,
is definened by Scen3. As you can see, just decreasing the values in Scen3
makes the whole
scenery more "dense".
The usefulness of this command is not too obvious in most cases (beside
the fact that it's necessary). The values in the original tracks differ
too little to notice a
difference. I guess 16384 is the "normal" value. I know also that the
road + banks (everything between the armcos) is not affected by the settings
from Scen3. The
road-width settings *may be* of the same unit as these "absolute width
of view" values. But I didn't check that.
This command is used to switch off ribbons. The argument (a2) defines which ribbons. The value is of location code <B>. See also section 3.7
a1: ?always 0
a2: values 0..4 basically it gives the location of the track within
the 6 ribbons. you can also refer to it as the number of ribbons to the
right of the track
a3 .. a14: coordinates of ribbons, r1X (x-coordinate of ribbon 1), r1Z,
r2X, r2Z, r3X, r3Z, r4X, r4Z, r5X, r5Z, r6X, r6Z
here is what paul hoad <paulh@autosim.com> wrote about the cmd 0xb8:
Scenery is determined as a series of RIBBONS that run along the side
of the track these ribbons are defined by the scenery commands along the
tracks, all this
defines is the actual shape of the scenery, you then have to map a
texture to the scenery in the same way as you map a wall or gravel trap
using the (0xbc
commands) by changing the location code in the 0xbc commands from left/right
floor to wall or ribbon you can change the look of the scenery
it seems that the 0xc8 commands at track section 0 also change the default scenery used for the ribbons.
You should think of the ribbons as being continuations of the grass
bank only the height about the road can be defined as can the distance
from the road hence
giving the ribbon a low x( horizonal) and a high z (vertical is going
to make a vertical wall (outside the track wall, hence monaco) now map
a brick texture to it and
you have a real wall. map a set of trees to it and you have a forest
ala monaco or hockenheim, map grass to it and you get a grassy hill ala
Brazil.... getting the
picture yet!
You should think of the ribbons there are six of them (not always 3
each side (this is defined by a2) as providing you with extra surfaces
simply to map textures.
typical order of cmds b9-af-b8 (-ba)
c1-b8-b9-c0-b8
This command switches ribbons ON. The a2 value seems to indicate the
ribbon(s) that need to be switched. The texture location code is of type
<B>. The difference between this command and the Scenery4 (0xD9) command
is a total questionmark to me. See also section
3.7
guess: the difference between 0xB9 and 0xD9 MAY have something to
do with each ribbon available at a different detail-level.
This command is used to force the scenery to "shortcut" the track. When scenery is made in a curved tracksection, normally the scenery follows the curvature of the track. When this command is used, the scenery makes a shortcut, thus following a STRAIGHT line between two scenery-connection points (0xB8 cmds). Note that the scenery5 command is a SWITCH that can be set for some part of the track, and some ribbons using the location code.
The a2 value (and/or a3 value) indicates to which ribbon- locations the command is applied, you can thus force individual ribbons to shortcut. Normally, you use this only on the INside of a corner.
See also section 3.5
In short, this command works EXACTLY the same as a 0xAF command with a zero as 3rd value. So you should look at them as "shorthand" of the 0xAF command. In the original circuits, these commands are only used when there are NO visible ribbons to the right.
Now, suppose you want to add scenery on a track where there are such commands as these. As the scenery is scaled by this command, all the ribbons on the right side are placed AT THE CENTER OF THE ROAD. This gives a mountain on the road, normally this is referred to as a "scenery bug".
If you replace the 0xC0 command with a 0xAF command, values (-16384, 16384) then this type of scenery bugs is removed.
In short, this command works EXACTLY the same as a 0xAF command with a zero as 2nd value. So you should look at them as "shorthand" of the 0xAF command. In the original circuits, these commands are only used when there are NO visible ribbons to the left.
Now, suppose you want to add scenery on a track where there are such commands as these. As the scenery is scaled by this command, all the ribbons on the left side are placed AT THE CENTER OF THE ROAD. This gives a mountain on the road, normally this is referred to as a "scenery bug".
If you replace the 0xC0 command with a 0xAF command, values (-16384,
16384) then this type of scenery bugs is removed.
a2 is equal a3 most of the time (exept e.g f1ct05, f1ct11)
always? following b8; or b0 that is following b8
From: "Martijn Keizer" <sa426090@sepa.tudelft.nl>:
- 0xC3 command - and - 0xB0 command -
This command is, I think, used to temporarily switch off a ribbon
to get it to the other side of the track, in case you go from (u2, scen1)
3 to 2.
That was used after "bridge", 'cause before Bridge Scen1-u2 [0xb8
- a2] was 3 and after 2.
Therefore, a ribbon must cross the street. That normally gives an
ugly flash of green before you. This way, it can be turned off for that
tracksection, giving a nice
clear view.
--- note--
this proves to be wrong. In fact I have no idea what this command
does.
Seems to be something similar [to 0xd0], maybe for another ribbon, or another side o.s.s.
--- note--
this proves to be wrong. In fact I have no idea what this command
does.
a3 is the length of the darkend or light up zone
a4 is the light up or darken factor. low numbers (e.g. 2) is darken;
high numbers (e.g. 12) is lighten.
This command is used to lighten or darken a specific section of the
track. Insert it at the point where you want the change in lightlevel to
start. Fill in the offset, length and lightlevel values. Then, think of
which ribbons, fences or verges this command should apply to. Now, add
up all the location values of those places, and enter this number in the
a2, location code type <A>. Note that the roadsurface will NOT be affected
by this command. The only way to change this is to change the texture on
the road, or hassle around with the 0xc8 command. More on this elsewhere.
(try the 0xc8-tutorial!)
a1: ?offset
a2: typ val 4 16 32 48 512 544 1024 1056 6160 6144 7200 8192 16416
24576 24608 24624
a3: ?possibly ribbon location (see 0xcd) typ val 0 2048 4096 6144
??????
This one seems to switch a ribbon off permenantly.
The a2 value is a location code, Ribbon13: 1024.
????????????
--- note--
this proves to be wrong. In fact I have no idea what this command
does.
This command switches ribbons ON. The argument is again a code for the
ribbons it’s applied to. The way the different positions are numbered is
according to the type <A>. There seems to be no difference between Scenery2(0xB9)
and Scenery4(0xD9). See also section
3.7
Type <A> Location Codes
used for scenery7, 0xD0?, 0xC7?
Type <B> location code
used for Scenery4, Scenery2
Type <0xBC>
used for 0xBC, 0xC8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
· Make sure that every Scenery1 (0xB8) command has
an accompaning Scenery3 (0xAF) command.
· Remove ALL 0xB0; 0xB9; 0xBA; 0xC0, 0xC1, 0xD9 commands.
· Insert a Scenery4 (0xD9) command in the first tracksection
with a2=63.
With these simple actions you are able to make simple scenery-tracks
like the Tunneltrack I built.
Now, you can build some basic structures by adjusting the Scenery1 (0xB8)
values. The way to make it look like a specific thing, like trees, is to
map a texture on the ribbons using the 0xBC command. But that’s a story
that will be told elsewhere…
You should look at this pair as being practically one command, split
in two parts. They should always remain together, else you will get errors.
Note that you can also form pairs 0xC0 - 0xB8 and pairs 0xC1 - 0xB8. These
pairs define the scenery on only one side of the track. More on that in
section 3.5.
In the TE 1.6.7 there is a good representation of the distance a ribbon has to the track. So this will certainly point you to situations where the ribbons make the error described here.
Secondly, a graveltrap on the outside of a corner means that the verges are a lot further form the track than elsewhere. That means, you also have to move your scenery backwards, as otherwise, you will have some scenery overhead when you accidentally drive through the graveltrap.
Another way to create a similar (yet slightly different) effect is by using an 0xC0 or 0xC1 command, instead of the 0xAF command. By doing that, you refrain from defining the scenery on both sides of the track, and choose to define only one. I will make a drawing to clearify this:
I would like to emphasize I drew the ribbons curved, like they appear
in the game, but NOT like they appear in the Trackeditor.
On the left, you see a normal defined scenery, with 0xAFs and 0xB8s.
In the middle, you see the real situation when one of the 0xAFs is replaced
with a 0xC0. This command defines only the left side, making the game connect
the rightside ribbons without taking this 0xC0 and it's accompanying 0xB8
into account.
On the right side, you see that the first curved section has a scenery5,
0xBA command. That causes the ribbons to go straight WITHIN that particular
tracksection.
Note that the scenery5 command is a SWITCH that can be set for some part of the track, and some ribbons using the location code. There is also another command that influences this setting in some way, I believe 0xC7 or 0xC6. You are warned!
The work on Circuit Ultima set me on this. In the Casino corner,
there is a building to the right, made of ribbons. You should examine this
building closely, it's extremely complex, and cost me a few hours to understand.
In t25, the second scen1 (offset 1) defines the right side of the
facade of the building. After that, there follow in t27 three scenery-lefts.
Then in t29, there is a scenery-left (0xC0) , followed by a 0xAF. At this
moment, 4 Ts later and over 4 scenery-lefts, the building-definition continues.
In the meantime we have rounded a 120 degree righthander. Yet, the building
is flat. That's quite logical, as I can't make a guess WHICH curvature
should be taken, if you have crossed four tracksections. That let me to
the conclusion that it would make more sense if it was a straight line
from one definition to the other.
In the meantime, from TE1.6.9 or so, the multiple-scenery cmds is very well implemented in the trackeditor, and this should no longer lead to any problems. It is just good to know that it is possible to use more scen1's in one TS. They all must have a 0xAF or 0xC0/1 before them ofcourse, otherwise things will get mixed up. The offset that you put in the 0xAF/0xC0/1 is used by the 0xB8 to define where it's located. This particular thing is not yet implemented in the TE, and all scenery definitions appear to have taken place at the start of the TS.
The main way to switch ribbons on is using the Scenery4 (0xD9) and Scenery
2 (0xB9) commands.
The way to switch an individual ribbon off, is using the 0xB0 command.
The values in the arguments of these commands indicate a texture location,
of type <B>.
In this picture you see how it works. The bars indicate whether a ribbons
should be switched on or off at a particular tracksection. You should have
a picture like this in your head, when you're making the scenery. Now,
you see on this picture where you have to insert the commands in order
to get the commands switched on and off. Between bracketts, I have placed
the appropriate a2 value of the particular command. On the right you see
the <B> type location codes, directly from the location-table
in 2.2. Note that every command has to be inserted at the first tracksection
in which it should work. For example, the first command should be inserted
in t1, and the last one in t19 (not drawn in the picture)
Paul Hoad has made a drawing in the TE just like this, so you can monitor where your ribbons go in case you miss one. It is accesible by clicking a 0xB8 in the pitlane, or on the track.
Switching a ribbon to another side therefore usually implies to switch
a ribbon off, and on again. To know which ribbon you have to switch off
can be figured out, but as an extra service I put a table here. Note that
the back-switching implies the temporarily switch-off of the same ribbon
as the switch-forward.
ribbons to right | 0 | 1 | 2 | 3 | 4 |
0 | X | 1 | 1,2 | 1,2,3 | 1,2,3,4 |
1 | 1 | X | 2 | 2,3 | 2,3,4 |
2 | 1,2 | 2 | X | 3 | 3,4 |
3 | 1,2,3 | 2,3 | 3 | X | 4 |
4 | 1,2,3,4 | 2,3,4 | 3,4 | 4 | X |
By the way, this method does not work always. It's partially an unknown section of scenery-editing, and I can't really help you much here. Trial and error is the thing, unfortunately. One way to help you is this: Apply in the trouble-zone (temporarily) a good recognizable, and different texture to all ribbons, like water or gravel. This way, you can easily spot in the game which ribbon# gives the problem.
This command does not apply to objects. For objects, there are other
commands that define the lightlevel, but these are still unknown.
Normally, if you just change the number of ribbons to a side, and adapt
the 0xB8 values, there will be a piece of scenery crossing the track. Sometimes,
though, you are lucky and are bug-free. But if you're not, you obviously
have to switch off a ribbon for one TS. The problem it, to determine which
one. A method that works is to put a different texture to each ribbon,
and then you can easily spot which one is crossing the track. Then you
know which one has to be switched off. A bit of a trial and error, but
I can't think of anything else right now.
If you come up to a certain structure that you wonder about, let me know, and I can include it.
The thing that makes a wall look like a real wall is ofcourse the texture. But I initially decided that texturing commands and uses are outside the scope of this tutorial. If anyone feels it should be included, let me know.
Left you see the grandstand used in the original Brazil track, before
start/finish. It's just a plain slope, covered with crowd-texture. The
main advantage of using ribbons for grandstands, over objects, is that
you can easily curve the grandstands. That can be seen too on the original
HockenheimRing, where the grandstands are curved for a long way. In the
middle you see the grandstands that are build there, where there is a little
roof build. The dimensions are a bit exaggerated, for clearity reasons.
On the right you see a made-up grandstand, which you can find on the Elkhart
Lake track (by Romeo and me), where the stands consists of two rows, clearly
set apart by a vertical ribbon with another texture. These places are ideal
for some advertisements.
The illustrations used in this tutorial show the ribbons and banks colour
coded so as to make it simpler to understand which ribbon is doing
what.
Here is the key to the colour coding.
< tunnel_0.jpg >
OK. Lets get started. In the diagram below we are locating the ribbons
to form
the outer bases of our hill. Hence the large X values to take them
out a long
way out from the track, and the absence of height (all Y values = 0)
since our
hill will naturally be starting from ground level.
< tunnel_1.jpg >
With the track section 2 scenery command we start to raise the ribbons
and bring
them back towards track, thus creating the start of our hill.
Note: For the values used in this tutorial, track sections 1 &
2 should be in
the order of 10 units length to give a nice result.
< tunnel_2.jpg >
The scenery command at the start of TS#3 is really just a continuation
of the
trend set by TS#2 scenery values. Remember that the rate of rise (gradient)
of the hill through TS #1 is controlled by the values at the start
of TS#2,
and that TS#2's gradient is controlled by TS#3's values. The reason
that this
had been pointed out is that if you study the Y values between the
TS#2 command
and the TS #3 command you will notice that about 55-60% of the rise
of the hill
occurs DURING TS#1, and TS#2 is left with about 40-45% of the remaining
height
that makes up the Y co-ordinates total value at TS#3. This gives our
hill a
"rounding off" effect.
Remeber that both TS#1 & #2 have to be of a similar length for
this to be valid.
< tunnel_3.jpg >
You could leave out TS#2 altogether and just have a straight hill rise
to the
start of TS #3. Alternately, you could put more sections in for an
even nicer
rounding effect on the hill side. Whatever you feel like!
You have no doubt noticed that Ribbon 3 finishes TS#2 (i.e starts TS#3)
at the
same co-ordinates as ribbon 4. That is because we have to turn ribbon
3 off for
it's journey through TS#3 as it must cross the track. If it was still
higher
than Ribbon 4 we would see it suddendly stop when turned off. Not very
pretty.
So we piggy-back it briefy on ribbon 4 to hide it's changing of state.
To this extent, TS#3 must have an 0xb0 command to turn ribbon 3 off.
The section offset a1 will be 0, and the location code for a2 will
be 4.
Also, TS#3 is typically very short. Just one length unit is normal.
Now to the start of TS#4. Ribbon 3 has crossed the road and is connected
to the
top of ribbon 2. Time to turn it back on. The simplest way is to just
throw in
an 0xd9 with an a1 value of zero, and with a2 = 63. This turns 'em
all on.
Also notice that there has been a slight increase in the hill's height
again.
This is optional, but I think it looks a little better this way.
< tunnel_4.jpg >
TS#4, like TS#3, is also usually just 1 unit in length.
And now last, but by no means least, we reach TS #5; the actual start
of our tunnel.
The values used here are simply copied throughout the length of the
tunnel.
< tunnel_5.jpg >
During TS#4, ribbons 2 & 4 have been lowered, taking the still-connected
ribbon 3
with them. This gives us the front face of the hill that becomes the
roof of the
tunnel in TS#5 once lowered.
When you get to the exit, it is simply a reverse of the entry (except
that you will
still have the 0xb0 before the 0xd9 of course) and then you can adjust
the values to
achieve the desired result. For example, the ficitious Eagles Nest
circuit (available
from Sjon's) shows a nice version of an exit that becomes a hillside
spectator mound
on one side.
The only other thing to mention here is that the track verge values
used are 15. If
you go for a tight tunnel with small verge values, say about 12 or
less, you may
notice that you have flags being waved by a marshall's arm which is
protruding from
the wall on the side of your tunnel. Ghost marshalls perhaps? Kinda
spooky, and not
too reassuring for Schuey, Fissi, Damon & co as they blast on through....
The commands used for view-ahead are 0x81 and 0xBE. Exactly why there are two commands remains unknown, but just remember to put an 0x81 AND and 0xBE in the middle or before every corner. It is advisable to use the same distances in both commands, although not neccesary. For the location code, I would say use 63, but maybe 48 works just fine.
Maybe the best way to check the "view distance behind" commands is by driving the track the wrong way around. Then, you can immediatly spot that for a long straight, the view-command is placed AFTER the straight, not before. So build them in exactly the same way as the view-distances in front, when thinking of driving the wrong way. Use the commands 0x82 and 0xBF.
The units of these commands is the same as the tracklength-unit so you can calculate which values you need by looking at the length of the straight following your command. Most of the time, values around 150 are enough.
- Insert a lot of Scenery3 (0xAF) and Scenery1 (0xB8) commands,
before and after each corner at least. Make sure the Scenery3 command comes
before the Scenery1 command! To do this efficient, insert a scenery3 command
in the first TS, "copy" it, and "paste" it at strategic places. Then, insert
a Scenery1 command at TS0 and fill in some decent values. Now, "copy" this
command, then paste it at exactly the same locations as you put the Scenery3
cmds in. Don't miss any, and don't put in too many. Next, include a scenery4
[0xD9] command [a2=63] in the first TS, like told above. Then, remove all
the influencing commands as explained in Ch3, Guideline.