Track Creation 103 – Trackeditor

November 6, 2009 at 1:55 pm Leave a comment

Much of how this program works is quite simple and straightforward, so I’d rather not waste time repeating the obvious.  Instead I’ll look at the basic idea behind this tool, what it can do and (as of the latest version) what it can’t, and look at a few quirks that will help you get the most out of it.

As I touched on in the previous post, Speed Dreams reads XML files that describe the layout of each track.  The radius and arc of each corner, the length of each straight, the location of the pits, the surface properties of the track, track borders, side runoffs and fences/walls – all are detailed in the XML.

The aim of the trackeditor is to give you a visual method of creating this XML. Using it you can create a new track, define basic properties such as the width of the track, the pit side, location, entry and exit.  Clicking on one of the three green arrow buttons (straight, right turn, left turn) lets you add segments.  The Segment Editor popup dialog lets you adjust the length (if a straight), or the arc, start radius and end radius (for corners) of each segment.  As you move the sliders you see the segments change in the main window, which is very cool.  You can also edit the width and surface of the borders, runoffs (“Side”) and fences (“Barrier”) for each side of the track.  With your background image loaded you can easily create a track that closely maps your design.

So, what are the limitations?  Well, firstly, trackeditor assumes the “profil steps length” is always 4, no matter what value appears in the XML.  This value is used to determine how long each of the little mini-segments are that comprise a track segment.  The default value, 4, means each will be 4m long, which gives you a nice smooth track.  It also creates a lot of surfaces that may not be that necessary and will result in the track taking a long time to load.  If you change the default value in the XML the alignment of the track will slightly change, causing the end & start segments to no longer line up.  Unfortunately the trackeditor won’t show you when this has happened.  You can also change the profil steps length for individual segments, but again trackeditor doesn’t know when you’ve done it and won’t show you any changes.

What else?  Ah yes, it has no support for segment elevation, as it explicitly sets every segment’s z heights to zero (ignoring what’s in the XML) and doesn’t save changes you might make in the editor.  Neither does it know about the “grade” value.  Track camber?  No, not supported.  I’ll look at all of these in the next post, as you’ll need to edit them directly in the XML itself.

What I suggest you do is, create a basic track using the trackeditor from start to finish, getting the end of the last segment as closely aligned to the start of the first segment as possible.  Hit the save button, then open the XML file in a text editor of your choice.  You’ll see a couple of things right away.  Firstly it has a “Main Track” section that gives default values for each segment.  Then the segments are listed, each with their own list of values.

Here’s where the trackeditor, unfortunately, gets really annoying.  By default it sets every track border to “curb-5cm-r” with a style of “plan” and a height of “0.05”.  Do you really want raised curbs bordering the track along its entire length?  No, didn’t think so.  Do you necessarily want them to be 0.05 in height?  Maybe, maybe not.  Now you could use the trackeditor and go along changing each segment, but ugh, the pain!.  What I’d suggest you do instead is use a Find & Replace to change “0.05” to “0.0”, and “curb-5cm-l” to “tar-grass3-r”.  You can add curbs back in later where you need them.

What else is there?  Oh yes, the barriers.  For some reason it saves them as style “curb”, which is just plain wrong, with a width of 0.1.  These will be double-sided fences with weird texture mapping.  Fences should either be of type “fence”, which is a single row of polygons using one third the resources of the default curb-style barriers, or “wall”, which will give you a nice 2 sides & a top shape that is easy to map to a texture.  Wall is necessary for things like concrete and tyre barriers, while fence is fine for armco railings and wire or wood fences.  Feel free to globally substitute “0.1” for “0.0” and “curb” for “fence”.

Now, reopen the file back in trackeditor, and click on the segments where you want, say, curbs instead of a flat tar-grass transition.  Change the border surface to curb-5cm-r and, if you want a height > 0, its style to “curb” as well.  Follow this procedure for areas where you want sand runoffs instead of grass, or tirewalls (which will need a width value of at least 1.0 and a style of “wall”) instead of fences.

Once you’ve finished that, you’ve pretty much done with the trackeditor – everything else needs to be done by editing the XML, and then the 3D model itself.  Note that you can use trackeditor to create the 3D model, but that won’t work once you’ve started adding heights, grades and cambers in the XML.  You’re better off opening a command prompt in the speed-dreams directory and running trackgen from there.

After you’ve run trackgen, fire up Speed Dreams and test drive.  You want to be 100% happy with the layout, bearing in mind it has no camber/slope changes yet, before you go any further, as it’ll be terribly painful coming back later trying to fix something you should have taken care of now.

Let me conclude by saying that work is underway to write an improved track editor, but I don’t know how far away it is or what features it will have.

Advertisements

Entry filed under: Tutorials.

Track Creation 102 – Design your Circuit Track Creation 104 – Grades and Cambers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories

Archives


%d bloggers like this: