Creating an ant line

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
MattVG
Posts: 32
Joined: Mon Dec 04, 2006 3:18 am
Contact:

Creating an ant line

Post by MattVG »

I need to create a line of ants that shifts this way and that over the course of the animation. Is it possible to set an object to follow a spline and align along the spline while moving along it and running an animation.

I could just animate them all by hand but there will be 100+ and I do not look forward to that amount of work so I'm seeking alternatives.
User avatar
Touched
Posts: 504
Joined: Mon Dec 11, 2006 7:33 am
Location: Sunny California
Contact:

Post by Touched »

Yes -- get the Crashcore menu scripts, install them, and then you can create your spline path, and use Crashcore's "Copy selected curve". Depending on whether you want the ants legs to be visibly moving or not, you could then use Crashcore's "paste curve to points position" which would let you have an entire line of ants following the curve and turning to face the path, etc. Or use the "paste curve to layer translation" which would allow you to have animated legs, but I think you'd need to run that on a single ant and duplicate it to get multiples.

The scripts are here:
http://www.lostmarble.com/forum/viewtop ... =crashcore

EDIT: Here's an example file where I used the points position one:
http://www.drowtales.com/~whiteradish/moho/ants.zip
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hey, I don't know if this would work but you could make one ant on one layer and then create a line of bones. Duplicate your ant layer as many times as you want and create the same amount of bones. Parent each ant layer to each bone using and you should have a very flexible animated line of ants :)

D.K
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hi MattVG.
Here is a line of ants I made with a bone string. If you took a little time with it using onion skins as a guide you could get a pretty reasonable result. Anyways you're more than welcome to use this if you wish.

http://www.errolgray.com.au/ants.anime

Cheers
D.K
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

Couldn't you do what has been suggested elsewhere for a necklace -- make an ant, import it and use it to generate a line?
You can't have everything. Where would you put it?
User avatar
MattVG
Posts: 32
Joined: Mon Dec 04, 2006 3:18 am
Contact:

Post by MattVG »

Thank you for all the suggestions.

@DK: The file link is broken but I get the idea. I was pondering along this line of thought last night but was too tired to bring it to conclusion.

@Jahnocli: I think I saw the thread you're talking about but it didn't look like I could have the ants animated at the same time. I believe it was using brushes which can't be exported to .SWF. Can brushes made from an animated object would be a nifty feature for future AS releases.

@Touched: Thanks for the scripts. There are so many I haven't fully perused them nor installed them.
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hi MattVG
oops...sorry a spelling mistake.
Try this:

http://www.errolgray.com.au/ants.anme

Cheers
D.K
User avatar
MattVG
Posts: 32
Joined: Mon Dec 04, 2006 3:18 am
Contact:

Post by MattVG »

I ended up using the Crashcore menu scripts. They worked wonderfully.

I now have a different problem. I need to export to Flash with a low filesize. The file is exporting at 2.1MB which is far too big. Is there a way to optimize the file in any way to make it smaller? I turned off 3D camera and I deleted a bunch of ants which dropped the size to 512K but that's still too big and it doesn't look very good with so few ants.

Any suggestions other than animate in Flash?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

The reason the file is so big, when you export to Flash from AS you most likely are creating multiple copies of the ants... multiple copies repeated on every frame if the file isn't optimized for flash out put in AS (look in the help for Flash optimizing).

For the best file size you're probably going to have to create the ant trail in Flash using a symbol on a path.

With that many ants... yikes... it has to be a symbol in Flash to keep the file size down.

In AS you have those 100 ants as distinct unique artwork. So when you export to Flash you have a Flash file with 100 ants... on every frame (if not optimized). In Flash for something like this, you should only have ONE ant as a symbol repeated 100 times on frame 1, each moving on its own. The original symbol could even be animated.

I don't think AS can export "repeating" copies of symbols like that. It has Flash export capabilities but it doesn't have all the tools that Flash has.

-vern
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

What vern says. Do the ant walkcycle in AS, import this into Flash, make it a movie clip, and do all the multyplying and following path there. Flash is very good in automating those repetitive tasks, so use it when you need it.
User avatar
Touched
Posts: 504
Joined: Mon Dec 11, 2006 7:33 am
Location: Sunny California
Contact:

Post by Touched »

Yeah, I'm sorry, I didn't know file size was going to be important for it. For Flash output, I'd actually look into an all-Flash solution. There's actionscript out there on places like Flashkit to create trails of a movie clip as it moves around, so you could just have a single ant follow the path and let the script do the rest. There was a word they used for it, but I can't remember what it was.
User avatar
MattVG
Posts: 32
Joined: Mon Dec 04, 2006 3:18 am
Contact:

Post by MattVG »

Thanks for the input on filesize and the explanation of how AS exports to Flash. I will probably go ahead and just use Flash to create what I need.
Post Reply