Caster wheel rig - need better solution

Yes, that’s exactly what I need for wheel rotation. I was even thinking, I could make it pretty flexible with AN by using the Z size of the wheel object to have AN automatically calculate the circumference, making the AN solution more appealing because I could replace the casters, just point to new objects, and they are rigged. Well, other than creating the modifiers I need. I Do have a way to do something only one time in AN, where the whole node setup runs every time. No one has responded in the other thread of it’s a bad setup, but it works. Since you can’t use variables without adding scripts, I just use an object as a boolean variable. So it runs once, checks if an object (that it the nodes created) is a certain size. Then run whatever it is you need to run once. The next time it runs, it checks the size of that again, which has now been scaled so it chooses the other path.

I also am not great at AN yet. I’m not quite sure everything you can do. And geometry nodes definitely has it’s place. I’m kind of waiting for everything nodes to Really get into it because the biggest thing I want to use it for is filling the “volume” of an object with other objects without having to set up collisions that take forever to calculate. I just want to have objects in a collection. Create a volume that I want them to be in, change a few settings for how dense it is, and have them pack it in there as closely as it can without intersecting. Great for odd shaped objects, like imagine you wanted to fill a transparent vase with tiny chairs. That simulation would take Forever since you’d have to use mesh to calculate it. Yeah, I have learned some great tricks to speed it up, but I’d much rather a solution that always works, and I don’t need it animated.

@DNorman - did you try my last file? It works with rotating in Z as well. I just have it locked because I felt it was easier to drag around so I didn’t have to hit G then ShiftZ to move around on the plane.
Also, AN isn’t too bad. That file in particular is pretty simple.
The “NodeTree” is the one that does everything.
I put all 4 targets into a named collection. The subprogram is there to just run through each of those objects one at a time. This way, it works for 3,4,5, however many targets you need. 2 and 4 are common for equipment, and 5 is common for chairs.
And the only thing that’s really happening there is getting the world position of the object, “object matrix input,” and assinging that to the location of the same object.
You can hit ‘w’ with a node selected, and add a viewer node for most nodes. You’ll notice the object matrix input gives you a 4x4 matrix. I have NO idea what the matrix means in terms of how it’s recording the data, but that’s why they also give you the decompose Matrix node, which splits it up into LocRotScale.

So that’s all I’m using AN for. I’m otherwise using 2 Limit Distance constraints. One as inside, and one as outside. The reason I’m doing that is to make the transition a bit smoother. You can also change the Clamp region to be OnSurface, which will give you the exact distance. But then the rotation isn’t random enough, in my opinion. I wanted it to drag behind the wheel a bit, but if it goes back on itself, I wanted it to flip, rather than have a slow rotation. But if you don’t have the “outside” one then it can flip 180deg in only one frame, which is obviously too fast unless you have a really heavy object run into it going fairly fast, in which case, no one will notice the casters.

So I haven’t figured out “memory” in AN yet. I couldn’t find examples of anyone getting data at time. I thought I had a way to do it, but I was wrong. If you find that, let me know, because then I can add automatic wheel rotation to this, and I will share the file of course.

1 Like

Hi, yes I did take a look at your file and changed the AN node setup to the collection info one. It worked well. I did not try unlocking the z axis, I have now and yes it does work for ramps :slight_smile:

“AN isn’t too bad” yes you are right, thanks for the breakdown.

It would be lovely to get those wheels rotating properly when they flip, if I find a way I will of course let you know, I will keep an eye out to see if you manage as well.

This is exactly what I was looking for but when I open up your file every node just reads as “undefined” with "undefined socket type"s so I’ve got no idea what I’m looking at. Do you know why that is? Maybe it’s an issue with 3.0? Or were you using some addon that needs enabling first? Or maybe you just have a screenshot of the node setup so I can replicate it?

In any case, I’d appreciate the help!

Without looking back to see if I explained it, AN stands for Animation Nodes. You have to install that add-on. I’m not sure how far along geometry nodes has come recently, but I would bet you could likely do this with that now, which is built in so that’s always appealing. I’m only just now moving over to 3.0 since they released 3.0.1

Thanks! I’ll try installing that add-on and see if it works! I think you’re right that you can probably do it with geometry nodes too, however I’m also pretty new to 3.0. I’ve only used it a couple of weeks and not for anything quite like this.

I know a year and a half later!

A recent question reminded me of the casters and the flipping wheels…FINALLY I did it. My rig now flips the rotation when the casters flip!
It was just a matter of using the pointer bones rotation to give a positive one (1) when it faces one way and a negative (-1) when it faces the other.

sounds simple but I spent days on this a year ago.

Here is the file for anyone who wants casters with rotating, flipping wheels :joy: :smiley:

CastersCurveFinalSolution.blend (130.0 KB)

Just move the drive control arrow on its y axis backwards and forwards or go to camera view and hit play to see it going round the track.

5 Likes