PDA

View Full Version : Rigging Tank Tracks (no scripting)


Rydland
10-15-2008, 04:29 PM
Hey guys.

My first thread here, hope its in the right place :P.

Anywho, im currently rigging a little "wall e"-wannabe, but i've run in to quite a problem.

I wanna rig it, so that the tracks will move(rotate) without sliding over the ground, and in any axis. I wanna see if it can be done without any scripting cause i havent really got a clue how to use MaxScript.
But as i found out, its a lot harder then it sounds.

Ive tried a hole bunch of things, but i can't seem to get it right.

At the moment i'm working from This theory: I made a controller(like the middle of everything, "center of mass?")and a dummy. They are "loaded" in an ExposeTransform. Then i linked the dummy to the controller, but i unchecked the Enherit Move: x, y and z. Then i wired the Distance(ExposeTm) to the rotation of the tank tracks(made them earlyer, they are also wired to the controller). Now it all works fine and dandy when im at 0, 0, 0. it can rotate and move in x, y and z. But when i move the controller and then rotate it, the dummy still rotates around 0,0,0. That makes the Distance between controller and dummy all messed up.

Ive been trying to figure out how this can work. I REALLY need all the help i can get.

If anyone have some thoughts i'll really like to hear them! <3


PS. Sorry if my text is a bit weird, havent been sleeping much.

//Jesper

PEN
10-16-2008, 12:34 AM
Well you have a couple of problems. First how to rig the tracks. A really simple way that works fine if you are not going to get that close to them is to just attach all the track objects together in a straight line and then use a path deform WSM modifier to deform them around a path where the tracks need to go.

The next method for rigging tracks is more complex, you need a path and each part of the track would be following the path using a path constraint. The percent around the path can be wired to a spinner or be automated so that each object in the tracks travels around the path at the same rate.

The next problem that you bring up us automating the tracks around the path. This is far harder then it looks and I suggest that you look up all the discussion on how to create car rigs. I have answered several of them here and in the Max specific forums.

Rydland
10-16-2008, 10:46 AM
Hey Paul, thanks for replying.
Always nice when people take time to do that.

But the tracks is actually under control. I've got them covered so far.

What im looking for is: if i have a box, With a cylinder on the side. I want the cylinder to follow the box in every axis and rotate along the ground. I would like to do it without using a path and if possible, without scripting.

Does anyone have some clever thoughts on this? i'm really stuck.

If scripting really is needed, could you then guide me to some topics on the subject ?
I'm kinda lost

Thanks in advance.

//Rydland

PEN
10-17-2008, 11:42 AM
Again, look up all the discussions about car rigging where I have given the answers to this.

uiron
10-17-2008, 01:22 PM
What im looking for is: if i have a box, With a cylinder on the side. I want the cylinder to follow the box in every axis and rotate along the ground. I would like to do it without using a path and if possible, without scripting.

unfortunately, it's not possible without scripting, especially in max.

if you want the cylinder just follow the box, it's simple, few constrains here and there and you're done.

however, rotation, depended to the distance wheel traveled, is a somewhat history-depended value. history depended means you can't answer "what is wheel's rotation if he's positioned in point 0,0,0 ?" rotation can be zero, because wheel was set up at that point, or it can be any number because wheel stands in this position just after making a small ride around the scene.

the hardest thing is, the data is not only history depended, it's also depended on itself; that is, if you want to know, what's wheels' rotation at frame 10, you need to know how much it traveled since frame 9 and WHAT WAS THE ROTATION at frame 9.

the only solution i've done for the wheel is simply simulating it, that is, baking wheel's rotation via scripting. then it's simple:
*for every frame (or selected time fraction, e.g. for every 0.5 frame) calculate distance traveled, and add to total distance traveled;
* calculate, how many times wheel rotated at this point: totalDistance/(2*PI*WheelRadius)
* set keyframe for wheel's rotation at that time value

eek
10-21-2008, 02:47 AM
Hey Paul, thanks for replying.
Always nice when people take time to do that.

But the tracks is actually under control. I've got them covered so far.

What im looking for is: if i have a box, With a cylinder on the side. I want the cylinder to follow the box in every axis and rotate along the ground. I would like to do it without using a path and if possible, without scripting.



//Rydland

You'd have to build a transform matrix, but you'll run into issues if the tank goes vertical. You'd have to introduce dynamics to build a direction on each frame. Tanks also tend to turn on the spot, which will add a whole other ball of pain.

PEN
10-21-2008, 11:43 AM
You can calculate a wheels rotation using time and distance traveled and do it in real time. You wouldn't be able to network render with it like this however and at that point it would need to be baked. Just have a look at the car rig for sale on my site and you can see this working in real time.

kurtw
10-27-2008, 06:15 PM
Another method is rig up the tank threads and set up 2 "rotation" control channels to drive the tread movement.

Then get a skilled animator to hand key the activation, for the most part if it "looks" right it'll be good enough.

Automated wheel spin/tread spin is one of the first things to get tossed out the door here because the client wants to art direct things to that point. Simulation is more trouble then it's worth in these cases.

One of the last things I had to rig, I did an automatic control, that was keyable to off. Aside from one or two shots, every other shot was hand keyed.

Keying it makes it easier to animate slippage or friction.

The ideal situation, is to have both with a blend control to turn off the simulation/expression based movment with a keyable over ride. But that may be overkill depending on the project.

Keep it simple.

CGTalk Moderation
10-27-2008, 06:15 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.