maandag 4 april 2011

Creating a simple race track

In this blogpost I'm going to show you how to build a simple racetrack using two splines and a texture using loft in 3d studio max. With this method you can build and texture a track in no time and have a lot of options to adjust and edit your track without messing up the mesh or the UVW coordinates.
First we need to create the shape of the track using a spline, next we need to determine the profile of the road also using a spline. In this example I've made a shape that resembles the profile of the road and the sidewalk.
Now we are going to create the track using loft. First select the track spline, go to the Create tab and select "Compound Objects" in the drop down menu. Now press the Loft button and change Instance to Copy in the Creation Method menu. Now press the Get Shape button and select road profile spline. The result can be seen in the image below.
Turn off automatic banking in the Skin Parameters menu, we'll add the banking manually
Note: Sometimes its necessary to flip the objects normals. There is a flip normals option in the Skin Parameters menu.

A big advantage of the loft is that it automatically creates usable UVW coordinates. Now create a road texture and apply it to the track mesh. You can set the tiling of the texture in the Surface Parameters menu, now tile the texture until it looks ok.
And what if you have done all this and you're just not happy with your track shape? No worries it can easily be adjusted without messing things up. To edit the spline expand the Loft menu by clicking on the Plus icon in front of the Loft text (see image below). Now hilight Path, as you can see Editable Spline appears below, now click Editable Spline and start editing you shape. In this example I've raised some of the vertexes to give the track some higher parts. When you're done exit the Editable Spline menu and go back to the Loft.
Now we'll add some banking to the corners, this can be done using the Twist option in the Deformations menu. Here you can determine the banking of each part of the track.
Fiddle around with all the options in the Loft menu to see what they do. Here's a close up image of the end result.
That's it for this post,
Cheers Matt