PDA

View Full Version : Spline control to animate a car properly?



Sebasvideo
01-31-2014, 06:00 PM
I was just watching the video where Jennifer Hachigian talks about spline control, and I was wondering if it could be used somehow to make a car turn a corner properly. I know it can be used to make a car go along a path, but here's what I mean. I tried this in Modo several months ago and I couldn't figure it out, and nobody knew when I posted at their forums, so I moved on to other things. The problem I had was this: I drew a path which the car followed and I constrained the car's main locator to that path. So when I keyframed the percentage from 0 to 100%, the car would travel along the path. I even keyframed the front wheels so they would rotate at the same time.

But here was the problem. I was making this car go on a city street and then turning around a corner. But because there was only one locator constrained to the path, the car would always turn the corner in a weird way. There were roughly three logical choices:

1) Put the locator right in between the two front wheels. This would cause the front of the car to look normal while turning, but the back looked like it was sliding when turning the corner.

2) Put the locator right in the middle of the car, exactly between all four wheels. This caused all four wheels to slide in an unnatural way (again, when turning the corner).

3) Put the locator between the two rear wheels. This would cause the front wheels to slide sideways, you guessed it, while turning the corner.

No matter how hard I tried to figure it out, I couldn't find a way to have two locators constrained to the path, one between the rear wheels and another between the front ones, which seems to me would have been the right way to have it turn the corner in a natural way.

So is this something that I could achieve with the spline control, and if so how? If not, is there some other way?

RebelHill
01-31-2014, 08:21 PM
You can do it any number of ways, though spline control does offer a quick easy way to do it.

Here the parent item at front wheel position, runs down the spline. Child item comes along with and targets parent from rear wheel position... car is parented to this and the main body now aligns itself around turns in the path. Then front wheels just target ahead in the path a little again. Thats the basics... plenty more you can do... http://www.youtube.com/watch?v=GcpvEwnkC1Q&list=PL1C4072533A16B807&index=1&t=04m15s

djwaterman
02-01-2014, 04:06 AM
A car should turn on its rear wheels, the front turns and then evens out as the new direction is achieved, it was always tricky to get it right with key framing, I want to look at RH's solution, because it'd be nice to have it work like it should without all the second guessing and back and forth testing.

Sebasvideo
02-02-2014, 09:58 PM
Thank you both for your replies, I have been busy with other things for the past couple of days, but I will try your suggestions as soon as I can and report back.

jeric_synergy
02-02-2014, 11:41 PM
Yes, it's surprisingly hard (haven't looked at RH's solution yet) to get it to look right w/straight key-framing.

Sebasvideo
02-10-2014, 07:12 PM
You can do it any number of ways, though spline control does offer a quick easy way to do it.

Here the parent item at front wheel position, runs down the spline. Child item comes along with and targets parent from rear wheel position... car is parented to this and the main body now aligns itself around turns in the path. Then front wheels just target ahead in the path a little again. Thats the basics... plenty more you can do... http://www.youtube.com/watch?v=GcpvEwnkC1Q&list=PL1C4072533A16B807&index=1&t=04m15s

Hi again, I tried the scene in the zip file you posted here, but it's asking me for a plugin called RH_RigBox, which I assume it's one of yours. Is that part of your RHiggit package? Either way, the car doesn't move when I move the cursor forward, I don't know if it's because it's missing that plugin or not.

RebelHill
02-10-2014, 07:28 PM
ignore it, and dont move the timeline... move the drive

Sebasvideo
02-10-2014, 07:45 PM
Oh, now I see what you did... Which is exactly what I had in mind, but now I realize it doesn't work as I thought it would. I see that you constrained the locator between the front wheels as well as the one between the rear wheels to the path set by the spline control, however it makes the rear wheels slide when it's making the turn, and it's more noticeable the sharper the turn is.

So now I'm wondering how are you supposed to rig a car so that it turns with a natural looking motion. :bangwall: :compbeati:

RebelHill
02-10-2014, 08:01 PM
Yeah... that's only the basic setup done in 2 minutes... if you want absolute physical accuracy then you'll want to cross reference between wheels, setup a rig for differential, etc, etc.