Jump to content
Hash, Inc. Forums

Car suspension rigging


itsjustme

Recommended Posts

I figured this would be the best place to put this...it is an illustration of something I mentioned in another thread. It's a very simple car suspension. Don't critique me to death, I realize it needs a lot more. My only aim was to illustrate how to keep tires on the road using the same method that is in an IK leg. The example was made in v13.

 

I hope this is helpful to someone.

car_suspension_example.zip

Link to comment
Share on other sites

David,

 

Very impressive.

 

I am still trying to figure it out.

 

Is there anyway this could be made into a rig to apply to 4 wheel vehicles?

 

Thanks for your efforts!

David

 

EDIT: How do I make it work?

Link to comment
Share on other sites

David,

 

Very impressive.

 

I am still trying to figure it out.

 

Is there anyway this could be made into a rig to apply to 4 wheel vehicles?

 

Thanks for your efforts!

David

 

EDIT: How do I make it work?

 

This should work fine for four wheel vehicles, each wheel is independent of the others.

 

The bones to make rotate for the wheels are the "wheel1", "wheel2", "wheel3" and "wheel4". The nulls that you can use surface constraints to keep the wheels on the road are the "IK_wheel1", "IK_wheel2", "IK_wheel3" and "IK_wheel4"...those will also turn the wheels left and right. To move the entire car, you'll have to add an overall base bone that has all of those bones as children...I'll post an updated one for ease.

 

Hope that is helpful, David.

car_suspension_example_update.zip

Link to comment
Share on other sites

Hey David, is this for v13 only?

 

Mike Fitz

www.3dartz.com

 

No, I was just working in v13...it's a habit. I only mentioned the version I used in case someone had a problem loading it. I could put together a v12 version...I'll have to make some time to do it tonight. My brain doesn't always engage. Sorry if this has been an inconvenience for anyone.

Link to comment
Share on other sites

David,

 

Very impressive.

 

I am still trying to figure it out.

 

Is there anyway this could be made into a rig to apply to 4 wheel vehicles?

 

Thanks for your efforts!

David

 

EDIT: How do I make it work?

 

This should work fine for four wheel vehicles, each wheel is independent of the others.

 

The bones to make rotate for the wheels are the "wheel1", "wheel2", "wheel3" and "wheel4". The nulls that you can use surface constraints to keep the wheels on the road are the "IK_wheel1", "IK_wheel2", "IK_wheel3" and "IK_wheel4"...those will also turn the wheels left and right. To move the entire car, you'll have to add an overall base bone that has all of those bones as children...I'll post an updated one for ease.

 

Hope that is helpful, David.

 

The surface constraints need 2 items, the target model, and the aiming bone right?

Link to comment
Share on other sites

The surface constraints need 2 items, the target model, and the aiming bone right?

 

For a surface constraint to work you need a bone that has the geometry assigned to it (surface target), the second is the "surface aim target" which needs to maintain contact with the surface of the geometry and is used to position the bone that is constrained.

 

When I make the v12 version, I'll make a working example.

 

 

---------------------------

EDIT

--------------------------

 

Well, I tried to link to a sample project I made a long time ago...it must have been deleted. Anyway, I'll make the v12 example of this tonight.

Link to comment
Share on other sites

So- Here are some progressively more difficult/technical questions this thread brings to mind...

 

-Will David's method work on a ground plane which is molded by a V13 displacement map?

 

-When you move your vehicle about in the chor...will the wheels 'just stick' to the ground? What if you move too far up or down, will they crash thru the groundplane or leave the ground?

 

- What if you have a very hilly ground plane... a vehicle that is rigged for Newton Physics...can you set the vehicle free to 'roll about' via simulation?

Link to comment
Share on other sites

So- Here are some progressively more difficult/technical questions this thread brings to mind...

 

-Will David's method work on a ground plane which is molded by a V13 displacement map?

 

-When you move your vehicle about in the chor...will the wheels 'just stick' to the ground? What if you move too far up or down, will they crash thru the groundplane or leave the ground?

 

- What if you have a very hilly ground plane... a vehicle that is rigged for Newton Physics...can you set the vehicle free to 'roll about' via simulation?

 

Matt,

First, I stink at surface constraints (actually constraints in general), but have been trying to do some testing.

It appears the wheels will leave the ground if the body is raised too high and the don't seem to crash through the ground if the body is pushed down.

 

Don't know about the newton application.

 

Hopefully David's example will make the light bulb turn on in my head.

 

The other David

Link to comment
Share on other sites

So- Here are some progressively more difficult/technical questions this thread brings to mind...

 

-Will David's method work on a ground plane which is molded by a V13 displacement map?

 

-When you move your vehicle about in the chor...will the wheels 'just stick' to the ground? What if you move too far up or down, will they crash thru the groundplane or leave the ground?

 

- What if you have a very hilly ground plane... a vehicle that is rigged for Newton Physics...can you set the vehicle free to 'roll about' via simulation?

 

 

I don't know about how it would react to a v13 displacement map...it's worth a test though.

 

The wheels will react like an IK foot, if there is a surface constraint on the nulls, they won't go through the ground and the suspension will act like a normal car's suspension and "give". If the car lifts up farther than the suspension can, the wheels will leave the ground.

 

I'm not sure what you mean by the last one...maybe a dynamic constraint on the body and messing with the stiffness will do that well enough.

Link to comment
Share on other sites

Okay, here's a v12 project that demonstrates the suspension...the only thing I didn't do was to rotate the wheels as it moves. I know, I'm being lazy. If it's a problem, I'll do that tomorrow.

 

There are surface constraints applied independently to each wheel and a surface constraint applied to the body...no dynamic constraints or Newton Physics used.

 

You can just scrub through the Choreography and watch the suspension. I used actual geometry, if someone wants to experiment with displacement maps, go nuts.

 

Hope it helps.

v12_car_suspension_example_project.zip

Link to comment
Share on other sites

It still needs a few things like tire rotation that only rotates while the tires are in contact with the road and tire squish....that would make it better. There should probably also be some lag on the car body constraint. I have a few ideas, I just haven't tried them yet. I'll mess with it some more late tonight. If we get it completely ironed out, it would be easy to make an installable version...that is if that is even necessary, depends. I haven't put it into anything else, so I don't know if it would make it easier or not.

Link to comment
Share on other sites

Hey David

 

The only thing that bothered me is that from a top view the wheels tended to move backwards and forwards as the wheels moved up and down over the bumps. Also, sometimes tires will still rotate even if they're not on the ground most of the time and maybe not as fast.

Link to comment
Share on other sites

Hey David

 

The only thing that bothered me is that from a top view the wheels tended to move backwards and forwards as the wheels moved up and down over the bumps. Also, sometimes tires will still rotate even if they're not on the ground most of the time and maybe not as fast.

 

You're right about that, Mark...it still needs some tweaking. The IK leg setup does work, I just have to prevent the forward and backward movement...maybe by putting a "scale to reach" onto the lower bone that has the kinematic constraint on it. I'll check on that late tonight.

 

As for the tire rotation when the tires are off the ground...if the gas pedal were depressed, the wheels that are doing the work would spin, if either the gas pedal wasn't depressed or if it were wheels that weren't doing the work, momentum would have them spinning at a reducing rate until they hit the ground again. That might present a problem...I'm sure it's not insurmountable, but it will require a lot of experimentation.

 

Also, the tire squishing...more experimenting.

 

Thanks for taking a look at it, Mark!

Link to comment
Share on other sites

Here's a different approach using translate and aim at constraints on the axles to children of a bone at the base of the tire (constrained to suface and children are at the center of the wheel).

 

That looks extremely cool, Mark! I'm very interested in seeing your rig. Your solution may be the better of the two.

 

In the example I posted, I figured out that the forward and backward movement of the tires was caused by the surface "controlled" bones following the contour of the ground. The fix was just to set each tire surface constraint to "translate only".

 

I may have been thinking about the body of the car a little backwards...I'll see if I can post an update tomorrow. Still quite a way to go, but, so far a fun exercise. :)

Link to comment
Share on other sites

It would be out standing if we can get this to work as a rig that can be applied to vehicles.

 

Usually I make pose sliders the control body roll, pitch, suspension (wheels up/dn), steering and crumple on a vehicle.

 

I like the amount of control this gives me, particularly when vehicles collide and we need to show them pitching as a result.

 

Would those controls still be able to be used with a rig like this?

I doubt it would be sensitive enough to cause the body to pitch down if it hit something, unless it can be incorporated with the Newton engine.

 

Which reminds me.... I think yoda64 has plans for something like this..... It would be cool to get his take on it.

 

Thanks for all your work on this guys.

 

David (the other one)

Link to comment
Share on other sites

Mike I already have it setup, but haven't added the expression for it yet. There is still an issue with turning (back wheels will rotate at different speeds), but I have an idea for that . It won't be exact, but pretty close. I also have a setup for the front wheels to automaticly steer (for use on a path only). I'll try to have a prj up either tonight or tomorrow.

 

David, your setup is more for independent suspension, I do have an idea for that as well using 2 axle bones for the front wheels, but this vehicle wasn't modelled that way.

 

DDustin, yes you should still be able to setup sliders, I also setup the body with dynamics, but had it turned off for the test movie.

Link to comment
Share on other sites

I also have a setup for the front wheels to automaticly steer (for use on a path only).

You just might get me to go back to trying paths.

 

Paths are great for something simple, but I have difficulty making quick turns with them like after an impact.

 

Great work guys!

David

Link to comment
Share on other sites

Mike I already have it setup, but haven't added the expression for it yet. There is still an issue with turning (back wheels will rotate at different speeds), but I have an idea for that . It won't be exact, but pretty close. I also have a setup for the front wheels to automaticly steer (for use on a path only). I'll try to have a prj up either tonight or tomorrow.

 

 

Well, Mark, you better just hurry up and get it done:)

 

Just kidding! So why will the rear wheels rotate faster? Are they a different size?

I have an expression written for this from a project I worked on many moons ago if you want it.

Let me know....... I'll see if I can dig it out of my old back up cds....

 

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Mike, when turning, the rear wheels do not rotate at the same speed. For instance, if you were driving in a circle, the outer rear wheel has to travel a longer distance in the same amount of time that the inner rear wheel does. I have the expression to rotate the wheels, I just have to add another setup for a counter_expression to slow down each rear wheel when turning left or right.

Link to comment
Share on other sites

Mark,

Oh okay I see what your saying.... I thought you were just saying a difference between the front and back wheels in general.

This sounds like a perfect spot for and If statement, no?

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Oh ok again!

I think I see whats happening with this. I'm looking forward to seeing it, it sounds like the

numbers taken from the steering rotation will feed into the expression rotating the tires, either faster or slower.....

 

Looking foward to seeing how you guys set it up!

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

I did find a snag in the base expression and setup I'm using, when making a u-turn the wheels stop. For example, when moving in a perfect circle around the bone that drives the expression, the wheels stop rotate because there is no translation data to feed it. I'll have to come up with a different approach or just avoid u-turns. Since I don't know too much about expressions, I may not find a solution.

Link to comment
Share on other sites

I did find a snag in the base expression and setup I'm using, when making a u-turn the wheels stop. For example, when moving in a perfect circle around the bone that drives the expression, the wheels stop rotate because there is no translation data to feed it. I'll have to come up with a different approach or just avoid u-turns. Since I don't know too much about expressions, I may not find a solution.

 

What about 90 degree corners??

Link to comment
Share on other sites

Here's another test movie, I have a few bones to rename and add the counter expression and setup to the rear wheels, after that I'll post a project file.

 

That is really starting to get good!!!

 

I see the rear wheels are rotating backwards on occasion, which is why I assume you are working on the expression.

 

Very very cool!

David

 

EDIT:

Any way to calculate the amount of body roll based on the center of mass, weigth of the vehicle (variable) and speed?

Link to comment
Share on other sites

Yes, this is the u-turn effect I was talking about. The wheels are actually slowing down, giving the appearance of rotating backwards. At least that's what I think is happening. The separation between the vehicle and the bone driving the expression does not remain consistant even though the vehicles speed and distance along the path is. Back to the drawing board.

Link to comment
Share on other sites

DDustin, the body mesh bone has dynamics set to it, it's just an on/off pose, but that can be changed to a percentage slider for either stiffness or angle limits, but not both. Would that do what you want for body roll?

Link to comment
Share on other sites

DDustin, the body mesh bone has dynamics set to it, it's just an on/off pose, but that can be changed to a percentage slider for either stiffness or angle limits, but not both. Would that do what you want for body roll?

Mark,

After thinking about it and knowing how I do things, I would think just sliders to augment body roll and pitch would be fine.

For example, if a vehicle hits something, there is a very abrupt change in attitude that I would need to control.

 

I am really excited about this, very cool.

David

Link to comment
Share on other sites

That was about ten times cooler than the first one, Mark! Very nice.

 

What I've got going is I've decided that I need to make the body surface constraint different. What I'm going to do is to make a surface underneath the body that has each of its' corners weighted to a wheel and have the body's surface constraint use that to determine its' orientation. I haven't done that yet, if I get time tonight I'm going to test out my theory.

Link to comment
Share on other sites

Here's the rig at work. Sorry for the delay on the project, I'll have it up later today. I also added dust/smoke emitters to the tires. Still haven't found away around the u-turn effect.

 

Dude....................

Link to comment
Share on other sites

Here's the project. The rig isn't really designed for any other vehicle, but it will give you some ideas on how to set it up. If someone is willing to model a more accurate frame, suspension, drivetrain with tires, I'll setup a rig so all you would have to do is import a body mesh and assign it to the body mesh bone, scale the body mesh and/or rig to fit and you'd be all set.

Link to comment
Share on other sites

Here's the project. The rig isn't really designed for any other vehicle, but it will give you some ideas on how to set it up. If someone is willing to model a more accurate frame, suspension, drivetrain with tires, I'll setup a rig so all you would have to do is import a body mesh and assign it to the body mesh bone, scale the body mesh and/or rig to fit and you'd be all set.

 

Mark,

So you are kind of proposing a scenario like "here's a button, would you sew a shirt on it for me", we being the button offerers.

 

Honestly I usually don't have suspensions on my vehicles as it really isn't relevent most times, but....

 

If we had a few basic frames:

1. Truck frame with independent front suspension, and a solid rear axle

2. Car frame with independent front suspension, and a solid rear axle

3. Car frame with 4 wheel independent suspension.

 

we could have a "rig" for each type...

 

How accurate would the suspension need to be?

 

Thanks,

David

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...