2d animation

Blitz3D Forums/Blitz3D Beginners Area/2d animation

mindstorms(Posted 2006) [#1]
Is there a faster way to fix the size of animations so that all the cells in them are the same size (of the biggest one) other than manually doing it with paint (or a program like it)...It takes me about an hour to fix even one animation...


Ross C(Posted 2006) [#2]
I suppose you code write a little app. The simplest way would be to measure the largest area in paint, then enter this size into your app and it would adjust the entire animated image to compensate. Shouldn't be too difficult to do that i don't think :o)


mindstorms(Posted 2006) [#3]
How would I just change the animated image? Wouldn't I need to change not how big each picture is but how much blank space is around it? That is what I have been doing manually, adding and subtracting blank space.


Ross C(Posted 2006) [#4]
Well, yeah, you would. You would create 2 new images, the size of the biggest animation, and the other, a new animated image, the dimensions of the biggest image size * the number of images you will have.

Then, copyrect the image from the animated image, into your new image, but copy it so it is placed in the centre. Then draw this image onto the NEW animated image strip, and place it correctly.

If you want i could quickly try and whip something up to do that?


Ross C(Posted 2006) [#5]
Only problem i see is extracting the images, if they are all different sizes. Could i see one of your image strips please?


mindstorms(Posted 2006) [#6]
They are all off some websites, have to give credit to the people who did them...(not going to make fire emblem game, just stumbled onto some animations that turned out to be annoying to import into blitz...)
http://sprites.fireball20xl.com/nintendo/fe/7.htm

Try doing the dart pirate, shows my problem well...


Ross C(Posted 2006) [#7]
Your best off doing some sort of app, where you draw a box round an image and it adds it to a strip. Limme see what i can do...


mindstorms(Posted 2006) [#8]
Thank you Ross, manipulating images is not my strongest point :) I was thinking of a program that looked for a certain amount of space of blank color (user defined) then taking that pixel to where another space of blank color is as the picture...tried to do it, failed miserably...


Pongo(Posted 2006) [#9]
probably the biggest problem you are going to have is registration from frame to frame. This will not be possible with an automated system, so you will need a way of manipulating the registration point visually. In the case of those sprites, they have just been ripped from a game and placed on an image, but the usual way to do this would be to create the animation using all the same size frames,... then output to a spritesheet where there are two options.

1. all frames the same size,...this would be the size of the largest frame so it can be wasteful, but it is very easy to do.
2. all frames get cropped and stored with registration info. In order to retrieve the sprite, you need to retrieve the registration info for how it is supposed to line up.

If you have a spritesheet like #2 (you do) it can be difficult to work out the proper registrations. The easiest way would be to import all the frames into a paint program that supports layers or frames, align them, and then export using one of the 2 methods.


mindstorms(Posted 2006) [#10]
Pongo, that is what I am trying to do, convert the ripped sprites into option #1...It was taking to long to do by hand in paint and even though I could have spent countless hours working on them, I wondered if there was a faster way...


Pongo(Posted 2006) [#11]
Probably not a faster way than doing it by hand unfortunately.

You may be able to make a tool to help with the process a bit, but it will still involve having to make a selection around each sprite, and then align it to another frame so everything matches up. Even if you match up the pixels perfectly, you will find frames that have been designed so that the foot moves a pixel or 2. and you will only see this when scrubbing through the frames to see the motion.

It's definately a bit of a task,... you may be better off trying to find a different spritesheet that is not all cut up.


mindstorms(Posted 2006) [#12]
Could you recremend a sprite sheet that has medieval like (fantasy) characters?


Pongo(Posted 2006) [#13]
Sorry, can't help with that. I make all my own stuff, so I don't look around much for spritesheets

good luck though.