PDA

View Full Version : Tank Tracks using Relativity

 DonAVP08-28-2006, 09:46 PMAll: I am looking for a tut that was on Prem's Relativity site for animating tank tracks. I have found the one using morph maps. That is not the one I need. I did this to a file about a year ago and cannot remember how I did it. I have an older lws that has it in it but I need a little mind refreshing. Thank for answers Don
kirigoi
08-29-2006, 04:41 PM
I haven't seen that tutorial, but I did what you described for a lego bike chain recently, using motion paths to control the chain links' motion. There's a thread outlining the expressions here (http://forums.cgsociety.org/showthread.php?t=382985), but there isn't much detail on how I set it up. I also had problems getting it to work the way I wanted, but I solved it for when the chain is moving at a constant rate. Relativity hanged whenever I put in the expression I would expect to work, and I never tracked down the problem.

How experienced with this stuff are you? I've been meaning to create a full tutorial, but it might take a few days as I'm pretty busy at the moment.

The overall technique I used was to create a single link, then make a spline path for the motion of the link. It is important to have the link's pivot point correctly set. There was some fiddling to make sure the length of the path was an integer number of links, mostly using rail clone to make sure the final link lined up with the first one. I then cloned a single vertex along the spline with equal distance between each vertex so that the links would move at a constant rate around the path and wouldn't slow down where the curve had denser points. I made a curve out of these new vertices, then imported the single link and this curve as a motion path into layout.

I then set up a guide null that followed the position information of the motion path. I used relativity to control the velocity of the null based on the motion of a control gear that the chain moved around. I then set up a further number of nulls that followed the guide null with a certain time delay, based on the angular velocity of the gear (to ensure that the distance between each link would be correct. This is where I had difficulty, because I'd rather use a constant distance seperation using minpath rather than a time seperation, but couldn't get it to work. This would mean that the chain could stop or change speed, whereas the time lag only works if no acceleration takes place. The last step to set everything up was to set up an expression so that each null pointed at the link in front, but only rotating on the relevant axis. I didn't use follower as it "snaps" when the pitch goes through vertical.

At this point I had a system of nulls whizzing round the path, controlled by a driving gear. I then parented clones of the link to each of these nulls to finish. There's an animation on my thread which shows the results. This method is superior to the morph method as it a) moves correctly around corners, rather than each link moving linearly to the next position, and b) allows you to use eg. different coloured links that move around the path rather than jumping back to the start each time. However, I'd want to solve the problem with the path delay for it to be rigorous. If you've got your old .lws I'd be interested to see how that works to see if I can fix mine.

I hope that makes sense. Let me know if you have any queries, or if you'd like me to write a proper tutorial with more depth.

M

CGTalk Moderation
08-29-2006, 04:41 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.