Tank track rotation

Hi there,

I stumbled upon something baffling, which I cannot get my head around.
Suppose, I have two objects A and B. A is parent of B. Additionally, B also copies the movement in the local X-axis from B:



Now, if I move A into X-direction, B moves double as far as A, good. But now, if I rotate A around its Z-axis, I expect and desire B to rotate along the green outline, which is around A. However, it circles around a point between A and B along the red line, and double as quickly as A rotates.

This or a very similar setup is used in all tank track/tread tutorials I found (except for the physics-based ones), where the curve is A and the track tile is B. However, all of those tutorials always show rotation only at the center of the coordinate system, where it works as expected, never somewhere else.
The resulting problem is, that the track rotates like crazy when rotating the tank (with the curve), the further the tank has moved away from the origin. I just tracked the problem down to this basic setup with A and B.

Any ideas how to fix this would be highly welcome!
Thanks a lot!

Hey; Not exactly clear on what you are asking, but you refer to ‘Curve’ which is not present in your scene. But if your trying to get the 'icospere to rotate around the cube equally, then change your constraints ‘Target’ space to ‘World’ and that should fix that.

Hi, not sure what curve you’re referring to. What are you trying to achieve ? It might be clearer once we know exactly what’s the desired result.

Hadrien

Ok, I hoped that breaking down the problem into a very simple case might make things clearer, apparently not.

I attached the very simple tank track setup as it is shown in most tutorials. To see the problem:

  • Move the curve along the X-axis. The track works as expected.
  • On the new location, rotate the curve around the Z-axis. You will see the strange track rolling first in one direction, then in the other direction as you rotate a full circle. This movement is extremer, the further away you moved the curve away from the center point.

I also added a sphere empty parented to the track tiles, so you can see where the problem comes from. During rotation it goes along the red instead of the green circle that I described in my original post.

Attachments

TankTrack.blend (465 KB)

Hey; Unlock ‘BezierCurve’ transform locks for "Y’ location, that will fix it.

EDIT; that only fixes 1 problem, but the problem stems from the ‘Transformation’ const.

OK, In short you need to re=do your curve, you have the tilt all messed up. I’ll get back when I find the solution.

Thanks for your effort, even though I do not know what you are up to.
The curve is not supposed to move to the Y direction, only by rotating around Z and moving towards X. No idea which problem you see solved by unlocking Y location. Looking forward to see what you can do, though! :slight_smile:

Hey; When you lock the ‘Y’ axis you are not able to use that axis for movement in ‘Global space’. EXP - rotate ‘curve’ on the ‘Z’ axis 45 degrees, then try and move it, it moves sideways. Unlock the ‘Y’ axis and try moving it. Just to be clear you are going to be doing your movements in ‘LOCAL’ space NOT ‘Global’.

I have not been able to come up with a good solution. There are 2 flies in the ointment, (1) Anything that relies on the ‘Curve’ and uses ‘local space’ exhibits that behavior when you rotate the ‘Curve’ on the ‘Z’ axis. (2) Using ‘World space’ causes the tracks to rotate in reverse at some point depending on how much the ‘Curve’ is rotated on ‘Z’ axis. You can switch from ‘local’ to ‘global’ when you need to rotate the ‘Curve’ on the ‘Z’ axis, but that is not a solution. I have tried several different set-ups (all with curves) all have the same behavior, so if your going to be driving your tank all over the scene, and not just in a straight line, then you may have to change your set-up.

I have found a link to a video with a better set-up, it’s keeps your tracks/links from deforming, but it does use an armature for ‘parenting’, so if that’s ok with you…let me know what you think.

Oh, you are right! I was so focused on the rotational aspect that I overdid the axis locking. Sorry for being slow to see that.

So we have come to the same result, unfortunately.

Another approach I tried was trying to manipulate the matrix of the tiles manually by using the addon “Animation Nodes” instead of using the Transformation constraint. However, I could not manage yet to deal with the local coordinate system correctly, it seems to only give me global coordinates. Seems that my mathematical 3D skills got quite rusty, too.

So apart from that the only alternative I see is a physics-based setup as shown here: https://www.youtube.com/watch?v=q5fjslhomsI
I am afraid that this will open a completely new bag of problems, but I will try that after my vacation, if nothing else comes up.

I already knew about this technique to avoid deformation of the track tiles. The armature is not even necessary for this, though in the final model I will have an armature anyway.
This technique works with a connected strip of planes (as shown in the video) as well as with an array of a plane, both with the actual track tile parented as duplifaces.

Thanks for your effort, mate! At least it gave me the confidence that I did not overlook something blatantly obvious.

Hey;

So apart from that the only alternative I see is a physics-based setup as shown here: https://www.youtube.com/watch?v=q5fjslhomsI

Yes, that is McGavish’s model, it’s on this forum some where.

I already knew about this technique to avoid deformation of the track tiles. The armature is not even necessary for this, though in the final model I will have an armature anyway.

The Armature its self may not be, but he used it because you have to ‘parent’ the ‘curve’ and ‘parent’ the ‘plane’ to something to be able to rotate the model on the ‘Z’ axis, and they can’t share the same ‘parent’. That method is the best I have found yet, but the draw back is it does not automate the track rotation/movement.

It seems that the whole issue stems from the ‘Curve’ and/or the "Curve’ modifier. So for now it’s “back to the drawing board” - have a great vacation, I will continue to work on a solution…:spin:

Haha, thanks!
I don’t think that this is something Curve specific, as I tried to show in my very first, very abstract post here. If the track tile (“Object B”) would rotate around its parent, the curve (“Object A”), as expected, then the tiles would not slide along the curve during rotation. But this strange rotation happens also with ordinary objects, as shown.
I think the root cause has something to do with the transformation modifier and/or something very basic in the depth of the matrix calculations. If the relative position of the two objects to each other would be constant, the rotation would be done correctly; it is this dynamic between the two that causes the mess.

BTW, are you working on a similar topic, or are you simply intrigued by those kind of problems? I am positively surprised that someone puts so much own effort into solving this for someone else.

It seems that the whole issue stems from the ‘Curve’ and/or the "Curve’ modifier

I may have stated that incorrectly - but it does have something to do with things that rely on the ‘Curve’ - in Local or Global space, IKD. I have tried about 6 or 7 different set-ups, different ways now, all with ‘Curves’, they all have failed…:frowning:

BTW, are you working on a similar topic, or are you simply intrigued by those kind of problems? I am positively surprised that someone puts so much own effort into solving this for someone else.

Nope, just like a good challenge when it comes to rigging, off work till April 1rst so I got time to burn…LoL…After all, that’s what this forum is all about. Been using Blender for a lonnggg time.

Ok, my flight goes in a few hours. Looking forward to what you have come up with until then! :smiley:
All the best, I will be back at the end of the month!
Cheers!

Hi Estajxo,
so when you come back… :slight_smile: - I think you are running into a typical issue on this topic on tanks :slight_smile: I know, there are many out in the web who tried to explain several diffent solutions, but in general (as you found out) anyone has it’s special issue.

There is one tut out there, which explains first the typical issues and then offes a very well done solution. Take a look at Chis Kuhn’s tut from CG Cockie. The introducion vid is free for all, for the real tut you have to subscribe and prior to start paying you have an amount of tuts for “sneeking in” free. so give it a try. :slight_smile:

Here’s the link: https://cgcookie.com/lesson/comparing-methods

Happy blending

Ok, so when it comes to the method described by the ‘poster’ (Estajxo) as it turns out, this method will NOT work as expected. The reason for this is described by Joshua (Aligorith) on his blog. You must do a little “reading between the lines”, but the main points are there. Here is a link to the article.

Mike J Gee has posted a link to Chis Kuhn’s tut, and I’m sure his solution is probably the best (although I have not seen the video). Chis Kuhn is very good at what he does (one of my mentors (also Jashua)) If you do end up with a good solution, maybe post it here so others can be informed. Thanx

EDIT: I have downloaded Chis Kuhn’s model from Blend Swap (very nicely done), but it too suffers from the issue described by Aligorith in his article…

Have a great time :slight_smile:

You probably haven’t seen my tutorials on doing Tank Tracks please visit my vimeo site and work throught each video on doing them one by one…
I try to cover how to do them the easiest way I know how and show some pit falls and solutions on the way…

https://vimeo.com/norvman/videos

Hej there, I am back!

@Mike: I had found that tutorial series already and watched that first intro video. It is mainly about the different ways how to add the tiles to the curve, but does not seem to hint to any kind of solution I need. That is why I did not want to invest in that, it just did not look very promising regarding my situation.

@ajcdfin: To be honest, I did not see any relation to this rotation problem, but maybe I simply did not understand enough of it. Anyway, if that article proves to you that the discussed method cannot work, that is good enough for me at the moment, because it completely confirms my own experience.

@norvman: I had already seen your videos and as far as I can tell, your solution suffers from the same problem I have described here.

Thanks a lot to everyone for their efforts!

I think I will go now for a setup where I do not need to rotate outside of the center (or at least do not show it on camera).

Happy free Eastern days!

@norvman: I had already seen your videos and as far as I can tell, your solution suffers from the same problem I have described here.

I have to say that I have never experienced the behaviour that your describing here with my Track Riggs …
so there is some kind of miscommunication as to how your setting it up in comparison to my Riggs…
I will be the first to say that I probably have not covered everything properly…
however I can count at least 20 people who have watched my tutorials and found them to solve their Tank Track Rigging problems…
perhaps if you went into more detail as to what is happening or how your setting up…

one thing of note is that I have always used y axis as the front to back axis on my track riggs…
your using X axis…

however… I would be surprised if that had anything to do with it…
but it very well could

remember that underneath all the Rigging your playing around with Matrix Math…
so that one thing might make a difference …

Anywayz…

I am so busy right now I really don’t have time to deconstruct your Rigg to really see why what your doing is not working…

all I know is I can build a Tank Rigg just like I describe in my Videos and it works… for me… no problems as your describing above…
unless I’m totally missing what is going on with what it is your wanting to do…

Anywayz…

No worries if you can’t use my method…
there are many ways to skin a cat in Blender Animation and Rigging…
hope you find a solution…

If by any chance you have your readily available to send or downloadable, I would have another look at it.
Sometimes it would be so much easier to be able to just sit together at the same computer for 10 minutes… :wink: