Rigging Wheels using joints

Hey guys
I would love to have help from seasoned riggers on this one.
I’m trying to make a joint-based wheel for a mountain skateboard.
I find joint-rigging more stable than clusters or dynamic deformation.

I’m only familiar using only rudimentary MEL scripting and what this requires is beyond my scope of understanding (if it’s simple, I don’t see it.)

what I’m asking is how do you make it so that whenever the Joints pass the floor, the joints themselves will translate in the negative Y axis (see attachment). I thought of utilizing distance between tool to calculate the distance between the joint and the floor, plugging that distance in the first term of the condition node and then somehow plugging that value through the Add/ Subtract node and then plugging it in the translateY value of the end joitns themselves.

Your thoughts on this would be greatly appreciated. :D:

That really seems like a lot of work and there are a lot of places for that to break. Here’s my solution using a very simple setup with a lattice, some clusters, controls, and one expression (which drives the actual wheel speed, it has nothing to do with deformations). I know you said you don’t like clusters, but I have used clusters for countless things and haven’t had a problem with them, you just have to get used to the parenting for them.

I find this idea to be a lot more accurate than trying to translate or scale joints, since when you rotate the tire with the joint setup you’re most likely going to get some really weird stretching and probably won’t be as seamless as simply using a lattice and clusters. Anyways, here’s a video to show yea what I’m talking about:

http://haffnertd.com/wheel_Test.mov

Let me know what you think.

Okay, I’ve toyed around with your suggestion. My question for you then, is this: I know you’re using a cluster with relative turned on, how did you parent the cluster to the All control? I know without a doubt that when you do this you get double transformations. So you either left the cluster where you created it, which seemed to work for me, or you used some sort of script outside of Maya.

Clusters actually go along for the ride. I have two clusters working in that particular scene. The bottom cluster to control where you want the ground level to be, and a top cluster to be able to get the wheel to go down without having to raise the ground up. And no, I do not have relative turned on.

Oops, I meant relative turned off. Sry bout that.

I thought you had the bottom cluster attached to the Lattice points to deform the wheel.
I also thougt that you had a joint to control the wheel. As this is how you can keep it attached with the rest of the vehicle without problems.

[QUOTE=wa33ab1;7803]Oops, I meant relative turned off. Sry bout that.

I thought you had the bottom cluster attached to the Lattice points to deform the wheel.
I also thougt that you had a joint to control the wheel. As this is how you can keep it attached with the rest of the vehicle without problems.[/QUOTE]

That I do have. I have no joints in the scene at all however. I also realized the problem with my setup is when the tire flattens out there is no squashing, so I am addressing that now. I also have a few other ideas I am trying out just cause I am curious about what all I can do with it and how easy I can get it to work. I’m sure by tomorrow afternoon I’ll have some crazy ass scheme going on. :laugh:

I have another question.
when you group your lattices, you group them separately from the cluster group. Then both the cluster group and the lattice group gets parented onto another group called WHEEL. This is okay, right? completely separate lattices unconnected to any control objects except the Main node.

Using a lattice is one way, is there another way to make squishable tires? Since this one only works on normal, (Torus or Squished Cylinder) undetailed wheels.
But using any other wheel that has attached modeled details to them will not work. You can rotate it fine, but at the bottom, the details deform unnaturally.

If you or anybody else is interested, I have a different method:

it’s posted on my site, and I’ll post it here in case there are questions:

Link

global vector $oldPos;
global float $oldDistance;
float $Pi = 3.14159265;
float $r = 5; //Radius
float $circumference = (2*$Pi*$r);
int $gear = -1;// -1 for reverse +1 for Forwards

if (frame==0) {
	$oldPos=<<0,0,0>>;
	$oldDistance = 0;
}

float $old[] = $oldPos;
float $dx = pSphere1.translateX - $old[0];
float $dy = pSphere1.translateY - $old[1];
float $dz = pSphere1.translateZ - $old[2];
float $distance = sqrt($dx*$dx + $dy*$dy + $dz*$dz);
print $distance;
if (frame==0) $distance = 0;

float $newDistance = $distance+$oldDistance;
pSphere1.rotateZ = $gear*($newDistance / $circumference)*360;

$oldDistance = $newDistance;
$oldPos=<<pSphere1.translateX,
          pSphere1.translateY,
          pSphere1.translateZ>>;

so what this does, is calculate the distance of an object’s translation, which you need to feed in in world space, so maybe point constrain a locator to the axle, and then connect the translations into the expression, also you’d do better connecting multiple wheels going in the same direction to one expression, rather than copying it, since it has global variables, and needs to keep them separate per expression.

A couple of shortcomings:
1)It’s an expression, and therefore not that “real time”, it calculates (a positive) distance in both fwd, and backwards directions. You could animate the gear value or hook it into an animateable value if you needed to go back and forth.
2)You need to correctly measure the Radius and enter it into the expression. 3)It doesn’t know if you’re on a hill, so this only works on flat ground. On inclines you’ll get slipping of the wheel.

On the Plus side, you can go positive negative, across whatever axis’s 0 point, you want it won’t screw up, unlike other methods that calculate only along one axis… and have issues with crossing positive to negative Cartesian coordinates.

I am working on a wheel “node” that will run in real time, but it’s a bit out from release… It has all of the shortcomings from above fixed though, so good progress ! :smiley: