View Full Version : Animating on a rail
CourtJester 08-01-2003, 05:54 PM I'm trying to resolve a question that seems like there is a simple answer someplace, but I can't seem to get it.
I need to animate a car on a rail. Essentially, I want a setup that allows me to precisely define an arbitrary path in Layout for the car to follow... and then only have to deal with a single variable for the car's position along that rail. That's so I don't have to deal with balancing X and Z curves to keep the car from sliding around as I adjust its stop and go motions. Instead, it would be like animating on one axis.
The car is a complete assembly with bones etc. and a control null. I'd like to avoid parenting that control null if possible, but that's not an absolute requirement.
| |
MorBioS
08-01-2003, 10:11 PM
Do you try some worley plugin ??
I don't know if help you, but worley have many plugins for car dynamic.
CourtJester
08-01-2003, 10:50 PM
The only ones I know of that's car related is Wheelie, which we use for tires, and VelAccel, which isn't what we need.
coryc
08-01-2003, 11:30 PM
Ahh! Make it go away!
I just did a 10 minute animation of a train running through a rail yard and I found no easy way to animate this. There are ways to get a constant motion aligned to a rail but you can't stop, restart, slow down, reverse, etc...
I ended up keyframing all my movements which meant keyframing up to 80 rail cars. I have suggested and hope they implement an ability to snap an object to a curve and allow keyframing.
preludian
08-01-2003, 11:41 PM
Hi coryc,
damnit, I have the same problem, tried many ways without success, keyframing isn't what I wished for. I thought maybe an expression would help, but haven't had the time to start learning it. I think with LW 8 there is a easier way, please correct me if I'm wrong, but I want to finish the motion sooner than the LW8 release.:p
br
preludian
coryc
08-02-2003, 12:01 AM
:banghead:
Sorry. I don't know of a faster way. I tried expression with no luck. The only plugin I heard of that might have done what I needed was Relativity but that doesn't appear to be available for current versions of LW. So I just kept keyframing. I was even keyframing in my sleep :annoyed:
vangaans
08-02-2003, 02:32 PM
OK this is easy and straight forward in Lightwave.
What I generally do is
create a spline curve in modeler to the shape I would like my rails to be
Shift,+ keys to create points (right click)
With points selected, Ctrl, P to create spline curve.
Create your rail profile in background layer and rotate the profile to match your spline/path direction.
Switch layers so that your spline is now in the background, Rail extrude your rail profile along the path (multiply tab)
Settings: Uniform knots at whatever intervals you set
once you have created your rails. select your original spline on the first layer and file, Export, PathtoMotion. IMPORTANT when naming the file make sure you use the .mot extension. eg "Rail.mot"
Switch to layout, load your newly created rails, select your train object, and go to File, Load, Load motion file. select your saved motion file. Train now travels on rails...
Is this what you are trying to do?
Paul Van Gaans
www.vangaans.com
coryc
08-02-2003, 04:14 PM
I tried this way and it works for a constant travel rate but what if you want to stop or slow down and you have multiple vehicles (a train) running. I could never keep them connected.
Steve Warner
08-02-2003, 06:40 PM
Faulkermano's PathAnimationIA plug-in will let you do this. Here's a link with a little more detailed explanation:
http://www.cgtalk.com/showthread.php?s=&threadid=77905
To speed things up and slow them down, you would create your motion path as per vangaans instructions. In Layout, apply the motion to a Null. Then apply the PathAnimationIA plug-in to your train object and have it inherit the motion of the null. This will give you a custom channel which you can tweak in the Graph Editor. By making adjustments there, you can speed up, slow down, stop, and start your object, and you won't be limited to a fixed amount of time to complete the motion.
Hope this helps!
Steve
CourtJester
08-04-2003, 11:59 PM
Stee, great tip! PathAnimation IA does everything we want.
EXCEPT..................
Worley's Wheelie doesn't read the motion right when the car's control null is being driven by PathAnimation IA. They slide and skid around, so it looks like Wheelie isn't seeing PAIA's results properly.
And what's worse, motion plugins do not talk to the graph editor! This means that I can't bake out the animation anywhere (using the otherwise excellent Bake This Channel function) so that Wheelie sees normal animation.
Motion Baker to the rescue? Hah! It yields line segment results, as if the source path (created in Layout with a null) were linear keys only.
dammit all.... so close. But the only thing we'd use PAIA for is cars, and Wheelie is indispensable.
help!:scream:
Facial Deluxe
08-05-2003, 02:53 AM
MikeRB solved I think your kind of prob with some clever follower use.
I'm asking him if I can send you the files...
Facial Deluxe
08-05-2003, 09:24 AM
http://www.3dluvr.com/blackbourn/web/dragon_example.zip
Here it is. But re reading your thread, I think I didn't understand your prob the first time when I red:blush:
hypercube
08-08-2003, 01:03 AM
Actually have done some stuff like this back in the day using PhaseLink instead of VelAccel or etc..just set it up to the total length of your motion path keyframes, hook it up to a null or whatever you like, then use that as a percentage-along-path controller..perhaps a little counterintuitive, but it works and Wheelie should see it as moving properly.
Hope that helps or gives you some further ideas..
kretin
08-08-2003, 03:46 AM
You could do it with a Follower expression. Animate a null around the track/rail/path. Then tell your car master to follow the nulls position/rotation with a time offset based on the position of a "speed" null. There's prolly a few more variables you'd need to work out, but I'd imagine it's possible...
Actually, thinking about it a bit more, Cyclist would be ideal for this. Move your car around its path, then use Cyclist based on the Z (or whatever) movement of a "speed" null....
erikals
08-14-2003, 08:42 AM
I guess you already heard about it, but "Amelie" should do the job.
(Look at the train.mov example :) )
http://www.rayserver.com/amelie/examples/
CGTalk Moderation
01-15-2006, 08:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.