PDA

View Full Version : Cartoony vehicle rig [3ds max]


zacleck
08-22-2011, 04:07 PM
Hello all. I'm using Max 2011 to build a rig for a rail car and I thought I'd start a thread about it in hopes that I can get some ideas, I've never rigged a vehicle before, only characters. The cart looks like this;
http://i56.photobucket.com/albums/g195/leckleck/0821_Conductor.jpg

I did a search through the forums here and all I could really find were how to make realistic car rigs that are mostly automated and whatnot, and that's not really what I'm looking for. I'm expecting to need a lot more mobility out of this cart as I plan to treat it like a character. It wont be a talking car per say, but I was thinking it could move around like Roger Rabbit's car.

If I were working in Maya I'd throw a lattice on there and cluster come points to control objects, but as far as I know Max doesn't have that capability. I always kind of wished Max would allow you to wire off points of an FFD box to control objects, but no such luck. Either way I wanted the cart to squash and twist and tilt so I can hit the poses I want. The only solution I had for this was a system of stretchy bones that linked into a chain along the bottom, treating that as a spine. Any other ideas out there?

Another thing I wanted to have this rig be capable of is to automate the wheels spinning, but still have some control over that. I feel like this is going to have to be a more advanced set up to get everything out of the rig that I'm imagining. In the animation it'll be running along a train track, so for the wide shots I thought I could just constrain it to a path and simply wire the rotation of the wheels to the percentage of the path. But that seems like it'd take a lot of trial and error to get the rotation just right, plus that parameter would change based on the path it's constrained to and that would change based on the shot, I was hoping for a more universal set up. Doing it that way might also interfere with some of the other things I'd like to see go on.

I also wanted the wheels to squash or stretch, in a Sonic the Hedgehog sort of way, when it's revving up to go real fast or trying to stop quick. It might be nice to have some of that squashing be automated as well, so that if I were to drop the cart low to the track, the wheels would squash with it, and if I were to raise the cart up past a certain point the wheels would stretch out. The wheels are made of metal and I wouldn't want them to read too rubbery, but I would like some flexibility out of them so I can hit some of the more extreme poses that I want. I thought I could just use Reaction Manager to connect some modifiers, but I'm not sure how that would work with the wheels spinning

In general I'm not really sure what the best way to approach all this is. I assume it'll take a lot of trial and error, but I was hoping I could get some input from some of you out there to help steer me in the right direction.



Thanks,
Zac.

Duncs
08-23-2011, 08:55 AM
You can use linked Xform to parent the control points of a lattice (FFD) to a control object...

As for the automated rotation along a path, you'll need some math in your expression - something like...

percentLength = (curveLength path / 100.0) * percent
degreeLength = wheelRadius * 2 * pi
degToRad (degreeLength * percentLength)

You can then layer another rotation controller over the top of this to add any extra skid / wheelspin that you might need.

Hope it helps

Duncs

zacleck
08-23-2011, 02:25 PM
Yeah, that'll get me started. Thanks. I never knew you could do that with an FFD, so that's good to know. Do you know of any tutorials that would describe in detail what you were talking about for that wheel rotation expression? Or could you maybe walk me through it real quick. I think I get it but my only real experience with scripting is for custom attributes. And most of that knowledge comes from PEN's cg academy DVDs, so I was kind of mindlessly following directions.

Duncs
08-23-2011, 03:14 PM
OK so ignore the garbage code I wrote before - I hadn't had my coffee yet!!

Have a look at the attached scene - it's all set up in there...

zacleck
08-24-2011, 09:24 PM
All right, I finally got a chance to download that file and take a look at what you had going on. I was able to replicate your set up pretty easily too, so thank you for that. Because I had to connect my wheels in through the cylinder to get that radius part to work, I think I'll just plug a controller in between the two so I can manually control the spin of the wheels as well.

I'm still not sure how I would achieve a Sonic the Hedgehog style spin out, where the wheel could squash or stretch, but still spin properly. Any ideas out there?

PEN
08-26-2011, 07:24 PM
You might want to look at this as well .

http://www.penproductions.ca/tutorials/custAttributes/customAttributes.htm

zacleck
08-26-2011, 07:57 PM
Awesome, so if I understand this right, I would basically be running the rotation of the wheels through a script controller that is looking to a "master" script controller that's telling the wheels what to do. I assume this could also be tied in with a path constraint instead of along the world x axis too.

Thanks

zacleck
08-29-2011, 03:16 PM
----------

zacleck
09-16-2011, 03:41 AM
All right, I'm having some issues dealing with the Spring object. I have some springs set up between the body of the cart and the axles, and have each end of the spring linked into a point helper, one which is linked and position constrained to the master control, and one that's linked and position constrained to the control for the wheels. Basically what I'm going for is to be able to lift the body of the cart while still keeping the wheels on the tracks and have the springs for each side stretch with it.

This all works fine when I translate the body of the cart up, but when I rotate, it's not stretching the spring at all. I'm not totally familiar with the Spring object, but from what I figure it only recognizes a change in the position track, so when it lifts up because of it's parent's rotation, it's not affecting the spring. I was hoping someone out there knew how to remedy this..

Thanks,
Zac.

zacleck
10-05-2011, 02:51 PM
http://www.traptcg.com/category/tutorials/tutorials/3d-studio-max/rigging?page=1

For the next person who needs help.

zacleck
02-28-2012, 04:56 PM
Hey all. I set up a path constraint and wired the percentage and the bank amount into a controller. Everything worked fine in the setup but now that I've animated the custom attribute I get an error when I open the file.

It's a 'MAXscript Wire Controller Exception' and it says "--Runtime error: Illegal self-reference in controller"

I don't understand where it's suddenly coming from. I path constrained a point helper to a spline, and have an object as the master, which is what the percentage and the bank amount are wired into. It's still animating just fine, the attribute is doing what it's supposed to be doing, but it's giving me this error. I also have a cylinder which is linked in under the point helper which is wired to rotate with the percentage of the path constraint. This is also still working.

So I was hoping someone out there had an idea how to get rid of this error.


Zac.

CGTalk Moderation
02-28-2012, 04:56 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.