Wednesday, September 8, 2010

Creating a Roller Coaster in Blender 2.5 - Part 2 (Creating the Actual Ride)

In this part of the tutorial, I will be showing you how to extend the track and create all of the loops, twists, and turns that make a roller coaster a ride instead of just a flat track.  

This is the finished result of this tutorial:

First, let's add a Path Curve (Shift A - Curve - Path).  Now go into Edit Mode (Tab), and move the vertices over to the right a little bit (G - X - 2).  Tab back into Object Mode, and select the roller coaster track piece (Right Click).  Scale it down (S - 0.25), and click on the Modifiers button on the right.

Select 'Add Modifier' and choose 'Array' from the drop-down menu.  Under 'Relative Offset' set the X value to 0, and the Z value to 1.  You'll now notice that if you raise the 'Count' number, the track will get longer.  This is what we want, but right now the mesh won't deform with the path curve.  To fix this, add a Curve Modifier on your track.  Under 'Object', type in the name of your curve (or click on the box, and select your curve from the drop-down menu).  Your Modifier setup should now look like this:

Now if we select our path curve (Right Click the Curve), go into Edit Mode (Tab), right click one of the vertices to select it, and move it around (G), the track should follow it.  You can mess around with it for a little while, but don't stretch it too far, or it will mess up the mesh.

Now modify your path Curve to create the track.  Remember, Right Click to select, G to move, R to rotate, E to extrude.  Don't just move it around in the top view (7); make sure you view it from the front (1) and side views (3) as well.  Keep in mind that we're working with 3 dimensions, not 2.  Once you're finished, simply raise the Count on the Array Modifier until you have enough track pieces on.  You may need to resize the track pieces a little in order for them to fit well on the track.

And that's all for this part of the tutorial!  Congrats on completing it, and I hope you'll read the rest of the series when the other parts come out.  If you have any questions, comments, or problems, post them in the comments below.  Thanks for reading!


  1. interesting :D I think I'm going to have to go back to part 1 and actually follow it (I've been meaning to though).

    on another note, there's something I'd like to ask :) how did you get that picture in the background to work? I'm trying to completely redesign my blog, but I can't figure out how to put in a custom background image...

    thanks! :D

  2. To get the blog image, I used CSS. Go to the Design section of your blog, then click on Template Design, go under the Advanced tab, and select Add CSS. This is what I used:

    body {
    background:url( no-repeat;
    font:x-small Arial sans-serif;
    font-size/* */:/**/small;
    font-size: /**/small;
    text-align: center;
    background-position: center;
    background-color: black;
    background-attachment: fixed }

    Keep in mind that you'll have to change the image URL to get the one you want; I'm not sure yet how to get an image for your background off of your computer, and not a web address, so the image you use will have to be off the internet (unless you figure out how to do otherwise, or you already know how). I just got mine from my blog, so the backgrounds I use are only images uploaded to my blog. Hope this helps, and I also hope it wasn't too confusing. Oh, that includes giving it a black background (meaning whatever space the image doesn't fill, a black color does). If you want to change that, delete this line from the script:

    background-color: black;

    or change 'black' to another basic color you'd like.

  3. thanks a lot Ben! :D I'll copy-paste this into a document so don't forget :D

  4. oops, I meant "so I don't forget"...

  5. Hope that made sense to you. If it doesn't work, tell me.

  6. nope, it worked perfect :D thank you very much!

  7. No problem! Glad it worked for you :)