Users browsing this thread: 4 Guest(s)
FF:Brave Exvius // Defining spritesheet frames help
#31
If I may shared a tidbit of advice/opinion, strips or sheets are probably the better option.

Let's just assume someone wanted to use the sprites for an animation or game. Most animations/games don't use .gif graphics. Not to say this doesn't happen, but it's rare. Also, it's probably somewhat easier to edit a sprite sheet/strip than an animated .gif

And one other thing, though it takes some HD sprites (usually) to exceed this, gif have a color palette restriction of 256 colors.
Reply
Thanked by:
#32
Oh yeah, of course. A GIF option would only be there for if somebody specifically wanted to extract the animations in an already-animated format (since the CSV files also have delay information). Either way strips would still be included and be used for the submitted sheets.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
#33
Wouldn't mind seeing the animated gifs but can work with strips/sheets just fine. ;P {not in batches though}
I assume the last column in the .csv is the delay?
"Knowledge can't be kept in a bottle or sealed in a box.
It yearns to be spread and shared."



Reply
Thanked by:
#34
Yeah, it is. The units are in 60ths of a second, that is, they are in "ticks" where each second is made up of 60 "ticks". So for instance a value of 10 would mean 10/60 of a second. Multiply that by 1000 to get it in milliseconds. So yeah, you can use the strips to create GIFs yourself if you want.

EDIT:
[Image: CMNiJlh.png]

Got it in a strip! According to the code each frame is supposed to be in a 2000x2000 image. Of course, putting 2000x2000 images in a strip of e.g. 15 frames gives a 30,000x2000 image, which both bombs my program and is just way too big to be practically usable and sheetable.
What it does instead is it finds the smallest frame size within which every frame fits, and puts 5 pixels of padding on each edge as well. So for example in this image, each frame is 153x106. They're all nicely aligned as well so they can put into a GIF nicely. This does mean that each animation is likely to have different sized frames, but hopefully that shouldn't be problem (if it is I can propose a workaround but if not I won't bother).

Now I just have to clean up my code a little bit and make it more user-friendly (it's command-line, but stuff like arguments aren't properly put in yet). Also is there any specific things I should do or options you'd like? For example choosing the padding size, lines to separate frames, etc. All the hard work is already done so these sort of things are relatively easy to add.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: MrAlbion
#35
[Image: 1ob3vlF.gif]
{Delay based on the csv}

Kudos!
Looks good to me as-is, maybe someone else knows of useful options to add.  ;P

Edit: wish I could setup the RSS for this thread specifically.   Tongue
"Knowledge can't be kept in a bottle or sealed in a box.
It yearns to be spread and shared."



Reply
Thanked by: Ton, puggsoy, Skyla Doragono
#36
Here you go: FFBETool. As usual it's command-line:

Code:
Usage: FFBETool num [-a anim] [-c columns] [-d divider thickness] [-i inDir] [-o outDir]

Arguments:
   num: The number at the end of the .png and .csv files of the sprite of interest
   [-a]: Specifies a specific .csv animation to extract. For example for "unit_magic_atk_cgs_100000102.csv" you would use "magic_atk". Omit to extract all animations found
   [-c]: The number of columns the animation should be organised into. Omit to just have a single linear strip
   [-d]: The thickness (in pixels) of the divider between frames. Omit to not have any dividers
   [-i]: The folder containing the input files. Omit to use the same directory as this executable
   [-o]: The same as -i, but for the resulting output files

For example if I did this:

Code:
FFBETool 100000102 -a atk -c 3 -d 1 -i inunit -o outunit

Provided I have the .png and .csv files in a folder called "inunit", it would make a folder called "outunit" and put this image in it with the name "unit_atk_100000102.png":

[Image: IqRhWKs.png]

Everything in square brackets is optional, and they can be put in any order (however num must be the first argument).

So hopefully that's straightforward? If not please do tell me and I can elaborate.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: MrAlbion
#37
(10-09-2015, 06:44 AM)puggsoy Wrote: Here you go: FFBETool. As usual it's command-line:
So hopefully that's straightforward? If not please do tell me and I can elaborate.
Looks perfect to me!
Will use it a bit now and tell you if I have any issue.

Edit: Hmm...

"Called from lime/system/CFFI.hx line 376
Called from lime/system/CFFI.hx line 169
Called from lime/system/CFFI.hx line 309
Uncaught exception - Could not find NekoAPI interface."

Going to try figuring out on my own, wish me luck. ;P


Thank god I was born during the ms-dos days.
Got it working.

[Image: PiJTBPh.gif]
Yay. ;P
"Knowledge can't be kept in a bottle or sealed in a box.
It yearns to be spread and shared."



Reply
Thanked by: Ton, daemoth
#38
Oops, that's my fault. That's one file that I always forget to include because it doesn't happen to me when testing. I updated the link, although if you got it working yourself that's fine too.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: MrAlbion
#39
Cool! Terra transforms and uses her desperation attack!
[Image: b1.php?u=39480955]
Quote:You had wasted MY LIFE... waiting for just a goddamn bunnelby model.
-The prestigious Farlavor
Reply
Thanked by:
#40
I should probably learn to use columns since the sheets ends up more presentable. Tongue
{and generating them takes quite a bit of time}

One possible "issue". Using num without -a will generate using every csvs, no matter the ID 'attached' to it.
Hmm, this one doesn't seem right: http://i.imgur.com/5VX1bJH.png (Possible wasted space?)
CGG/CSV/Sheet: https://db.tt/Z5qnm2d6 // Alternate Link
{...looks like I overused my dropbox}

Edit:
This particular unit doesn't give good results: https://db.tt/jXdjT8C4 // https://db.tt/jbq97jTe
"Knowledge can't be kept in a bottle or sealed in a box.
It yearns to be spread and shared."



Reply
Thanked by:
#41
Very very exciting stuff, looking forward to seeing these on the site. I wonder if they'll change anything for the game's final release.
Tsunami Bomb - The Simple Truth
We could run away
Leave behind anything paper
Not knowing where we're going to stay
When there's no Mondays

You're part of me, it's so easy to see the simple truth
When I'm in your arms, I feel safe from harm and sorrow too
You're part of me, it's so easy to see the simple truth
But most of all, nothing couldn't be solved when I'm with you
Reply
Thanked by: Ton
#42
Pretty sure most games tend to have one or two things changed by release.
Usually pretty minor, as opposed to what happens during development, though.

Guess we'll just wait and see, or rather, one of you will, because I don't really play mobile games/don't have a mobile device. lol

These sprites look pretty awesome, though.
Reply
Thanked by:
#43
Previews:
(10-09-2015, 10:30 AM)Dazz Wrote: Very very exciting stuff, looking forward to seeing these on the site. I wonder if they'll change anything for the game's final release.
I'll look around to figure out how to add these to the site properly.

At the very least, there's bound to be a lot of optimization tweaks before the game is released.
"Knowledge can't be kept in a bottle or sealed in a box.
It yearns to be spread and shared."



Reply
Thanked by:
#44
Those look pretty damn epic!

And yes, those should be expected
(Although IMHO, 'optimization' rarely means the same thing it used to /: )
Reply
Thanked by:
#45
(10-09-2015, 09:17 AM)MrAlbion Wrote: One possible "issue". Using num without -a will generate using every csvs, no matter the ID 'attached' to it.
Hmm, this one doesn't seem right: http://i.imgur.com/5VX1bJH.png (Possible wasted space?)
CGG/CSV/Sheet: https://db.tt/Z5qnm2d6 // Alternate Link

Updated to fix both of these issues. The first one I overlooked, that wasn't intended but I forgot to add a check for the ID.
The second one is kinda weird, for some reason the last frame in that animation is empty. The fact that I'm using my own method to find sprite boundaries (since there's no info on it in the .csv files) and the way I'm doing it caused it to mess up, so I had to make a check for it (I won't bother going over the details of the issue). By default it'll ignore empty frames altogether, but I've added an -e argument that you can add it include empty frames, since you may still want them for animations (especially if they're in the middle, rather than at the beginning or end).

(10-09-2015, 09:17 AM)MrAlbion Wrote: Edit:
This particular unit doesn't give good results: https://db.tt/jXdjT8C4 // https://db.tt/jbq97jTe

This one is a bit peculiar. I'll have to look into it more, I might be doing the blending wrong after all.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: MrAlbion


Forum Jump: