Game Development Community

Animations created friom multiple files

by Michael Branin · in Torque 2D Beginner · 03/08/2013 (9:46 am) · 5 replies

Is it no longer possible to create an animation from multiple files?
For instance say my walk animation is 6 individual files named

walk1.png

through

walk6.png

Under the new system how do I create an animation using those 6 files? or do they have to all be on the same tile sheet now?

#1
03/08/2013 (10:20 am)
Yes, they must be in a single image since the AnimationAsset can only have a single source ImageAsset. It would probably not be a huge endeavor to make your desired method possible - have to ask Melv to be sure, though. Essentially, you'd have to make the AnimationAsset capable of having more than one ImageAsset source and then be able to specify which frame is from which image.

I believe that the current system is more resource efficient because you have less overhead (like image file header space, open image file handles) if you use a single image for your animation source. I might be mistaken....
#2
03/09/2013 (8:07 am)
It wouldn't be difficult to allow multiple ImageAsset support into AnimationAsset but so far it's not been done because it'd mean more texture swapping as you cycled through animations.

Having each frame on a different texture is not efficient and can be wasteful if each frame isn't a power of two either. That's why folks obviously use tools like texture packer.

There's nothing stopping it being added but then the next thing will be folks saying that I have all these animation frames and I have to add an ImageAsset for each blah blah blah. Basically pushing down the wrong road...
#3
03/09/2013 (8:13 am)
No worries.. the more I thought about it and remembers your blog about using texturepacker the more I realized it would make sense just to oput all the images on the same image map for the same animation.
#4
03/09/2013 (8:16 am)
ImageMap! Wash your mouth out with soap! 8)
#5
03/09/2013 (9:42 am)
LOL I mean't Atlas.. Old habits and terminology die hard...