Jun 2010
1 / 5
Jun 2010
Jul 2010

I'm in the midst of rigging a tank and have run into an issue with my treads.

I have rigged the wheels based on circumference so that they rotate at correct speed in relation to the translation of my main node.

The issue is related to the script that I applied to create the treads, which I got off of the internet. The script I used for the treads is based on a speed attribute that runs constantly as long as the timeline is running. 0 being stopped, positive moving forward, and negative moving in reverse.

The problem being that it means I need to match the speed of the treads with the translation of the main node, so that the wheels and treads move at the same speed.

My treads are following a curve I have made and I was wondering if there is an expression that I can put into effect that would allow my tread pieces to follow the curve I have created at a speed based on the translation of the main node.

This is where I got my current tread script:
http://www.tutorialsworld.com/index.php?option=com\_content&task=view&id=82

And this is the script I have on the wheels at the moment:

BigWheelFR.rotateX = Main_Controller.translateZ / (0.680529*3.14)*360;

If anyone could help I would greatly appreciate it!

  • created

    Jun '10
  • last reply

    Jul '10
  • 4

    replies

  • 4.4k

    views

  • 1

    user

  • 1

    link

22 days later

I might be way off the mark here but....
My first instinct is to somehow hijack that makeRoll command. I know it adds an expression that calculates rotation information based on speed and translation. 

Maybe somehow use that expression to affect an animate on path.

Just a thought.

My first instinct is to somehow hijack that makeRoll command.

bad idea. A tank doesnt roll the same way. besides make roll has 3 major flaws in implementation.

Depends on what i need the tank to do Its not a singleton problem with a single solution. There are several things that one might need to account for. First one would need to know if the tank has live or dead tracks, because this affects the way the threads would eventually be set up. Second level tier would be to know what kind of surface is the tank going to move on. In other words do I need to account for any possible slippage. Then I need to know who i work FOR. If i work for the end production i can just simulate the treads in pretender pass, or baking cycle. If i work for the animator its because he has some pressing timing need in which case i would need to allow some kind of numeric control to the operator for the particular problem he is facing. If i work for a rigging studio that needs to demo the rig for executives that buy the rig THEN i start to approach the thing with a solution that does in frame distance estimation*. OR maybe i need to work on model thats going to be realtime animation in which case i would need to PROPTOTYPE the code that goes into the game engine, its going to have to be fast and fool users 75-90% of the time.

But basically i would do a numeric integration of the path along its directin vector with 1-5 points on the track of the multiplied by slippage factor and then bake that to the rolls and eventually to the tracks. Because lets face it its the end result that counts not what THINK you get in between. Its very easy to convey the user with the illusion of thinking he gets just this rotation like the makeRoll does. But its really just a illusion to make you feel better, it doesn't actually work out the way you see on screen when you play it back, and you need to still bake the solution before sending the render to a farm thus you can easily override everything here and skip fooling the illusionist himself (so he don't stumble in his own illusion).

But then again you might end up with some complications maybe the animator needs to get a character crushed under a tank thread and needs to choreograph things quite exactly. Or maybe i need to match the threads to live footage as closely as possible. Or maybe i need to blow a link becasue the tank hits a mine or something. Or maybe I dont. Life is a endless bundle of problems all of which are attacked by the budget and end result requirement need at hand.

PS: Yes ive actually done this. Ive also actually made a scientific simulation of track that was later built for a real military vehicle in school, tough im sure they either discarded or improved my model later. Its not like simulation is magic, its all about knowing what the data is used FOR.

  • then the main thing is that the rig looks cool to use not so much that it actually is really good for the end product.