Animating tank treads for unity

Hi blenderartists o/

My brother and me got this idea of trying to make a game with him in charge of the unity things and me doing the modeling. We both don’t really know what we’re doing but are having a blast figuring stuff out piece by piece … and oh man, there is ALOT to figure out :slight_smile:

The Idea is also to keep it as simple as possible, so it’s lowpoly with flat colors for now until we are comfortable with the basics and our workflow.

My problem at the moment is that I’m looking for an easy way to animate the treads on this tank …


I had some success following norvman’s tutorial about this (http://www.youtube.com/watch?v=Dq8iM8gR11s). But the problem is that making the segments follow a curve won’t work in unity, the curve just get’s ignored it seems. But it could very well be that I’ve fucked something up. I’m wondering now if there maybe is a simpler solution to this problem, the segments of the treads just need to rotate around and don’t need to follow any terrain.

I was thinking about just animating the axles and getting my brother to mess around with dirt particles so it won’t be noticeable that the treads aren’t actually moving. Another idea was that it should be possible to just make a animated texture, although I’d like to avoid textures and I’ve got the feeling that it’ll look shit … but haven’t looked into this at all yet.

So how is this done usually?

I’ve attached the blend file, if there are any obvious problems I will run into for game development, please let me know. Those constraints for example just kinda happened, I don’t really know how to use them properly ^^

Attachments

tank_clean.blend (694 KB)

No Ideas? … or is a unity board a better place for this question?

Animating for games is not my area of expertise, so I can make no guarantee that what I have done here will work for your application.

That’sTheWeirdestDirtI’veEverSeen.blend (903 KB)

The usual methods that I would use for animating tank treads do not apply to this model, as the treads are not a bunch of linked segments, or even a single rubber-strip thing that can be moved around a curve, but rather a single object shaped like an entire track-and-wheels-and-fender-armor segment. The question arises of what, exactly, there is to animate? The shape of the object won’t change as the treads go around, so if these aren’t textured, then there’s nothing to animate. (With the possible exception of the little octagonal axle segments, which are easy enough to do: just separate them and make them spin!)

But that’s not good enough; you want some appearance of motion, don’t you? The way to do that is to put some texture on the treads that will move as they are supposed to be moving. I assumed that the treads would be muddy, or something, and put a procedural dirt texture on them, that I then replaced with something easier to see moving (Voronoi cell noise.)

You can replace the texture as you see fit. But here’s what I did and how I did it:

  1. I split the tracks in two. The two treads move independently of each other, otherwise the tank couldn’t turn.
  2. I UV-unwrapped the track-material parts of the track objects. Method used was “follow active quads”, where the active face was a face on the bottom of the tread.
  3. I added a texture to the tread material, and animated its x-offset (look under texture settings for the texture on the tread material.) Now it looks like there’s something moving on the treads!
  4. I split off the axles and used the bigger axle on both treads to drive the movement of the whole thing, including the smaller axles and the tread texture. The whole tread will appear to turn if you animate the x-rotation of BigAxleLeft (or BigAxleRight.)

Now you can make your tank appear to move due to its treads moving, and even turn, with a proper texture replacing that bizarre procedural multicolored polygonal pattern.

I hope this is of at least some use to you.

You can replace the texture as you see fit. But here’s what I did and how I did it:

  1. I split the tracks in two. The two treads move independently of each other, otherwise the tank couldn’t turn.
  2. I UV-unwrapped the track-material parts of the track objects. Method used was “follow active quads”, where the active face was a face on the bottom of the tread.
  3. I added a texture to the tread material, and animated its x-offset (look under texture settings for the texture on the tread material.) Now it looks like there’s something moving on the treads!
  4. I split off the axles and used the bigger axle on both treads to drive the movement of the whole thing, including the smaller axles and the tread texture. The whole tread will appear to turn if you animate the x-rotation of BigAxleLeft (or BigAxleRight.)

Now you can make your tank appear to move due to its treads moving, and even turn, with a proper texture replacing that bizarre procedural multicolored polygonal pattern.

I hope this is of at least some use to you.

You are a hero, Sir :slight_smile:

In my head those treads just had to go round and everything would be fine but of course you are right, there really isn’t much to animate now that I come to think about it. I knew that I would run into trouble animating this and didn’t know how to best go about it so I just modeld the treads as one part and of to the forums to ask for help on how to do this proper. That curve method didn’t quite work for unity or I did something wrong exporting it. Thanks for the hint to animate the X-offset, thats easier then I thought it would be :slight_smile: … and with the axels rotating is probably enough for what I’m looking for. Thanksalot man :slight_smile: