I’m starting to learn the basics of 2D animation using Unity and Sprite Manager 2 and I have a question regarding 2D animation. Let’s say I want to create a computer children’s storybook, and I’m working on one of the pages which contains a background of a pond with several lily-pads and one frog on it, all from a birds eye perspective. Let’s say that all the images are static except for the frog, which we will make leap from the current lily-pad he’s on to one that we select. Now I want to outsource the animation of the frog jumping forwards, but I’m not sure what my role as a programmer should be since I am new to this type of animation. In my mind, I envision two ways of approaching this. Let’s assume that the frog is 10 pixels wide and the distance for the frog to jump is 100 pixels…
Have the artist create a 10x10 library of animated frames of the frog while I (as the programmer) flip through them like a flip-book and adjust the x or y position according to each frame. If this is the case, the job becomes much harder, especially if I have to take realistic physics and timing into account.
Have the artist create a 100x10 library of animated frames of the frog while I flip through them like a flip-book. This puts the burden on the artist/animator (which I believe is where it should be) and all I have to do is flip through the sprites. The problem with this is that we have a lot of wasted space and performance will be terrible if you have several animations going on at once.
Now I can’t imagine that either of the above is correct; there must be some way of having the artist/animator create a 10x10 library of frames and specify the relative x/y offset of each frame from the base.
Cheers!
Anthony
p.s. If anyone has any book recommendations on digital animation from a programmer’s perspective (I’m big on teaching yourself) please let me know!
Maybe create a toolset so the artist can specify the x,y offsets? wouldn’t that be the job of the coder?
There has been solutions to this for the past 30 years! problem solving would be something else the coder gets paid for right?
You should assume an artist doesn’t even know how to read their email let alone use a computer.
Then again if it wasn’t for all the lazy coders, technical artists like myself wouldn’t have a job.
Thanks for the reply, but I was expecting something a bit more helpful; I take it you woke up on the wrong side of St. Michaels on a rainy day. I’m not at all interested in re-creating the wheel with yet another 2D animation tool-set any more than an artist would fancy manufacturing yet another graphics tablet; the disinclination to do so does not make one a lazy coder (or artist for that matter). As a newcomer to the animation world, I wanted to know what approach people use and by extension what tools. My experience has been that of an applications developer for the past 17 years, and I have zero experience programming in the gaming world so please pardon my newbie questions.
I’ll not respond to your other comments as they have no merit, but I would appreciate any constructive input that you may have on the matter seeing that you have plenty of prior experience in the area.
You should have them animate a single animation that starts with the frog stationary, then starting to take off, then in mid jump. If you want to get fancy, you could also request a ‘landing’ animation.
This gives you the most flexibility. Then, you’d set the current frame based on the vector distance from the target pad to the sprite. If the pads are all the same distance apart, the distance to the target could be used to determine what frame to display without much effort. This would scale up pretty well. It also gives you the ability (with a bit more math) to use irregular distances between pads, which would be impossible with a single animation that includes the entire jump distance.
I would also suggest that you ensure they create the art/animation as vector based. That way if it needs to be exported at a higher resolution (e.g for iPad, desktop etc), it won’t be an issue. If you have illustrator you can even re-export the frames yourself.
I animate everything in illustrator for this reason and it makes a difference. And like Chilton said, get a variety of animations that you can string together if you need to.
My work method:
I use SM2 for 2D kids App and I essentially design the art (background, characters etc), including the art that will eventually animate, within a 480x320 artboard so that I can get the exact size of my character etc that will eventually animate within the whole scene. I then animate the character etc within this illustrator ‘scene’, and once complete, I then copy the vectors of each animated frame to another artboard. I then export each frame layer from this artboard at 72dpi with transperancy and anti-aliasing. That way, when brought into Unity using SM2 and pixel perfect ticked, it will sit perfectly in the scene.
As others have mentioned here, SM2 does, indeed, already include this functionality with image-based offsetting, and you don’t have to worry about wasted space on your atlas, etc, as all the empty regions will all be trimmed out, yet still preserving the positional information of your sprite graphic. That’s just one of the ways SpriteManager 2 greatly eases the workflow for dealing with 2D sprite-based graphics.