Understanding path based animation....

Apparently I do not.

The Setup:
I’m working with a group of people on an open source follow on to RollerCoaster Tycoon. Right now I’m trying to develop a proof of concept animation for a certain ride design, what will become the games version of the Crazy Train or High Roller style of thrill ride.

The initial phases were quite painless. Right up until I started trying to use a path to define the motion of the ride cars around an eliptical track, leaving me with TWO major problems, and possibly one more that I dont know how to solve:

Definite problem 1: The cars run a single loop along the path, lasting 100 frames. I need the cars to make 1 loop every 100 frames for the length of the animation, which right now I’m thinking will be 60 to 100 seconds (1500 to 2500 frames)

Definite problem 2: I created a path by splitting verti from the inside of the loop to create the path the ride cars will follow. Parenting the first car to the track worked ok… but when I added the second, it rotates and generally acts like its rigidly bound to the first ride car instead of following the path independently.

Possible problem 2a: If the problem is that I need to duplicate a separate path for each ride car, this really means I’m going to have to rotate the first and last points so that they are close to the car in question. How can I rotate the path points strictly along a path as defined?

Photos worth a thousand words area:
Examples of the 2nd car not following the path:

Car(s) correctly at rest at start/end of path…

I was also going to include the .blend, but apparently your only allowed to attach images here; probobly to keep Elyisun’s server bandwidth from getting totally zorched?

Link to 10 second test render of above:

I’ll do that… If thier activation email ever shows up. And yes, I’ve checked my trash and spam buckets to make sure it didnt get diverted…

Doing looped roller coster animations is oddly difficult to do … A path has a start frame and and end frame even if it is physically a closed curve … but fortunately someone called jugglerjuggler posted the question here and at a German Blender forum and figured it out …

Here is my quick and bare version of his solution : http://uploader.polorix.net//files/307/roller_coster.blend

What you have to do is to add a path/curve that will act as the path for your coaster then you add a rectangular plane and size it appropriately and then subdivide it a few times and then “triangulate” it (just look at what I did) and then add your carts (the cubes), duplicate the number you want and then position/align them along the plane . And then you select a cart mesh then shift select the plane and then tab into Edit Mode for the plane . And (this is very important) select three vertices in the plane (so they triangulate) and hit Ctrl-P . This will make the cart the child of the verts … vertex parenting . This will solve your cart following cart problem .
Now all you have to do is to select the plane and go to the Modifier Stack and add the Curve deform modifier and add the name of your path/curve .
To get an animation going open up an IPO curve editor with the plane selected and select the LocX curve and add a couple of keys with Ctrl LMB and then set the curve to extrapolation … the carts will nicely loop as long as you want it to … You can also just grab the plane in the 3D view and manually key it (it won’t fly off the path only move along it’s X axis) to simulate acceleration etc…

Now you’ll notice that I have a giant empty in my scene which is the parent of the two planes that are in the scene and I have keyed it instead of the planes themselves … this was easier for me but if you want to simulate acceleration and other stuff, the above method would be better … The empty quickly disappears in to the distance in my case …

Thanks. Thats got it whuped for the most part, only to bring up a question about drivers…

IE I’m using them to help drive the animation. At the moment I’ve got two of them, one for the path’s LocX to drive them around and around, but a second that’s supposed to drive the loop track’s RotX. Well, it does, but only while its moving on its driver axis; what I’d hoped for was something more like a speed control.

Right now I’ve got a python expression for ob(“Loop”).RotX of self.RotX + (ob(“lrotycon”).LocZ * 36), where lrotycon’s Z location is meant to control the speed of the rotations. Well, it works fine… while lrotycon is MOVING in a positive direction along global z. once it slows down and stops, so does the rotations, and when lrotycon moves in a -z direction, the rotations reverse! Which might be all fine and well, but I was trying for an expression where a z loc of 0 means no rotations, -z is run backwards, and +z moves it forward, based on the actual Z position, NOT the z MOTION.

Well, the problem seems to have resolved itself by going with a double axi movement. Now the py.driver expressions look like this:

ob(Loop).RotX = self.RotX+ob(lrotycon).LocZ
ob(Loop2).LocX = self.LocX+ob(lortycon).LocX
ob(lrotycon).LocX = self.LocX+self.LocZ
ob(lrotycon).LocZ is Keyframed, and moves between global z:0 and global z:1

which gives me a correct looking result as you can see here: