
Things I've made!
Mop of Destiny
DrilNES
| Wednesday, September 21, 2005 |
 I'm Supposed To DRIVE on THAT? |
Posted - 9/21/2005 6:29:04 PM | Another week-plus break in journal entries. That's starting to become a bad habit, but I don't like updating when I don't have anything to show.
Which brings us to today's entry: I have something to show.
I created a new track editor. You may remember seeing screenshots of my previous track editor, way earlier in the journal. Those people who DO remember this are thinking to themselves, "That bonehead said that he would keep the existing editor because it works." This is true. But, I decided that it was slightly hard (and by "slightly hard" I mean "nigh impossible") to do some of the things that I really wanted to do fairly frequently (like spiral curves and full loops, to name a few). Plus, as the previous system was written using bezier patches , it took many patches to do any one feature (a loop generally took about 16-20 patches). This was lame.
Since I am no longer using beziers as my basis for all terrain rendering, it's no longer advantageous to use them exclusively in track creation. So I started over.

Click to Enlarge
Each track segment gets the following attributes (which are relative to the track segment's initial orientation):
- Length - This represents the angle of the track relative to the in-game representation of the north star. That, or just the length of the track down the middle. I can never remember which is which.
- Width - Determines what the width will be by the end of the section of track (the previous section determines the initial width).
- Curve - The amount of curvature of the track. A negative curve is to the left, positive is to the right. A 360 degree curve is, as expected, a full rotation.
- Horizontal Skew - This is how much the track strafes to the side (along a sinusoidal sort of path) across its length. It's like a lane-change. Only the pavement is changing lanes, not the car.
- Incline Curve - This is the circular incline of the track. A 360 degree value of this would be a full loop. Positive is up, negative is down.
- Vertical Skew - Similar to the horizontal skew, only vertical. How's THAT for descriptive?
- Twist - This is how much the track rolls to one side or the other along its length, which modifies the orientation for the next segment
- Bank - This is similar to twist, except it raises one side instead of twisting around the middle, and the orientation remains unchanged in the next segment of track (this is to allow for banked curves, which I wouldn't want to curve upwards because of the bank or something stupid like that).
Given those properties (And a semi-complicated way to combine them which I won't detail here), I can still generate a track in segments. But I can use less segments to do the job.
   
Click to Enlarge
Once I got it generating, then I decided to make it considerably more adaptive. So it divides up the curves according to an error metric, which is why, in the last screenshot, some of the bits of track have fewer polygons (the straight bits only have one big one), and others have more.
The last thing to do is be able to export it to an actual mesh, so that I can load it up in a 3D modelling program and build the landscape around it.
But, for now, I can work on actually getting a car to drive on the track. Because now that I have a few levels, I want to find out what it's like to drive on them!
| |
Comments
 |  Laz
Member since: 9/20/2001 From: Del Rio, TX |
Posted - 9/21/2005 7:44:49 PM | That looks so flippin cool. Wish I could do that :(
| |
 |  Rob Loach Staff
Member since: 12/2/2002 From: New York, NY |
Posted - 9/21/2005 9:22:38 PM | 
L337!
| |
 |  H_o_p_s
Member since: 1/24/2005 From: Boston, MA |
Posted - 9/21/2005 10:20:59 PM | O_O
| |
 |  benryves GDNet+
Member since: 9/4/2003 From: Purley, Greater London |
Posted - 9/22/2005 6:34:50 AM | Awesome. I loved 4D Stunt Driver...
| |
|
| S | M | T | W | T | F | S | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | |
OPTIONS
Track this Journal
ARCHIVES
January, 2010
June, 2009
May, 2009
April, 2009
March, 2009
February, 2009
December, 2008
November, 2008
May, 2008
April, 2008
March, 2008
February, 2008
December, 2007
November, 2007
October, 2007
August, 2007
July, 2007
June, 2007
January, 2007
December, 2006
November, 2006
October, 2005
September, 2005
August, 2005
|