Reputation: 3
longtime fan.
I wish to create a dynamic animation engine for my major creative project in my current fine arts diploma. I have some programming experience in the past but not specialized in the fields I'm currently researching.
I am wondering whether the idea I have is feasible and if so what language/etc I would require to achieve it.
I realise this is a big question so I'll try to be as specific and descriptive as possible
I am currently looking at using Flash and Actionscript 3.
The current simple description of operation is as follows:
User is presented with a drawing input whereby they can draw using just black. Once they have finished their drawing they click a submit button and the drawing becomes a frame in an ongoing animation.
However each frame that is submitted is analysed by the program and its compared to all other frames currently in the animation. The program then sorts the new frame (and possibly all or any appropriate other frames) into the animation in an order where the pixel data is closest to the frames either side of it.
The program could possibly do this resort in the background, or at interval times or any way that works really.
The animations frame rate would also speed up partially over time as more frames are added making the animation longer and faster (to a point perhaps).
Perhaps:
framerate = totalFrames / n
or something along those lines
My current thoughts are:
I realise the most difficult aspect is the analysis, comparison and re-sorting of frames in terms of their pixel location data. I feel it could be possible through somekind of bitmap analysis.
As I am new to the question asking process if anything is unclear or bad practice please pull me up and I will try to correct asap.
Thank you kindly.
Upvotes: 0
Views: 376
Reputation: 18747
While the drawing and animation storing is certainly possible using AS3 and Flash, the correct algorithm on putting the frame into previously drawn sequence is about impossible. The most simple example: A clock with one arrow pointing at 12, 1, 2... etc, now we have an animation in creation with arrow pointing at 12 alreasy as a frame, now a frame is about to be added with arrow pointing at 1. How should the program react on that frame, put it as first or as second? And if the artist would have a bit of fun and will draw 12, then 6, then 2 (then all others) - how the program will be able to determine that it's 12-1-2-3-4...? Note that even if there is only one arrow and even no digits or lines, there is only ONE pixel that's common in two sequential frames (or one set of pixels which is the axis). Another situation - a horizontal line falling down, there are 0 common pixels. There are also examples where a frame could get inserted between two others where it should not have been, regardless of bitmap proximity metric you'd use. So I'd advise you to implement manual sorting instead, and don't play with this high science.
Animation display with variable speed can be performed, but not with a MovieClip
, as you cannot dynamically make one, but with a sequence of BitmapData
object, one Bitmap
object and custom enterframe listener. (And/or a sequence of Shapes)
Upvotes: 1