Final Fantasy Hacktics

General => Archives => Tethical => Topic started by: lirmont on July 03, 2011, 02:59:36 am

Title: [UTILITY] Win32 Sprite Animator (1.2.2.4)
Post by: lirmont on July 03, 2011, 02:59:36 am
Download here: Sprite Animator (http://darkabstraction.com/showOff/ffhackticks/%5BUTILITY%5D_Sprite_Animator.zip) (installer (http://darkabstraction.com/showOff/ffhackticks/%5BUTILITY%5D_Sprite_Animator_Installer.zip)).

--

Usage: "see" any image in action (whether in the context of the program via the preview function or outside the context of the program via animated .gif images).

--

Features by Program Category

General




Preview Area




Begin New Format/Edit Existing Format




Edit Selected Frame




Available Formats




Constructed Palette




File Format




FFT-related information:



--

Windows GDI+ library is used to read and manipulate the images. ImageMagick is used to generate the animated .gif files. Uses OpenGL 3.0 (latest is 4.5+) era commands to speed up compositing. Has methods capable of falling back to OpenGL 1.1 (the version supported by Windows' fallback driver, opengl32.dll). This program is mostly stable.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 03, 2011, 05:00:46 am
I can't believe this! This is so awesome Lirmont thank you very much for making this.
I can't get it to open though I tried downloading different dlls from the site but they wouldn't install; it really is too bad cause I'm anxious to try it out. I'm at a crucial point where this would be completely helpful. I'll keep trying.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 03, 2011, 11:52:46 am
Re-download it, and see if it will run for you now.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 03, 2011, 04:21:09 pm
Yes ! it opened..
I managed to get up to the walking front frames but still need to clean up one or two frames so thanks a whole bunch for this:
(http://img685.imageshack.us/img685/7148/theendw.png)

This will make perfecting the animation so much faster and easier.
Lirmont how do you do it?
Other spriters can potentially use this to make monster sprites now as well.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on July 03, 2011, 04:34:52 pm
This tool looks great!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 03, 2011, 04:38:53 pm
Sadly when i opened my sprite  in it the window starts flashing,  random bits of yellow boxes around and. in the preview window sometimes I can see like half of one frame..
It kind of looks like this except the yellow box is flashing really fast:
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 03, 2011, 04:39:54 pm
Quote from: Kivutar on July 03, 2011, 04:34:52 pm
This tool looks great!
I know I hope it ends up working well because it's so cool.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 03, 2011, 07:10:28 pm
Well, I'm on XP so it's difficult to troubleshoot. I uploaded changes (so go download it again please) that link the target ms for both screens, thinking maybe it wasn't responding correctly to how fast I was asking it to redraw the raw image side. That was all I could really think to do about the issue besides some minor other changes that are in there to organization. As for how I did it to begin with, Visual Studio is as poweful a tool as it's ever been.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 03, 2011, 07:22:22 pm
Hey it seems to be working I just opened it. I finished the first 6 frames already and I'll post a gif soon. I just wanted to let you know it works now.

Edit here it is- the hifi  fighter sprite:(http://lijj.ffhacktics.com/walking.gif)

Update:

Animated the hair more and cleaned some other things up:(http://lijj.ffhacktics.com/bigwalking.gif)
(http://lijj.ffhacktics.com/walking1.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 03, 2011, 08:46:29 pm
Well, I think that looks superior to what FFT confined itself to. That's all I was saying in the other thread: less restrictions = bigger size = bigger perceived space = more colors perceived. The result, I think, speaks for itself.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on July 04, 2011, 03:18:48 am
I can't wait to include this 2x resolution sprite in game.
Very nice team work!!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: RandMuadDib on July 04, 2011, 05:12:12 pm
Very nice
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on July 04, 2011, 05:16:09 pm
This is pretty freaking cool looking. When you are increasing the resolution, I would recommend changing the proportions a bit too. FFT was really limited due to the small size of the sprites. If you are making things larger you might want to make the characters a bit taller.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 04, 2011, 08:46:53 pm
Calling this project done for a while:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-003.jpg)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 05, 2011, 03:11:36 pm
I did make it a little taller but not by much.. i gave her a neck cause it really looks odd with extra detail yet no neck. I only changed the proportions slightly otherwise mostly the head.. just varied enough from the fft style I'm used to so it's very workable for me. Since I need to finish this and at least three more to start, I need it to be something I can repeat in style easily.
I considered an edit that Twinees did that looked a little less round and deviated from the fft style a bit more but Kivutar and I chose to stick with this take for the standard. (It still takes about two hours or more per frame so far for me O:)
Also it doesn't really remind me of any other game really other than the obvious.. So I like that about it.
Lirmont: Did you update the image scroller again ?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: GeneralStrife on July 06, 2011, 04:24:44 am
!!!!!!!!!!!!!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 06, 2011, 04:40:36 pm
Quote from: GeneralStrife on July 06, 2011, 04:24:44 am
!!!!!!!!!!!!!

Certainly!
This tool is very helpful for any pixel art animating project.. of any palette. It's just amazing!
And something I've wanted for a long time. it definitely is making the attacking frames less of a task.
I mean there are always ways one can figure out to check frames but this makes that convenient. And speeds the process up for me when changing a head's angle of something; it makes constraining proportions etc. just faster.
I'm almost 50% done with the first sprite btw.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 07, 2011, 02:02:23 am
I lied. I had more ideas:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-005.jpg)

006 (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-006.jpg)

007 (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-007.jpg) (replaced stock resource images)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on July 07, 2011, 02:18:17 pm
what is this? I have to go for a few hours before I can check it out.. but is this  interesting and I'd like to know exactly what's going on.. is this making long pixels?

also: The back views turning out nice almost got the capes done on that higher res sprite as of yet
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 08, 2011, 11:52:44 pm
More stuff: Colors Used (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-cp1.jpg), Export Animation (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-a01.jpg)

I tried really hard to make the program depend only on Windows' ability to deal with bitmaps (to avoid needing to have other dependencies), but it was not to be. A static build of ImageMagick's convert.exe program is packaged with this release. Get the release by following the link in the first post. I apologize in advance if it doesn't work for you.

Examples of animations done via ImageMagick:

(http://darkabstraction.com/showOff/ffhacktics/'gnite-animation-100-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/'gnite-animation-200-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/'gnite-animation-300-1-6.gif)
        x1                          x2                                             x3
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 09, 2011, 12:27:26 am
Hey No problem if this isn't quite right Lirmont. I am always glad to try a new toy.
I look forward to checking it out. That looks pretty cool at least the rotating effect you've displayed. Thanks a lot-
I really like the sprite Utility you made. Should I make an icon/logo for it? If you want I will.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 09, 2011, 12:34:30 am
That is a pretty freaking sweet bomb you have there.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 09, 2011, 12:53:04 am
I'd be happy to use a custom icon. The current one is a bit suggestive of Windows Movie Maker, which this program definitely is not.

I made that 3d model 5 years ago when I had delusions of being able to do something similar to FF. You can see it rendered into the Tethical style pose for character sprites in some of the screenshots.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 09, 2011, 11:45:35 am
Is it trying to nod it's head or hump an invisible booty?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 09, 2011, 11:47:03 am
It's trying to make you feel uncomfortable. Mission accomplished? If you didn't notice the creepy finger wiggle, what has been seen cannot be unseen!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 09, 2011, 11:51:32 am
How does this square with removing copyrighted material?  I mean, it's a bomb, obviously derived from the Final Fantasy creature, although SE doesn't own the right to the idea of sentient suicidal magical ordinance.  Maybe you could turn it into a floating Jack O'lantern that explodes?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 09, 2011, 12:03:31 pm
Considering I didn't use any of their designs or work (go look for something that looks like mine, you'll be surprised how different theirs are) and the fact that it's not a main character that represents a particular game or franchise, I doubt there's a copyright claim. In my opinion, what really gets people C&D's doing these types of things are trademarks (and not copyright infringement). Namely, if you're using a trademark ("Final Fantasy Tactics"; "AT&T") or any derivative that could confuse a consumer about the origin of the website or product ("Final Fantasy Hacktics"; "AT&T SUCKS"), then you're (unfortunately) commiting trademark infringment. If you read about the 3D Chrono Trigger fan project, the C&D cited Akira Toriyama's claim to trademarks on the main characters' designs (namely, "Crono") and the use of the "Chrono Trigger" logo (the timepiece). That character and that logo are both indicative of the franchise of "Chrono Trigger". Some random fan-made ball of fire, I think, is not indicative of any game or franchise of Square-Enix's. However, a chocobo probably would have a much stronger claim, considering there are games based around them (PS1) and they have a pretty distinctive design.

The C&D I mentioned: http://www.chillingeffects.org/derivative/notice.cgi?NoticeID=1416 (http://www.chillingeffects.org/derivative/notice.cgi?NoticeID=1416)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 09, 2011, 06:43:45 pm
Hmm Perhaps an exploding Jack o' lantern would be cool.. I think that'd be a piece of cake to make compared to fully animated sprites.. I'll end up making one most-likely hehe.

About that program Icon; I made one for the desktop icon in png-24 at 128x128 and in ico format as well.
Also made a 32x32 favico for the title bar in both formats.
Ico. Files:
(http://lijj.ffhacktics.com/Lijj2/Utilityl.ico)____(http://lijj.ffhacktics.com/Lijj2/utiliyfavco.ico)
PNG24 Files:
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 10, 2011, 03:08:27 am
BAM!

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-a09.jpg)

But also, the image rotates like woah.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 10, 2011, 04:11:05 am
Oh that is so cool! Thank you Lirmont.. I've been wanting to do an icon for a program for awhile. I'll be using it a lot too.
I like how you updated the menu icons as well; this is a great program.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 11, 2011, 02:39:02 pm
Requesting linux compilation instructions.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 11, 2011, 03:00:04 pm
It can probably be run in Wine if you have all the .NET frameworks installed. The software itself is .NET 4, but the OpenGL tie-in library is .NET 2 (specifically, 2.0.50727).There's no cutting edge technology used in this program.

I have one more feature planned (composite frames) before I attempt anything else (like a linux build). Sorry!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 11, 2011, 03:25:15 pm
.NET.
HISSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 13, 2011, 09:06:26 pm
Demo of the start of the feature I was talking about:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-t01.png)

The input is just your normal, everyday, Type-1 FFT sprite sheet, and it spits out the combined forms.

And this is what the formatting document looks like:

<?xml version="1.0" encoding="utf-8"?>
<format target-rows="5" target-columns="8" base-width="256" base-height="488" frame-width="32" frame-height="39">
 <frames>
   <frame id="999" s="231" t="153" w="1" h="1" />
   <frame id="1" s="1" t="1" w="31" h="39" />
   <frame id="2" s="33" t="1" w="31" h="39" />
   ...
   <frame id="65" s="201" t="129" w="23" h="23" />
   <frame id="66" s="225" t="129" w="23" h="23" />
 </frames>
 <composite-frames>
   <composite-frame id="1">
     <frame id="1" offset-x="0" offset-y="0" flip-x="false"/>
   </composite-frame>
   ...    
   <composite-frame id="9">
     <frame id="40" offset-x="7" offset-y="10" flip-x="false"/>
     <frame id="6" offset-x="0" offset-y="0" flip-x="false"/>
     <frame id="41" offset-x="7" offset-y="12" flip-x="false"/>
   </composite-frame>
   ...
 </composite-frames>
</format>


And the reference I needed to make (numbers correspond to the "frames" section of the document):

(http://darkabstraction.com/showOff/ffhacktics/fft-type1.bmp)

But I'm not updating the download yet because I'm not done with the format document and I had to break a lot of things to get it to this point. However, in the future, you can expect this tool to handle type-1 sprites.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 14, 2011, 03:35:04 am
You will require Net Framework v4.0 for this to work, in case someone is interested in downloading. I dl'd it yesterday, but need to update my framework, heh.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 16, 2011, 05:27:30 pm
Quick update. I've got 135 of 363 frames documented. I don't have the composite frames aligned with themselves yet, but the individual frames I've done are aligned correctly (based on ShiShi's tool). Unfortunately, since there are so many frames, it's kind of bulky.

Anyway: Red Ranger (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-t03.png), Generic Cavalier Male (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-t04.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 16, 2011, 07:33:07 pm
Wow Lirmont, that is a lot of frames to process.
This is impressive stuff!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 17, 2011, 04:38:40 am
And now it's time for the release of this update. The download has been updated, so get it from the first post in the thread.

A quick overview of things added in this update:



And a quick review of the features available to newcomers:



Examples of type-1 sprite sheets: Red Ranger (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-preview=t06.png), Generic Cavalier Male (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-preview=t07.png)

Examples of animations made using the software:

(http://darkabstraction.com/showOff/ffhacktics/red_ranger.fft-type1-animation-100-1-8.gif) (http://darkabstraction.com/showOff/ffhacktics/red_ranger.fft-type1-animation-300-1-8.gif)

(http://darkabstraction.com/showOff/ffhacktics/generic-cavalier-m.fft-type1-animation-100-1-8.gif) (http://darkabstraction.com/showOff/ffhacktics/generic-cavalier-m.fft-type1-animation-300-1-8.gif)

Some issues I've encountered:



Thanks for your interest in this project!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 17, 2011, 10:45:40 am
Wow Lirmont this is really excellent. This will save me tons of time when doing quick animated previews, and probably will help with spriting in general to get the animations looking top notch. I will try to test this out soon and tell you what I think.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 17, 2011, 11:45:34 pm
I just tried the gif previewing feature and it's perfect!  choose the size; 1,2, or 300% and click. :0 ou la! instant gif.
I don't know if this would be difficult to do but if you could make a walking frames previewer  that would be awesome. It would have to move through the first five then back four and repeat. (9 to 13; 12 to 10; repeat). Also, to make that work you'd have to move the frames 10 and 12 down 1 pixel each and frames 9 and 13 down 2 pixels each. to make it bounce right. Just a suggestion so people can make walking gifs in just a couple clicks too.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 18, 2011, 12:58:20 am
This version of the format document puts walk frames first (1-8): sprite.xml (http://darkabstraction.com/showOff/ffhacktics/sprite.xml) (right-click, "Save Link As..."; overwrite /formats/fft-type1/sprite.xml with this file). I'll update the one packaged in the download when more suggestions to make this format useful come in (since I'm sure the data dump I did from ShiShi's program is probably useless from a practical sense to most spriting endeavors, but that's what comes with the download).

Example of walk animation made with this format document:

(http://darkabstraction.com/showOff/ffhacktics/red_ranger.fft-type1-animation-100-walk.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 18, 2011, 06:07:49 am
This will definitly become my primary sprite animator, Lirmont. Thanks you for the amazing work you do on this.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 25, 2011, 08:31:54 pm
Addition of format viewer (reference image size up/down with overlay available to turn on/off if loaded image format matches named format):

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-af1.png)

Now, I'm interested in the effects FFT uses. Namely, has anyone made any of their own (so I could use them for demonstration without copying the game's material)?

Thanks!

Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 26, 2011, 05:40:49 am
If it's efects you need, I would talk to Mando. He did quite a number of those.

Btw, does this Sprite Animator enables you to view monsters as well? It would totally help.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 26, 2011, 07:10:30 am
It's not a quick process, but the format feature is there to handle any type of sprite sheet. I mean, it's work to make the document that describes the format.

Shishi's program didn't have anything in the way of animations, so the format only really describes the frames (and not their logical placement). Anyway, here you go:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-af2.png)

As always, you can download the up-to-date program in the first post of this thread.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 26, 2011, 07:33:28 am
That's great! You couldn't view any monster frames at all in ShiShi. I saw earlier you can create gifs with this, this also counts for monsters, I assume?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 26, 2011, 07:51:03 am
You can load any image that's a .bmp or .png into this program. It subdivides the image into frames. That's what you're exporting as a .gif, so it's independent of FFT or anything else. The format feature just lets you set up arbitrary frames. For instance, if FFT's monster format didn't have a 1px padding around each frame, didn't waste space on the right side of the image, and if all the frames were the same size, you wouldn't even need a formatting document to view each frame properly; you could just tell the program the sprite sheet is X rows by X columns and be done.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on August 26, 2011, 08:53:12 am
This is very promising. Can you open the sprites animations data from fft?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 26, 2011, 01:34:17 pm
I only wrote a formatting document for the ones listed as "TYPE1" in Shishi's program. It's 363 animation frames long, and I copied them out by hand from Shishi's program (as opposed to writing something that could read through some format and do it). All the frames are accounted for, but they're not aligned with each other correctly. You can see a picture of the red ranger's one here: Red Ranger (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview=t06.png). However, there are still "TYPE2" (and it has nearly 400 frames), "MON" (monster's format), "CYOKO" (chocobo's format), "ARUTE" (next to last boss' format), and "KANZEN" (the final boss' format). I know you're on a non-Windows system, but all the formats are available with the program and are in XML form if you ever want them. As long as you don't have to write the image operations yourself (ex. copying, flipping, offsetting, etc.) it's actually pretty short code to do (75 lines total for reading in the XML, creating a new bitmap area to draw, drawing all the composited frames in the bitmap area, and then it's ready to be displayed).
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on August 26, 2011, 05:03:09 pm
Great deeds have been done:(http://lijj.ffhacktics.com/Huge_Clapping_Smiley_by_awake1.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 27, 2011, 01:24:54 am
March forth, army of intellectual property-abusing minions!

(http://darkabstraction.com/showOff/ffhacktics/coeurl.fft-mon-animation-100-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/coeurl.fft-mon-animation-100-22-28.gif)

(http://darkabstraction.com/showOff/ffhacktics/bomb.fft-mon-animation-100-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/bomb.fft-mon-animation-100-22-28.gif)

(http://darkabstraction.com/showOff/ffhacktics/minotaur.fft-mon-animation-100-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/minotaur.fft-mon-animation-100-8-13.gif) (http://darkabstraction.com/showOff/ffhacktics/minotaur.fft-mon-animation-100-15-19.gif) (http://darkabstraction.com/showOff/ffhacktics/minotaur.fft-mon-animation-100-22-28.gif) (http://darkabstraction.com/showOff/ffhacktics/minotaur.fft-mon-animation-100-36-42.gif) (http://darkabstraction.com/showOff/ffhacktics/)

(http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-1-6.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-8-13.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-15-19.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-22-28.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-29-35.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-36-42.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-43-49.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-50-56.gif) (http://darkabstraction.com/showOff/ffhacktics/behemoth.fft-mon-animation-100-57-63.gif)

(http://darkabstraction.com/showOff/ffhacktics/)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Celdia on August 27, 2011, 07:59:03 am
This is an interesting program. It took me a little while to understand what to do with it and how it worked (specifically the renaming of the file you're editing to my-sprite.fft-type1.bmp) but after taking a few minutes and reading through the thread I got the gist of it. Here's a quick output using the Type1 format.

(http://img.photobucket.com/albums/v311/Celdia/FrimeldaWalkingAway.gif)

And another bigger one with more frames just for the hell of it.

(http://img.photobucket.com/albums/v311/Celdia/FrimeldaWalking.gif)

I can definitely see the usefulness of this for sprite editing once more frames of animation are implements. Even *I* could make use of this for editing walking frames now. A request though, lirmont. Is it possible to give it a setting so it doesn't reset itself back to frames 1-8 when it reloads the modified image?

Just one more since the folks in chat thought Frimelda looked a little off, here's the vanilla Squire marching along as well: (http://img.photobucket.com/albums/v311/Celdia/SquireWalk.gif)
The general consensus is that the Animator is loading the arms slightly out of place. You might double-check the Type1 frame positions. ^_^ Still, this looks like a great project and I can't wait to see more of it in the future.

Woof. (http://img.photobucket.com/albums/v311/Celdia/WolfWalk.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 27, 2011, 09:32:54 am
I must say I had problems with this to make it to work, but after Celdia said to just rename the file(yeah, I didn't read the thread...), everything works properly. Here is an example (don' mind the screwed colors, something f'd up with the sheet):
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 27, 2011, 01:44:28 pm
@Celdia: re-download it; it fixes that animation reset annoyance.

Since I don't do spriting and am not familiar with any of the poses (other than having played the game), making the format correct will never be very important to me. However, formats are plain-text and for that particular one it's in /[UTILITY]_Sprite_Animator/formats/fft-type1/sprite.xml. If you use a textfile editor with syntax highlighting (i.e. Notepad++), it's easy to make small changes quickly.

Example of loaded file:
(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-n01.png)

Editing the file while the sprite is loaded into the program will reload the format and the sprite. You would just need to change "offset-x" and "offset-y" to be whatever suits your needs. The frames are loaded in the order they're found, so "40" (the back arm in this case) is slapped into the image first, then "6" (the body), and finally "41" (the front arm in this case). You can use the "Click to View Image" feature of the available formats to have an idea of what the numbers are while you're editing (if you have enough screen space). Remember, that feature also lets you magnify and demagnify that reference image.

Also, if you do edit your formats, make sure NOT to overwrite them with a new version of the project. The most you will ever need to copy over is the .exe (probably).

Thanks for your interest!

@Kagebunji: That 1-pixel, collapsed grid they use is definitely a little hard to deal with. You can copy mine out of /[UTILITY]_Sprite_Animator/formats/fft-mon/reference.bmp. All the FFT sprites I've encountered are like that.

Also, the "my-sprite" part of the file name is whatever your sprite's name originally was (ex. treasure-beast.fft-mon.bmp). It's just there for reference.

Thanks for trying it out on your sprite!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on August 27, 2011, 02:50:16 pm
Oh, don't worry about the grid, it's my doing. On the sheet I have whole sheet in grid, so I don't mess up the placement, I just didn't erase it here.

Also, I have other question for you. I wonder if you will make this program more newb friendly, cause when doing the gif, I was very blue, and if Celdia didn't help me out, I would end up rage quitting, heh. ShiShi has simple animation feature etc., very easy to use.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 27, 2011, 03:04:27 pm
Shishi is also meant only for FFT formats (and probably only the original PS1 formats?). This program is meant for any picture (bmp/png). What I mean about the grid is that, even if you don't delete it, it won't show up if you have it in the right place. I'm open for suggestions, but all I can really think to do is make something available in the "Available Formats" area that will copy, rename, reload your file in the same directory, and tell you about the process. I know the file naming is wierd from an outsider's standpoint, but the benefit is that you don't have to select the format each time.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Celdia on August 28, 2011, 12:07:43 am
Ah, okay, lirmont. I see what you've got in mind there and keeping those format files in XML format does seem like a wonderful choice since it does seem very easy to modify. Maybe if I'm feeling a bit more ambitious later I'll give it a quick edit and see how things turn out. Thank you for the info. ^_^
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 28, 2011, 03:15:55 am
Latest version of the software now includes blending modes!

(http://darkabstraction.com/showOff/ffhacktics/night-sword.fft-E173-animation-100-1-14.gif)

200% (http://darkabstraction.com/showOff/ffhacktics/night-sword.fft-E173-animation-200-1-14.gif)

Modes:


(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-b01.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 28, 2011, 11:37:29 am
OMG this is amazing. Lirmont this is pretty groundbreaking work. Is there anyway this could just be incorporated into our existing ShiShi software as well as your own separate program?

So are you know doing effect animation previews?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 28, 2011, 02:16:03 pm
Well, there's two things that would need to happen for that to even begin to happen, and I don't see either happening. One, you need the source code for Shishi's editor. Two, you need the source code for the TIMUTIL program (or a detailed account of loading and unloading such files). It would also be slow to load, since my program is cheating on the particle effects I assume the game uses (ex: using geometry and some programming to move and fade the dust cloud images out; whereas, my program is just putting the images somewhere static on the screen) and the blending modes (in this particular case) require doubling up frames to get them to look close to right. Like the type1 and monster sheets, I'm just eye-balling what the stuff looks like and writing formats for them. My goal is to have enough tools to do everything (within reason) required by a sprite sheet, and I'm using this game as a kind of case study for that. The things I know I need that I don't have yet are scaling (which is buggy because of Microsoft's encoders) and transparency (ex: fade in/out). I also want to do shader effects (ex: that obnoxious bloom filter you see in games), but that's purely for my own entertainment.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 28, 2011, 02:19:58 pm
We have the ShiShi sprite editor source code. Could you just use ShiShi's coding as a base for most of the image manipulation and just input your bits for exporting gifs and other features to avoid needing TIMUTIL?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 28, 2011, 02:21:02 pm
Point me to it, and I'll look into it.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 28, 2011, 02:23:15 pm
http://code.google.com/p/lioneditor/source/browse/#svn%2Ftrunk%2FFFTPatcher%2FShishiSpriteEditor

I was searching for this while you responded haha. Let me know if you are having issues finding stuff, it is all hidden within a lot of branches.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 29, 2011, 07:05:01 am
@Cheetah: I couldn't get it to compile out of the box, so I'll have to look at it later.

In other news, motion tweens (also known as "paths")! Trying to cheat the particle effects in FFT prompted me to add pathing into the tools available for format documents.

(http://darkabstraction.com/showOff/ffhacktics/cure.fft-E001-animation-50-1-24.gif) (http://darkabstraction.com/showOff/ffhacktics/cure.fft-E001-animation-100-1-24.gif)

"Cure" in program (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-mt1.png)

I'm going to add easing functions into the motion tween configuration before I update the download, but I see that taking a while.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on August 29, 2011, 08:54:35 am
Nice progress, keep up the good work!!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 29, 2011, 11:39:00 am
Linux compatibility?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 29, 2011, 01:48:38 pm
@Kivutar: Thanks!

@PGF: Which distribution of linux are you running?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 29, 2011, 02:15:59 pm
An ubuntu derivative - Mint 10, which I think is Lucid Lynx.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on August 29, 2011, 03:08:05 pm
At this point have you interpreted the actual FFT animation code to figure out the animations, or are you just guessing and trying to recreate it by hand?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 29, 2011, 03:42:25 pm
@PGF: It'll be a couple of days, but I've ordered a flash drive so I can install ubuntu (and other versions). I'll get you directions for Wine if it works. Otherwise, I'll plan a linux build.

@Cheetah: Eyeballing from youtube videos and using the original sprite sheets that are available here is what I've been doing. I don't have any real interest for pulling that information out of FFT. One, I don't know how at the moment. Two, it doesn't benefit anything but FFT effect sprites. It's my eventual hope to write an API for the formats I generate that I can easily integrate into Tethical (and other projects). That basically means that you'd have a program that is an effect designer at your disposal. Especially with the pathing I've just added (it has an X, Y, and optional Z-component), it could be used in an actual 3d program and interpreted around a character/model/etc (giving a similar effect to FFT). I know the program lacks an interface for creating and editing the formats, but I will definitely wind up making one for it; I just want to get all the functionality in first.

Each effect I re-create, I discover something new that has to be added to copy/look like what you see on screen. When I did the Night Sword-esque effect, I learned that I needed the blending mode components (because of the sword). When I started on cure, I learned I needed to either emulate or fake a particle system. I chose faking it because that way it will be the same each time you load the effect's image. I tried to do one of the ice spells, but I saw a lot of image data in the effect that I couldn't identify in the image for it. I think (sadly) it might be mapping the graphics to an actual 3d object (versus a plane, which I can and have cheated easily), but I don't know yet. The other option I thought up was chaining effects (like maybe the image data from another effect was being used), but I don't think that's likely. I still have to add in scaling and rotation.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 29, 2011, 04:20:25 pm
I might've asked this already, but what language are you using?

http://www.linuxmint.com/edition.php?id=69
^This is the exact disto I use.

http://www.linuxmint.com/oldreleases.php
^This is the Mint family of distros.  All are derived from some version of Ubuntu, except for the Debian testing derived distro.

What did you order? 
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 29, 2011, 04:35:42 pm
C#, which would end up being compiled with "mono" if Wine won't run it.

I ordered 16GB usb drive to install a live version of linux on, which I can boot from. There is a program for Windows that will let you do it called UNetbootIn: http://unetbootin.sourceforge.net/

So, when it arrives, I'll get that distribution's ISO, push it over to the USB drive, boot into it, apt-get what I need, and go from there.

Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 29, 2011, 04:52:00 pm
http://forums.linuxmint.com/viewtopic.php?f=58&t=72223

http://www.zdnet.com/blog/open-source/is-mono-dead-is-novell-dying/8821
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on August 30, 2011, 03:40:40 am
I tried the Wine solution. Wine says that we need the .NET framework v4 to run SpriteAnimator. This version of the framework is still unsupported by Wine.

To use Mono, you don't have to recompile using Mono. Mono can evaluate NET code. But here too, the version of the framework used is too recent:
WARNING: The runtime version supported by this application is unavailable.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 30, 2011, 05:16:39 am
Here's one that targets an earlier version of .NET (v2.0). Please try it if you get a chance: Sprite Animator (for .NET v2.0) (http://darkabstraction.com/showOff/ffhackticks/SpriteAnimator_NETv2.zip)

Thanks!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on August 30, 2011, 05:25:56 am
Thanks lirmont.

It is not working with Mono, it looks like Mono is lacking System.Windows.Forms emulation.

With Wine, it is almost working. I get this error:


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NotImplementedException: Not implemented.
   at System.Drawing.Drawing2D.LinearGradientBrush.TranslateTransform(Single dx, Single dy, MatrixOrder order)
   at System.Drawing.Drawing2D.LinearGradientBrush.TranslateTransform(Single dx, Single dy)
   at System.Windows.Forms.ToolStripProfessionalRenderer.RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation)
   at System.Windows.Forms.ToolStripProfessionalRenderer.RenderMenuStripBackground(ToolStripRenderEventArgs e)
   at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderToolStripBackground(ToolStripRenderEventArgs e)
   at System.Windows.Forms.ToolStripRenderer.DrawToolStripBackground(ToolStripRenderEventArgs e)
   at System.Windows.Forms.ToolStrip.OnPaintBackground(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.MenuStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SpriteAnimator
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/sa/SpriteAnimator.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Tao.OpenGl
    Assembly Version: 2.1.0.12
    Win32 Version: 2.1.0.12
    CodeBase: file:///C:/Program%20Files/sa/Tao.OpenGl.DLL
----------------------------------------
Tao.Platform.Windows
    Assembly Version: 1.0.0.5
    Win32 Version: 1.0.0.5
    CodeBase: file:///C:/Program%20Files/sa/Tao.Platform.Windows.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Anyway, I suggest you to not push too much effort in linux support, as we can virtualize windows very easily using virtualbox or vmware.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 30, 2011, 05:35:40 am
I think it's just hanging up on the menu drawing, so I've updated the download to be a version without that. Hopefully it works.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Pickle Girl Fanboy on August 30, 2011, 03:10:17 pm
Quote from: Kivutar on August 30, 2011, 05:25:56 am
Anyway, I suggest you to not push too much effort in linux support, as we can virtualize windows very easily using virtualbox or vmware.

What he said.  As much as I am vexed by you C# coders, getting tethical up and running is more important than anything else.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on August 30, 2011, 03:26:57 pm
Well, I'll be able to test my program on my own once that flash drive I ordered shows up. Like I said, there isn't anything cutting edge in it, which I mispoke apparently, considering .NET v4 was the target and the menus were using the Microsoft profressional renderer for the pretty gradient (though, that's the default choice). Anyway, with regards to C#, Visual Studio's IDE around it is the actual selling point for why I use it. IntelliSense is hard to live without, even comparing it to similar products availabe in programs like NetBeans, default arguments in methods are absolutely awesome, and I enjoy using arbitrary code blocks to organize procedural code. Again, though, it's all the leg work you don't have to do (the linking process, Windows form creation) that's the selling point. As regards Tethical, the API(s) I mentioned wanting to write for this program's functionality would of course be written in the language that they're being integrated in (and have nothing to do with C# and everything to do with parsing XML, loading images, and rendering them out to the screen).
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on August 31, 2011, 03:19:03 am
Yeah. The language is not important here. Building a consistant API for sprites is going to be a great help.
The library used (ImageMagick) has binding in many languages.
The API and its algorithms can be ported at any time.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 01, 2011, 06:21:28 am
Another feature in the works (but not released yet):

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-esf1.png)

It's ugly in comparison to the rest of the program. I've still got a lot of stuff to add to it, too. The obnoxious green thing is the optionally drawn path (motion tween) of the selected image frame (outlined in yellow). The white outline matches the composite frame's bounds in the other window. A selected image frame can be dragged around the screen and placed (presumably more quickly than editing an XML file by hand). What you're seeing in the view at the moment is just plain overwriting/overlapping with no blending. Since this is using hardware, the blending modes aren't available yet (the rest of the program software renders everything before displaying it). Anyway, you can kind of see already the need for such a tool considering how far off my hand-written path was from the line the particles in the effect actually took. If you're wondering, the reason the image frames don't match up with the line is because, after the image frames are placed along the line, I've offset them manually even more (that is, the motion tween acts as a guide to land the image frame, enabling you to adjust the frame's position afterward with the landing position as a more accurate starting point).
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 02, 2011, 03:24:46 am
I opened it in Kubuntu with Wine after many hours of installation:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k01.png)

Sadly, the core functionality (the in-program preview part) isn't usable, and the drawing area loses focus the moment you press a key. Form item docking doesn't appear to work, but I can work through that with anchoring. I'll get actual directions later, but you can use "winetricks" GUI (cd /usr/bin && sh winetricks) to select the default Wine prefix and "Install a Windows DLL or component". My list looks like the following:



I don't see this program running like I'd like it to in the near future, but it's been informative figuring out how to get it to run at all. :P
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 02, 2011, 08:20:55 am
Anyway, this is great. I will try to install it your way.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 07, 2011, 06:21:58 am
Cure (E001):

(http://darkabstraction.com/showOff/ffhacktics/red-cure.fft-E001-animation-100-1-19.gif)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k03.png)


(http://darkabstraction.com/showOff/ffhacktics/gray-cure.fft-E001-animation-100-1-19.gif)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k04.png)


(http://darkabstraction.com/showOff/ffhacktics/brown-cure.fft-E001-animation-100-1-19.gif)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k05.png)


(http://darkabstraction.com/showOff/ffhacktics/cure.fft-E001-animation-100-1-19.gif)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k06.png)


(http://darkabstraction.com/showOff/ffhacktics/phase.fft-E001-animation-100-1-19.gif)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k08.png)


(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k07.png)

As I mentioned earlier, editing frames with text will be replaced/have an alternative in the form of an interface you can interact with. Here is what it looks like at the moment: Edit Selected Frame Window (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k02.png)

However, it's very incomplete. There are many functionalities you can't access with it at the moment, but I used it for every composite frame of the format document at the top of this post. So much faster already. Anyway, click and drag is how it's set up. Right-click is context menu (must be inside the drawing area). Middle-click is panning. The letter "B" will let you select a group of items to move, but I only added it as a convenience so it's not done (you have to start up and to the left of what you want to select and make sure it encompasses the whole object's frame to select it via box select).

Also, and very importantly, what you see is what you will get for OpenGL-related renders later on. The images you see in the EditSelectedFrame window are rendered each to their own square on the screen and blended both at a hardware level (in other words, it's not slow like reliable bitmap/raster images I have to create for exporting .gif files in the main window). Usable sprite-based special effects are close at hand!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 08, 2011, 10:48:17 am
Death (E030):

(http://darkabstraction.com/showOff/ffhacktics/death.fft-E030-animation-100-1-12.gif)

Program View (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k09.png)

(http://darkabstraction.com/showOff/ffhacktics/death.fft-red-E030-animation-100-1-12.gif) (http://darkabstraction.com/showOff/ffhacktics/death.fft-magenta-E030-animation-100-1-12.gif)

(http://darkabstraction.com/showOff/ffhacktics/death.fft-green-E030-animation-100-1-12.gif) (http://darkabstraction.com/showOff/ffhacktics/death.fft-orange-E030-animation-100-1-12.gif)

(http://darkabstraction.com/showOff/ffhacktics/death.fft-rainbow-E030-animation-100-1-12.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Eternal on September 10, 2011, 08:25:44 am
This is great stuff, guys. Thanks, and keep up the amazing work! :D
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 11, 2011, 11:22:59 am
@Eternal: Thanks!

This is the addition to the editing interface I'm working on in preparation for trying to re-create Bizen Boat's animation:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k11.png)

Look to the previous post to see color tweening/animation in action.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 13, 2011, 11:05:44 am
Dark Blade (E172):

(http://darkabstraction.com/showOff/ffhacktics/dark-blade.fft-E172-animation-100-1-23.gif)

Program View (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k12.png)

(http://darkabstraction.com/showOff/ffhacktics/dark-blade.fft-E172-color-animation-100-1-23.gif)

Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kagebunji on September 13, 2011, 11:23:07 am
Soo shiny. Almost like a rainbow, heh.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: GeneralStrife on September 15, 2011, 05:54:58 pm
holy hell this is awesome, no this is mindboggling
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 16, 2011, 04:58:02 am
@Kagebunji: Yes, they are. :P I set up the formatting document so that you can just change the colors in the motion tween (colors A through E in dark blade's case) and the whole thing changes. I just picked 5 colors at random and threw them in. That's what happened. :P

@GeneralStrife: Thanks! I expect Bizen Boat to make even more jaws drop.

--

Anyway, I don't have anything terribly exciting to show at the moment, but I needed to make changes to the program's process so the bitmap renderer could handle much larger output. That's all done now and uploaded; get it from the first post if you want it. Several major things were addressed, including a bug I was made aware of elsewhere.

As a practical example of the program's new capabilities, allow me to explain Bizen Boat's setup. This is effect number 135. It's a draw out ability, and it's also a very long effect in comparison to the other ones I've done. Basically, effects are 1-2 seconds. This one is closer to 5-6s range. At any rate, more seconds means more frames. Bizen Boat has 140 frames at 480x300 pixels per frame. My setup breaks it down into 10 rows of 14 columns. What does that mean? That means the resulting image the program processes is a whopping 6,720x3,000 pixels. That's 20,160,000 pixels at 32 bits a pixel. That means it's roughly 77MB (645,120,000 bits = 80,640,000 bytes = 78,750 kilobytes = 76.91 megabytes)! Now that the program handles the images better, there's no lag on my machine even with that amount of data loaded. Of course, this is software rendering and only applies to creating a bitmap (what you've seen in the main window). All of this doesn't apply to or affect the hardware renderer (what you see in the "EditSelectedFrame" window), which only ever loads the original file (ex: 128x256 pixels = 32,768 pixels = 1,048,576 bits = 128 kb). 77MBs for editing, 128kb for in-game display! One of these days, anyway.

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-k13.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 19, 2011, 10:16:32 am
(http://darkabstraction.com/showOff/ffhacktics/bizen-boat.fft-E135-animation-100-1-63.gif)

First 63 of 136 frames of Bizen Boat. Slowly working in enough features to make format editing interface-only (i.e. no need to type anything in a file).

Also, E024 (ICE):

(http://darkabstraction.com/showOff/ffhacktics/ice.fft-E024-animation-100-1-11.gif)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on September 21, 2011, 12:09:31 am
Lirmont, this is really neat to see all your progress after a short time away. I wonder if you could code it so pitch black is transparent. If you could do that these would be perfect!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 21, 2011, 01:54:01 am
Thanks! Everytime I open the program up to work on this stuff (in order to stumble across new features I need/want), I'm always amazed at how ridiculously well-done FFT's original materials are, considering how old the game is at this point. I may add a range to the transparency key, since blending causes the key to bleed, but I had trouble with it last time I tried to do it (because I want the programming to apply to any color that's used as a transparency key). However, it's only something you'll ever see in the bitmap/gif renderer. So long as the individual frames (ex: the butterflies in Bizen Boat or the crystals in Ice) have a blending mode, they will blend on top of the actual scene. So, where you see black in the .GIF animations, the hardware renderer (ex: OpenGL) will see as a calculation that compares the new color (what you see in the .GIF animation) to the existing color (what's already been rendered; i.e. the map, characters, etc.) For example, in the Ice effect, the blending mode is "lighten". This takes the highest color component from each component of R, G, B, and A between the new color and the existing color and makes a new color out of it, which, unless they're both pitch-black, will not be pitch-black (and therefore you won't be able to see the kind of matting around the effect).

That said, I'm to the point where I may need help figuring out if there's anything left that I don't have the ability to recreate with respect to original FFT effects. For example, I know of one feature that I could add, but I wouldn't be able to easily make a bitmap renderer for it (meaning, it wouldn't show up in the preview, only the "edit selected frame" window). That feature is 3d objects (see effect 004, which is Cure 4: http://www.youtube.com/watch?v=95LXqAy2kYY). I also have to finish giving functionality to some of the blending modes.

Anyway, following that, I'm going to write up an integration library in Python for the Panda3D engine (Tethical uses this), but I'm not familiar with either of them programming-wise. So, it may take lots of trial and error, depending on how much access Panda3D gives to OpenGL's blending modes and some extensions related to them. I already have the code written for OpenGL in C#, so it's really just a translation at this point.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 21, 2011, 03:18:22 am
lirmont your work is realy usefull!

I think that you can write your integration library in C++ if it is easier for you, more people could use it as Panda3D is C++ native with Python bindings.

If integrating it to the 3D engine is too hard, we can still write an animation exporter to AVI, and display them on a billboard in game. (Am I right? I still don't understand what are blending modes)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 21, 2011, 05:18:06 am
Since I will have to research this anyway, here's the link that talks about it on Panda3d's help: http://www.panda3d.org/manual/index.php/Texture_Combine_Modes

Basically, how are two colors blended together? That's all this is about. The default behavior (in OpenGL) is not to blend colors. That means, whatever object/color/graphics get drawn last are shown. For example, if I draw a sprite first followed by a menu, the menu shows over the sprite; there is no blending. However, what if the menu's background is transparent? You'd want to see the sprite through it. That's one example of blending.


Blending In OpenGL

Now, I have code in OpenGL that looks like the following:

   // ...
   switch(blendMode) {
       //...
       default:
            Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
            break;
   }
   // ...


The default color function OpenGL uses is addition, where two colors are added together:

// "Source Color" means the color we have in our texture, our source for the color.
// "Destination Color" means the color that already exists in the drawing buffer, what we've already drawn, like sprites, maps, etc.
Resulting Color = [
   (Red Component of Source Color * Source Color Blending Percent) + (Red Component of Destination Color * Destination Color Blending Percent),
   (Green Component of Source Color * Source Color Blending Percent) + (Green Component of Destination Color * Destination Color Blending Percent),
   (Blue Component of Source Color * Source Color Blending Percent) + (Blue Component of Destination Color * Destination Color Blending Percent),
   (Alpha Component of Source Color * Source Color Blending Percent) + (Alpha Component of Destination Color * Destination Color Blending Percent)
]


So, let's look at the default method I set up.

The "glBlendFunc" function is what sets "Source Color Blending Percent" and "Destination Color Blending Percent". The first term is "Source Color Blending Percent" is equal to "GL_SRC_ALPHA"; that means, whatever our texture's alpha component is (a value between 0 and 1), use that as the source blending percentage. The second term is "Destination Color Blending Percent" is equal to "GL_ONE_MINUS_SRC_ALPHA"; that means, 1 minus whatever our original texture's alpha component is. These are the amounts each color will be blended in the function.

Now that we have the amounts, let's go back to my example of drawing a sprite followed by drawing a transparent menu. Understand, these calculations happen over the whole screen, but we'll just look at one pixel as an example. Let's say that one of the pixels beneath our transparent menu is black. Let's say that another one of the pixels beneath our transparent menu is red. Let's say that our transparent menu is blue.

First, we draw the background of our scene. Let's say it's the color black; this is the destination color, since the whole screen is now black.
Second, we draw our sprite in the middle of the screen with no blending. Anywhere our sprite's texture had color, this is the new destination color. So, there is black from the background plus our sprite's colors.
Third, we change the blending mode for new drawing. We want the new drawing to be multiplied with "Source Color's Alpha Component" ("GL_SRC_ALPHA") and what's already drawn to be multiplied with "1 - Source Color's Alpha Component" ("GL_ONE_MINUS_SRC_ALPHA").
Fourth, we draw our blue menu. Part of it is over the sprite. Part of it is over the black background. Let's say the blue we used for the menu is: 0, 0, 1, 0.25

Now, OpenGL performs the following calculation when drawing to the color buffer for the black background:


Resulting Color = [
   (0 * 0.25) + (0 * (1-0.25)) = 0,
   (0 * 0.25) + (0 * (1-0.25)) = 0,
   (1 * 0.25) + (0 * (1-0.25)) = .25,
   (0.25 * 0.25) + (1 * (1-0.25)) = 0.8125
]


So, when we draw a partially transparent blue (0, 0, 1, .25) on top of black (0,0,0,1), we get (0,0,.25,0.8125), which is a partially transparent dark blue. This value is written to the color buffer. This is color blending for one pixel.

If we were to do the same calculation over part of the sprite that was red (for instance), it would look like:


Resulting Color = [
   (0 * 0.25) + (1 * (1-0.25)) = .75,
   (0 * 0.25) + (0 * (1-0.25)) = 0,
   (1 * 0.25) + (0 * (1-0.25)) = .25,
   (0.25 * 0.25) + (1 * (1-0.25)) = 0.8125
]


You can see that 75% of the red from the sprite came through at that pixel, and you can see that 25% of the blue from the menu came through at that pixel, resulting in (0.75, 0, 0.25, 0.8125) getting written to the color buffer.


Blending in Panda3d?

Now, going by the help file for Panda3D, I expect I need to do something like:


tex = loader.loadTexture('effects/effect-bitmap.bmp')
ts = TextureStage('ts')
# Enter loop to draw squares with textures mapped to
for i in range(0, numberOfFramesInCompositeFrame, 1)
    # TODO: Replace following lines with a call to a function that sets appriopriate blending modes based on framesInCompositeFrame[i].blendMode
    # Alpha component
    ts.setCombineAlpha(TextureStage.CMAdd, TextureStage.CSTexture, TextureStage.COSrcAlpha, TextureStage.CSPrevious, TextureStage.COOneMinusSrcAlpha)
    # R, G, B components
    ts.setCombineRgb(TextureStage.CMAdd, TextureStage.CSTexture, TextureStage.COSrcAlpha, TextureStage.CSPrevious, TextureStage.COOneMinusSrcAlpha)
     
    # Set up place to store primitive 3d object; note: requires vertex data made by GeomVertexData
    squareMadeByTriangleStrips = GeomTristrips(Geom.UHDynamic)
     
    # Set up place to hold 3d data and for the following coordinates:
    #   square's points (V3: x, y, z),
    #   the colors at each point of the square (c4: r, g, b, a), and
    #   for the UV texture coordinates at each point of the square     (t2: S, T).
    vertexData = GeomVertexData('square-'+i, GeomVertexFormat.getV3c4t2(), Geom.UHDynamic)
    vertex = GeomVertexWriter(vertexData, 'vertex')    
    color = GeomVertexWriter(vertexData, 'color')
    texcoord = GeomVertexWriter(vertexData, 'texcoord')
     
    # Add the square's data
    # Upper-Left corner of square
    vertex.addData3f(-framesInCompositeFrame[i].bound.Width / 2.0, -framesInCompositeFrame[i].bound.Height / 2.0, framesInCompositeFrame[i].z)    
    color.addData4f(framesInCompositeFrame[i].color.R/255.0, framesInCompositeFrame[i].color.G/255.0, framesInCompositeFrame[i].color.B/255.0, framesInCompositeFrame[i].color.A/255.0)
    texcoord.addData2f(framesInCompositeFrame[i].s, framesInCompositeFrame[i].t)

    # Upper-Right corner of square
    vertex.addData3f(framesInCompositeFrame[i].bound.Width / 2.0, -framesInCompositeFrame[i].bound.Height / 2.0, framesInCompositeFrame[i].z)
    color.addData4f(framesInCompositeFrame[i].color.R/255.0, framesInCompositeFrame[i].color.G/255.0, framesInCompositeFrame[i].color.B/255.0, framesInCompositeFrame[i].color.A/255.0)
    texcoord.addData2f(framesInCompositeFrame[i].S, framesInCompositeFrame[i].t)

    # Lower-Right corner of square
    vertex.addData3f(framesInCompositeFrame[i].bound.Width / 2.0, framesInCompositeFrame[i].bound.Height / 2.0, framesInCompositeFrame[i].z)
    color.addData4f(framesInCompositeFrame[i].color.R/255.0, framesInCompositeFrame[i].color.G/255.0, framesInCompositeFrame[i].color.B/255.0, framesInCompositeFrame[i].color.A/255.0)
    texcoord.addData2f(framesInCompositeFrame[i].S, framesInCompositeFrame[i].T)
     
    # Lower-Left corner of square
    vertex.addData3f(-framesInCompositeFrame[i].bound.Width / 2.0, framesInCompositeFrame[i].bound.Height / 2.0, framesInCompositeFrame[i].z)
    color.addData4f(framesInCompositeFrame[i].color.R/255.0, framesInCompositeFrame[i].color.G/255.0, framesInCompositeFrame[i].color.B/255.0, framesInCompositeFrame[i].color.A/255.0)
    texcoord.addData2f(framesInCompositeFrame[i].s, framesInCompositeFrame[i].T)
     
    # Pass data to primitive
    squareMadeByTriangleStrips.addNextVertices(4)
    squareMadeByTriangleStrips.closePrimitive()
    square.addPrimitive(squareMadeByTriangleStrips)
    # Pass primtive to drawing node
    drawPrimitiveNode=GeomNode('square-'+i)
     # TODO: Apply translation, then rotation, then scaling to node.
    drawPrimitiveNode.addGeom(square)
    # Pass node to scene
    render.attachNewNode(drawingPrimitiveNode)
# Loop continues on through each frame called in the composite frame.


But, remember, I know very little about Python and less about Panda3d, so this is a learning experience for me.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 21, 2011, 04:38:58 pm
The beginning of the end is near!

Linear Dodge in action:
(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-linear-dodge.png)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-linear-dodge-2.png)

Overwrite in action:
(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-ove.png)

Code for Panda3d (only a proof of concept at this point):

import direct.directbase.DirectStart
from direct.gui.OnscreenText import OnscreenText
from pandac.PandaModules import PandaNode,NodePath,Camera,TextNode,GeomTristrips,Geom,GeomVertexFormat,GeomVertexData,GeomVertexWriter,GeomNode,TransformState,OrthographicLens,TextureStage,TexGenAttrib,PNMImage,Texture,ColorBlendAttrib
from direct.gui.DirectGui import *
import xml.etree.cElementTree as etree

def transparencyKey(filename):
    image = PNMImage(filename)
    image.addAlpha()
    backgroundColor = None
    for y in range(image.getYSize()):
        for x in range(image.getXSize()):
            if backgroundColor == None:
                backgroundColor = Color(image.getRedVal(x, y), image.getGreenVal(x, y), image.getGreenVal(x, y), 0)
            if image.getRedVal(x, y) == backgroundColor.R and \
               image.getGreenVal(x, y) == backgroundColor.G and \
               image.getGreenVal(x, y) == backgroundColor.B:
                # Transparent
                image.setAlpha(x, y, 0.0)
            else:
                # Opaque
                image.setAlpha(x, y, 1.0)
    return image

class Bound:
    X = 0
    Y = 0
    Width = 0
    Height = 0
    def __init__(self, x, y, width, height):
        self.X = x
        self.Y = y
        self.Width = width
        self.Height = height

class Color:
    R = 0
    G = 0
    B = 0
    A = 1
    def __init__(self, R, G, B, A):
        self.R = R
        self.G = G
        self.B = B
        self.A = A

class Frame:
    bound = Bound(0, 0, 0, 0)
    s = 0
    t = 0
    S = 1
    T = 1
    blendMode = "overwrite"
    scaleX = 1
    scaleY = 1
    color = Color(1,1,1,1)
    rotationZ = 0
    def __init__(self, bound, s, t, S, T, blendMode, scaleX, scaleY, color, rotationZ):
        self.bound = bound
        self.s = s
        self.t = t
        self.S = S
        self.T = T
        self.blendMode = blendMode
        self.scaleX = scaleX
        self.scaleY = scaleY
        self.color = color
        self.rotationZ = rotationZ
    def printAsString(self):
        print "["+str(self)+"]::"
        print "   Bound: ["+str(self.bound.X)+", "+str(self.bound.Y)+"; "+str(self.bound.Width)+"x"+str(self.bound.Height)+"],"
        print "   (s, t; S, T): ["+str(self.s)+", "+str(self.t)+"; "+str(self.S)+", "+str(self.T)+"],"
        print "   Blend: '"+self.blendMode+"',"
        print "   Scale(x, y): ["+str(self.scaleX)+", "+str(self.scaleY)+"],"
        print "   Color(R, G, B, A): ["+str(self.color.R)+", "+str(self.color.G)+", "+str(self.color.B)+", "+str(self.color.A)+"],"
        print "   Rotation-Z: "+str(self.rotationZ)

tree = etree.parse("./sprite.xml")
root = tree.getroot()
baseWidth = 0 if root.attrib.get("base-width") == None else float(root.attrib.get("base-width"))
baseHeight = 0 if root.attrib.get("base-height") == None else float(root.attrib.get("base-height"))
effectWidth = 1 if root.attrib.get("frame-width") == None else float(root.attrib.get("frame-width"))
effectHeight = 1 if root.attrib.get("frame-height") == None else float(root.attrib.get("frame-height"))
frames = root.find('.//frames')
colors = root.find('.//colors')
compositeFrames = root.find('.//composite-frames')
# Load only the following frame.
loadFrame = 11
frameList = []
for node in compositeFrames.getiterator('composite-frame'):
    if node.tag == "composite-frame" and node.attrib.get("id") == str(loadFrame):
        for frameCallNode in node:
            for frameNode in frames.getiterator('frame'):
                if frameNode.tag == "frame" and frameNode.attrib.get("id") == frameCallNode.attrib.get("id"):
                    offsetX = 0 if frameCallNode.attrib.get("offset-x") == None else float(frameCallNode.attrib.get("offset-x"))
                    offsetY = 0 if frameCallNode.attrib.get("offset-y") == None else float(frameCallNode.attrib.get("offset-y"))
                    tweenId = frameCallNode.attrib.get("tween")
                    frameInTween = 0 if frameCallNode.attrib.get("frame-in-tween") == None else int(frameCallNode.attrib.get("frame-in-tween"))
                    addWidth = 0 if frameNode.attrib.get("w") == None else float(frameNode.attrib.get("w"))
                    addHeight = 0 if frameNode.attrib.get("h") == None else float(frameNode.attrib.get("h"))
                    sInPixels = 0 if frameNode.attrib.get("s") == None else float(frameNode.attrib.get("s"))
                    tInPixels = 0 if frameNode.attrib.get("t") == None else float(frameNode.attrib.get("t"))
                    swInPixels = sInPixels + addWidth
                    thInPixels = tInPixels + addHeight
                    s = (sInPixels / baseWidth)
                    t = 1 - (tInPixels / baseHeight) # Complemented to deal with loading image upside down.
                    S = (swInPixels / baseWidth)
                    T = 1 - (thInPixels / baseHeight) # Complemented to deal with loading image upside down.
                    blend = "overwrite" if frameCallNode.attrib.get("blend") == None else frameCallNode.attrib.get("blend")
                    scaleX = 1 if frameCallNode.attrib.get("scale-x") == None else float(frameCallNode.attrib.get("scale-x"))
                    scaleY = 1 if frameCallNode.attrib.get("scale-y") == None else float(frameCallNode.attrib.get("scale-y"))
                    color = Color(1,1,1,1)
                    tweenHasColor = False
                    frameCallHasColor = False
                    frameCallColorName = frameCallNode.attrib.get("color-name")
                    if frameCallColorName != None:
                        # Get color at frame call as first resort.
                        frameCallHasColor = True
                        for colorNode in colors.getiterator('color'):
                            if colorNode.tag == 'color' and colorNode.attrib.get("name") == frameCallColorName:
                                R = 1 if colorNode.attrib.get("r") == None else float(colorNode.attrib.get("r"))
                                G = 1 if colorNode.attrib.get("g") == None else float(colorNode.attrib.get("g"))
                                B = 1 if colorNode.attrib.get("b") == None else float(colorNode.attrib.get("b"))
                                A = 1 if colorNode.attrib.get("a") == None else float(colorNode.attrib.get("a"))
                                color = Color(R, G, B, A)
                                break # leave for loop when we find the correct color
                        pass
                    elif tweenId != None and False:
                        # Get color at tween frame as second resort.
                        # TODO: write tween code for color
                        pass
                    elif frameNode.attrib.get("color-name") != None:
                        # Get color at frame definition as last resort.
                        for colorNode in colors.getiterator('color'):
                            if colorNode.tag == 'color' and colorNode.attrib.get("name") == frameNode.attrib.get("color-name"):
                                R = 1 if colorNode.attrib.get("r") == None else float(colorNode.attrib.get("r"))
                                G = 1 if colorNode.attrib.get("g") == None else float(colorNode.attrib.get("g"))
                                B = 1 if colorNode.attrib.get("b") == None else float(colorNode.attrib.get("b"))
                                A = 1 if colorNode.attrib.get("a") == None else float(colorNode.attrib.get("a"))
                                color = Color(R, G, B, A)
                                break # leave for loop when we find the correct color
                        pass
                    rotationZ = 0 if frameCallNode.attrib.get("rotation-z") == None else float(frameCallNode.attrib.get("rotation-z"))
                    frameList.append(Frame(Bound(offsetX, offsetY, addWidth, addHeight), s, t, S, T, blend, scaleX, scaleY, color, rotationZ))
            pass
        break # Leave once we've found the appropriate frame

# Load texture; supply alpha channel if it doesn't exist.
p = transparencyKey('night-sword.fft-E173.BMP')
tex = Texture()
tex.setup2dTexture(p.getXSize(), p.getYSize(), Texture.TUnsignedByte, Texture.FRgba)
tex.load(p)

# Make an identifier for to tack onto square names in Panda3d's scene graph.
frameIndexForName = 1
# Loop through loaded frames that make up composite frame.
for loadedFrame in frameList:
    # For debugging purposes, print the object.
    if True:
        loadedFrame.printAsString()

    # Set up place to store primitive 3d object; note: requires vertex data made by GeomVertexData
    squareMadeByTriangleStrips = GeomTristrips(Geom.UHDynamic)
     
    # Set up place to hold 3d data and for the following coordinates:
    #   square's points (V3: x, y, z),
    #   the colors at each point of the square (c4: r, g, b, a), and
    #   for the UV texture coordinates at each point of the square     (t2: S, T).
    vertexData = GeomVertexData('square-'+str(frameIndexForName), GeomVertexFormat.getV3c4t2(), Geom.UHDynamic)
    vertex = GeomVertexWriter(vertexData, 'vertex')     
    color = GeomVertexWriter(vertexData, 'color')
    texcoord = GeomVertexWriter(vertexData, 'texcoord')
     
    # Add the square's data
    # Upper-Left corner of square
    vertex.addData3f(-loadedFrame.bound.Width / 2.0, 0, -loadedFrame.bound.Height / 2.0)
    color.addData4f(loadedFrame.color.R,loadedFrame.color.G,loadedFrame.color.B,loadedFrame.color.A)
    texcoord.addData2f(loadedFrame.s, loadedFrame.T)

    # Upper-Right corner of square
    vertex.addData3f(loadedFrame.bound.Width / 2.0, 0, -loadedFrame.bound.Height / 2.0)
    color.addData4f(loadedFrame.color.R,loadedFrame.color.G,loadedFrame.color.B,loadedFrame.color.A)
    texcoord.addData2f(loadedFrame.S, loadedFrame.T)
   
# Lower-Left corner of square
    vertex.addData3f(-loadedFrame.bound.Width / 2.0, 0, loadedFrame.bound.Height / 2.0)
    color.addData4f(loadedFrame.color.R,loadedFrame.color.G,loadedFrame.color.B,loadedFrame.color.A)
    texcoord.addData2f(loadedFrame.s, loadedFrame.t)

    # Lower-Right corner of square
    vertex.addData3f(loadedFrame.bound.Width / 2.0, 0, loadedFrame.bound.Height / 2.0)
    color.addData4f(loadedFrame.color.R,loadedFrame.color.G,loadedFrame.color.B,loadedFrame.color.A)
    texcoord.addData2f(loadedFrame.S, loadedFrame.t)

    # Pass data to primitive
    squareMadeByTriangleStrips.addNextVertices(4)
    squareMadeByTriangleStrips.closePrimitive()
    square = Geom(vertexData)
    square.addPrimitive(squareMadeByTriangleStrips)
    # Pass primtive to drawing node
    drawPrimitiveNode=GeomNode('square-'+str(frameIndexForName))   
    drawPrimitiveNode.addGeom(square)
    # Pass node to scene
    nodePath = base.camera.attachNewNode(drawPrimitiveNode)
    # Linear dodge:
    if True:
        nodePath.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OOne, ColorBlendAttrib.OOneMinusIncomingColor))
    else: # Overwrite:
        nodePath.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOneMinusIncomingAlpha))
    nodePath.setDepthTest(False)
    # Apply texture
    nodePath.setTexture(tex)
    # Translate square to be directly in front of camera.   
    nodePath.setPos((loadedFrame.bound.X + loadedFrame.bound.Width / 2.0, 1, -loadedFrame.bound.Y - loadedFrame.bound.Height / 2.0))
    # TODO: Apply translation, then rotation, then scaling to node.
    nodePath.setR(loadedFrame.rotationZ)
    nodePath.setScale(loadedFrame.scaleX, 1, loadedFrame.scaleY)
    #nodePath.place()
    frameIndexForName = frameIndexForName + 1
# Loop continues on through each frame called in the composite frame.

OnscreenText(text = '(0 , 0)', pos = (.1, .05), scale = 0, fg=(1,1,1,1))
for i in range(-20,20):
    OnscreenText(text = '.', pos = (0, i/float(10)), scale = 0, fg=(1,1,1,1))
for i in range(-20,20):
    OnscreenText(text = '.', pos = (i/float(10), 0), scale = 0, fg=(1,1,1,1))
   
OnscreenText(text = 'X', pos = (1.3, .1), scale = 0, fg=(1,1,1,1))
OnscreenText(text = 'Y', pos = (.1, .9), scale = 0, fg=(1,1,1,1))
     
lens = OrthographicLens()
screenWidth = effectWidth
screenHeight = effectHeight
lens.setFilmSize(screenWidth, screenHeight)  # Or whatever is appropriate for your scene
lens.setFilmOffset(screenWidth/2, -screenHeight/2)
#lens.setFilmOffset(screenWidth/2, 0)
base.cam.node().setLens(lens)
base.camera.setPos(0,0,0)
run()
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: alanai on September 21, 2011, 08:29:33 pm
Lol something funny about that panda grid XD the Origin makes a faec :3 (o,o)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 22, 2011, 03:35:53 am
This is awesome!

I can't wait to add the first effect in the game.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 22, 2011, 10:58:03 am
@alanai: It came from an example on the web. The face owl saved me hours of trying to figure out where I was in Panda3d's camera space.

@Kivutar: For the Panda3d effect renderer, I've got everything looking the way it's supposed to look for the few effects I've done. For now, I'll just turn it over to you. I'll make changes as you decide what doesn't work. Get it here: Panda3d Effect Wrapper (Python) (http://darkabstraction.com/showOff/ffhacktics/%5BUTILITY%5D_Panda3d_Effect_Wrapper_Py.zip)

To use it, you basically make an "Effect" object, giving it the filename (note: you must include the effect folder name in the filename; see line ~460 for examples), then you wrap it in a Panda taskMgr task. I didn't include the image source material, so you'll have to get it from the effects page. I've got links in the first post.

Anyway, here's what it looks like at the moment:

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-bizen-boat.png)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-death-color.png) (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-death-color-2.png)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-ice.png) (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-ice-2.png) (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-ice-3.png)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-dark-blade.png) (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-cure.png)

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-behemoth.png) (http://darkabstraction.com/showOff/ffhacktics/sprite-animator-panda3d-bomb.png)

Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 23, 2011, 06:53:04 am
Thanks a lot for your precious code!

I started to include your tool in tethical.

For now, I did this:
- put the class in a separate python module
- put the images and the formats in the games folders
- modded the class for the new file paths
- modded the class to support a new parameter : a parent node for the effect
- display the effect as a billboard, so it always face the camera

I'm facing some issues with positions. I commit the code and get back to you.

Thanks again.

[EDIT] : I pushed on Github. You can test it using the script test_effects.py in the client folder. Unzoom using D to see the effect. It is very far from the origin. I still don't get why :(
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 24, 2011, 12:15:54 pm
Here's my guess at implementation: Tethical Effect Wrapper (http://darkabstraction.com/showOff/ffhacktics/%5BUTILITY%5D_Tethical_Effect_Wrapper_Py.zip)

It's based off what you had up on github. The only real difference is what the effect gets parented to. My attempt parents the effect to an orthographic camera, correcting for the size of Panda3d's base camera. Then, instead of a billboarded object, the primitives are parented directly to the camera. Since the camera is in 2d screen space/pixel space and parented to Panda3d's base camera, there shouldn't be a need to billboard any part of it (since nothing gets projected).

Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 27, 2011, 11:23:04 am
Please forgive me for the long time without replying. Real life is attacking me.

I didn't knew about this camera trick to correct the size, very interesting.

I tested your code and it works well but I think that having the effect parented to the camera will works when the camera is centered on the target, but is it always the case, even in FFT?
It also makes the effect independant of zoom wich is not the case in FFT (someone correct me if I'm wrong).

We may also use your code to display sprite (is it your plan?) but if it is the case we can't keep parenting to the camera for the same reason.

I would like to talk about a last thing. You're using tasks to display the animations. But it would be easier for me to use sequences instead. Sequences are good because we can nest them, easily to achieve the spritecast+cameramove+effect+soundeffect+damagedisplay result. Do you think we can switch to this?

Thanks again for your great contributions!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 27, 2011, 11:52:26 am
If you can get me an example of Python code to work off of for what you need, I'll look into getting my stuff into that format. That is, get me something that you would basically say, "Show it!" to Panda3d, where you've already placed it in the scene (like you have perhaps done with the character sprites). I can work backwards from that, probably.

As far as character sprites, it's certainly possible. However, reading the help on Panda3d's website about sequences, my format documents probably need to incorporate something similar to naming a group of frames to be called as a sequence. I will have to think of a good way to incorporate that.

As far as my thoughts on this program/formatting documents, I basically want to put enough time into it to -never- have to write sprite animation code for myself again. As I'm sure you saw with the effects demo, the little naming convention I'm using is both easily editable AND informative (that is, if I had chosen to name "fft-E001" as "effect-cure" or the "fft-type1" as "character", which is something I would do for game programming). That way, the code can exist on its own, and the effects can be edited with a 3rd party program (i.e. the sprite animator).

--

Support for freeing/returning the preview window added to the program (right-click on the preview area for options; click to drag):

(http://darkabstraction.com/showOff/ffhacktics/sprite-animator-preview-z01.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 28, 2011, 05:26:52 am
I updated the test_effects.py on GitHub.
This script shows how I would like to use effects, it shows two characters casting magic on each others, with the camera rotating, not centered on them.
You can see the interfaces for sequences and parenting.
You can also unzoom to see how effects are automaticaly affected by the camera zoom.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 28, 2011, 12:22:04 pm
Wheeee: Tethical Effect Wrapper (http://darkabstraction.com/showOff/ffhacktics/%5BUTILITY%5D_Tethical_Effect_Wrapper_Py.zip)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-001.png)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-002.png)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-003.png)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-004.png)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-005.png)

(http://darkabstraction.com/showOff/ffhacktics/tethical-effect-preview-006.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Cheetah on September 28, 2011, 02:35:28 pm
Wow, very impressive team work.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Kivutar on September 29, 2011, 03:49:32 am
I just love the result :mrgreen:
Thanks again lirmont.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on September 29, 2011, 02:41:25 pm
Looks great! I can't wait to play with this tool.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: MasterGrand on October 02, 2011, 06:38:41 pm
wow good job lirmont keep up !
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on November 10, 2011, 06:56:00 am
The following are screenshots of the work-in-progress "Begin New Format" feature: Begin New Format (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-fo1.png), Error Feedback (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-fo3.png), and Edit Loaded Format (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-fo2.png).

This isn't released yet because I want to include a section for defining frames first. However, I wanted to post this for critique considering some people had trouble using the tool (admittedly, it doesn't tell you anything).The process of creating a format is much more involved than just using the software to view animations, so my concern is that this reads pretty plainly.

--

These features have been released. Download link in first post.

Watch a short video of the format editing screen being used to turn a variant of cure's animation into a rainbow-colored animation: Edit Format Demo (http://darkabstraction.com/showOff/ffhackticks/sprite-animator-format-demo-x264.zip).

--

And the next feature I'm working on:

(http://darkabstraction.com/showOff/ffhackticks/blue.ff-blue-line-animation-100-1-12.gif) (http://darkabstraction.com/showOff/ffhackticks/blue.ff-blue-line-animation-100-1-20.gif)

--

Named composite frame sets are available via the begin/edit format feature. "fft-mon" is a working example:

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-preview-r001.png)

--

Sound now available via begin/edit format feature in combination with the "Edit Selected Frame"  feature. Ogg-Vorbis (.ogg) only at the moment, since I want this for Tethical (the Panda3d engine can use this):

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-preview-s001.png)
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Choto on July 05, 2012, 12:33:52 pm
One question about this, I think the normal attack sequence (Attack.Normal.SW) isn't outputting the correct attack frames for monsters.

You can see the ones used in game from this thread, if you just scroll down to Monster Attack Animations-->dragon and watch the first couple: http://ffhacktics.com/smf/index.php?topic=8984.0

and I attached the gif i got from the sprite animator, they don't seem to add up.

Don't worry too much if you're busy with the control panel or other things, just wanted to see if it was me or the program
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on July 05, 2012, 06:30:21 pm
Elric asked me the same question, and the answer is basically that there's extra programming involved with FFT monsters. In other words, "fft-mon" is a misnomer. I based it off one monster, and all other monster may vary.

--

See the Composite Frame I Want, It's Just not Part of the Sequence

Before following the steps after this, you may want to turn on the frame number on raw image setting in the "Display" section. Composite frames are those things with numbers on them.

If you want to change the animation sequence, you can do so by going to "File..." -> "Formats" -> "Edit Loaded Format", double-click the title that says "Composite Frame Sets" to make it fill the whole space, find the set you don't like, right-click it, select "Edit Composite Frame Set", right-click in a blank area in the frame list, and select a frame to add, save on that screen and on the main screen after you're done.

--

Don't See the Composite Frame I Want to be Part of the Sequence

Before following the steps after this, you may want to open the "View" -> "Available Formats" -> "Click to View Image" -> left-click the circle button -> click anywhere on that image and drag the pane to the right-hand side of the screen.

If you don't see a composite frame for the one you want, you will have to add it. Turn off the "Animate" feature. Click on the right-hand side of the application. Use the arrow keys to navigate to an empty spot (or make empty spots by changing the columns and rows in the edit format screen). Right-click with the yellow box on the area where you want to add a frame. Choose "Edit Selected Frame...". Right-click in the white box. Add the frame you want. Position it (after clicking it) by pressing "G" and moving the mouse. Right-click in the same general area, and choose "Update Frame". Close your window. Follow above directions until you have all your composite frames. Follow "See the Composite Frame I Want, It's Just not Part of the Sequence" directions after that.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: 3lric on July 05, 2012, 06:49:12 pm
Choto, I have a version setup for FFT monsters that I was able to make with Lirmont's instructions, if you would like to use it?
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Choto on July 05, 2012, 09:28:23 pm
Ah I see, I'll follow your steps to familiarize myself with everything, thanks a bunch!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on September 02, 2012, 09:02:45 am
(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-type1.png)

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-type2.png)

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-cyoko.png)

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-arute.png)

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-kanzen.png)

The program got a bugfix release relating to the behavior of assigning tweens in the "Edit Selected Frame" feature. It now behaves in the intended manner, causing the frame call to be moved to the specified point on the motion-path and subsequently centered there. To update your installed version, re-download the zip file in the first thread, and then only copy out the executable file, writing over the executable in wherever you have the program installed at.

This bugfix also includes definitions for FFT's TYPE1, TYPE2, CYOKO, ARUTE, and KANZEN sprite sheet shapes. For existing users wanting to use these formats, be careful not to overwrite any of your own custom formats. You only need to copy the directories in the "formats" directory (i.e. fft-type1, fft-type2, etc) out of the zip file and into your existing installations "formats" directory. Please also remove "fft-type1-raw" if you do this.

Thanks for your continued interest in this project.

--

Another bugfix was added to prevent unwanted display errors in the software renderer. The front page has also been updated with gifs of the above formats.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on September 02, 2012, 07:09:09 pm
For those interested in editing the tall sprites or the chocobo: this is a breakthrough.
Anyhow, I'm going to try to make spell effects with this; downloaded.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on November 26, 2012, 07:24:02 am
Bulk Copy

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-copy-and-flip.png)


Regular Sheet

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-behemoth-portrait.png)


Half Sheet

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-flan-portrait.png)


This is just a minor update to add in two features I found out I needed for Tethical to use the FFT formats. Namely, there's now a copy feature that will let you bulk copy composite frames when you're editing a format, and there's now a feature that will let you bulk flip composite frames when you're editing a format. A single composite frame flip feature is also available by right-clicking the main preview area. This update also provides a finished FFT-MON sprite format to play around with (note: not all MON sprites are created in the same way, so this does not support all monsters; use the View -> Available Formats -> Click to View Image -> Open Circle feature in order to see what it expects as frame data versus what you're giving it; second note: your image must have the appropriate palette applied to the portrait, and this is not how it will be in-and-out of ShiShi). More progress on Tethical once I get the sprite format I have for FFT-TYPE1 flipped and into named sets.


--

Future Feature: Target MS on Named Set

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-_na008.png)

(http://darkabstraction.com/showOff/ffhackticks/redmage_m_black.fft-type1-animation-100-Walking-Hasted-SW.gif) (http://darkabstraction.com/showOff/ffhackticks/redmage_m_green.fft-type1-animation-100-Condition-Singing-SW.gif) (http://darkabstraction.com/showOff/ffhackticks/redmage_m_blue.fft-type1-animation-100-Walking-Hasted-SE.gif)

Storage for per named-set target MS and event emitting (for stuff like triggering a hit response).


--

Future Feature: Format Filters

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-ff02.png)

Filters for user formats during image file selection. Previously, only displayed image formats (re: the first entry).


Future Feature: Frozen/Unfrozen Background

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-ff03.png)

For the floating preview window, there is a setting to follow along with the generated transparent background from the main area during transparency. The default is a frozen background, using the first composite frame's background area.


Future Easter Egg: Better Icon Animation

(http://darkabstraction.com/showOff/ffhackticks/sprite-animator-ff04.png)

Simple blurring GLSL shader added.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: ntzrmtthihu777 on March 21, 2013, 10:05:46 am
Um, yeah, hello and all with this being my first post. =^w^= I'm a linux user from the RPG Maker community, intending to use fft-style sprites for the overworld/out of battle characters... looking into this, rather impetuously pmed the creator (-_-)' heh.

I can't seem to get it to work under wine... or my windows xp virtualbox... when I use it with wine (and the components you suggested) it crashes on attempting to load a file... In windows it appears to load it but there is nothing visable...

Little help? or, if its no trouble to you, perhaps a peek at the source code so I can build something native to do it? I frikken love the idea of it, feel like a total n00b not able to do it =_=

and now feeling even more n00bish, got it working. geeze what kinda linux user am I if I can't fiddle with it till it works on my own =_=
Thanks heap big for this excellent tool!
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Choto on May 13, 2013, 02:42:16 pm
Ok, moving my feedback to this thread now just for the sake of our mailboxes.

Updates look good, and i've managed to break it within about ten minutes haha. Tried to give fft-mon an attachment in the edit selected format screen and I crashed.

In other news, OpenGL now compiles the frames correctly for fft-type1, but not for fft-mon. The edit selected frame screen also uses the OpenGL frame compilation which means it's still all messy for me in fft-mon files, but the issue that was present before is gone.

I'm also gonna put a request that after selecting a frame in the edit selected frame screen, i can move its displacement with the keyboard arrows. Trying to move it around with the mouse is just a little tedious for precise movements.

Also, do you plan on making a separate animation for each status effect that's applied? For example, if hasted use Walk.SE.Haste, but if hasted and floated use Walk.SE.Haste.Float? Or were you planning on adding in a modifier of some sort that takes care of the alteration.. Ex: If haste present, speed animation by XX, if float, displace frames vertically according to some guidline, etc.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on May 13, 2013, 07:26:03 pm
Okay, noted about arrow keys. I may need screenshots of what you mean for fft-mon.

Basically, I try to keep directions (SE/NE/NW/SW) at the very end of the names so that the engine can do that part for you (because it can be determined by the engine 100% of the time). Other than that, I think it makes sense (as in, it's totally possible to do) to have every status enumerated in the actual format, but features that you limit customization on can be hard-coded in the engine instead (to take some of the work off of people working on animations). As an example, you could copy and shift a majority of the 736 composite frames that compose an fft-type1 animated resource so that they resemble the flying status (but you'd still need to create appropriate named sets for them). However, who would really want to customize that status after just making sure it doesn't do something silly (like have an effect on in-water animations)? Maybe you would if you wanted more than one level of flying/floating (in which case, you'd want to have everything be able to be visually customized at the sprite format level). Whereas, walking speed (re: haste) might be a good thing for customization in general. In other words, if you develop your own formats derivative of the existing formats, you could start compiling a library of per-monster formats. Something like the custom Titan sprite should probably walk more slowly in general. If it's hasted, it should be faster than normal, but it should maybe not be as fast as a regular human; that can be done by deriving a new format based off the old fft-mon format and changing the target animation speed on the appropriate named sets.

Thanks.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Lijj on May 13, 2013, 08:13:22 pm
I will try to test this soon, I have something I could make a custom (sprite type) sheet with.
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: Choto on May 15, 2013, 11:09:39 pm
Here's a test format that it put out with the issue. If you have other pressing things to do certainly don't worry about it. I'm just lettin ya know so you're aware of the bugs, it's not holding me up in any way though :P
Title: Re: [UTILITY] Win32 Sprite Animator
Post by: lirmont on May 16, 2013, 02:25:53 am
Alright, I think I've fixed the format issue. Re-download/re-install it to hopefully fix the issue. It also adds the arrow key features. By default, if you have something selected, using the arrow keys will do offsetting. Otherwise, you need to press G (grab), S (scale), or R (rotate) first; end by pressing the enter key if you press G, S, or R. Make sure you're not in paint or erase mode. Thanks.

--

Contribution Browser in 1.2.2.0

(http://darkabstraction.com/showOff/ffhackticks/sp-anim-cb-001.png)
Title: Re: [UTILITY] Win32 Sprite Animator (1.2.2.3)
Post by: jorgev on December 31, 2014, 09:14:06 am
Hello guys,

I was looking for a program to create sprite sheets for a game i'm trying to make.
I came across this promising program, but when i install in and try to start it, it asks for a username and password(license)

So i was wondering if this program is free to use or what the conditions are if not?

thanks if anyone can help me with this

k.regards
Jorgev
Title: Re: [UTILITY] Win32 Sprite Animator (1.2.2.3)
Post by: lirmont on December 31, 2014, 10:02:51 am
I send credentials via PM when people ask for them. I just ask that you provide feedback to help make the program better.

Thanks.