Differences
This shows you the differences between two versions of the page.
ff3:ff3us:tutorial:sprites [2017/09/01 13:10] madsiur [2. Understanding Sprites] |
ff3:ff3us:tutorial:sprites [2019/02/12 11:12] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Character Sprites and Portraits Editing ===== | ||
- | |||
- | **Author:** madsiur\\ | ||
- | **Last modified:** 08/ | ||
- | **Credits: | ||
- | |||
- | ==== 1. Introduction ==== | ||
- | |||
- | The character sprites in FF6 can be modified in various ways depending on exactly what you want to do. Edits like "//I want to change Terra' | ||
- | |||
- | Spriting with FF6's limitations is harder than simply editing a sprite image, but not so far from it when you know and get used to the limitations and specifications. There are three utilities that are made for FF6 sprite work and at least one general GFX utility that can be used to edit sprites and portraits. They will not be covered in-depth here, as they are relatively straightforward when you know the basics (with the possible exception of YY-CHR, which will be covered in depth in a future tutorial). | ||
- | |||
- | You'll notice I mainly refer to the generic //FF6// name. In this context, //FF6// refers to SNES FF3us 1.0 or 1.1, but most of this tutorial can be applied to the GBA versions as well. However, not all differences will be covered or even mentioned. | ||
- | ==== 2. Understanding Sprites ==== | ||
- | |||
- | **Skip this section if you don't want to read about the technical side of sprites. | ||
- | |||
- | SNES sprites are the combination of two elements: graphic data (GFX) and a palette. The GFX can have a different maximum number of colors, which is called the graphic format. Most SNES graphics are 4bpp (4 bits per pixel), meaning they can have a maximum of 16 colors (transparency color + 15 colors). There are only 16 possible numbers that can be represented with 4 bits (0 to 15). Listed out in binary, these numbers are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111. However, there are game GFX that can be 3bpp (8 colors maximum), like some monsters, or 2bpp (4 colors maximum), like the fonts. In the case of 3bpp format, it is always converted by the code to 4bpp because the hardware cannot display it. The 3bpp is a form of compression. | ||
- | |||
- | {{ ff3: | ||
- | |||
- | To picture a GFX, imagine (in the case of a 8x8 4bpp graphic) an 8x8 array or table where each pixel is represented by a number from 0 to 15. In a " | ||
- | |||
- | {{ff3: | ||
- | {{ff3: | ||
- | |||
- | The corresponding array with color IDs is same size except each color is replaced by its palette ID (0x00 to 0x0F): | ||
- | |||
- | {{ff3: | ||
- | |||
- | Normally, in a logic 4bpp format, if we see the same array in color IDs bits now instead of //full number// (integer or hexadecimal), | ||
- | |||
- | {{ff3: | ||
- | |||
- | However, **bad news!** SNES 4bpp format does not work this way. If we take our happy face tile of 64 pixels (8x8) we get the following 32 bytes, as seen in a Hex editor, 2 rows read from left to right: | ||
- | |||
- | {{ff3: | ||
- | |||
- | Each pixel row is 4 bytes as in any other 4bpp format, except you have to read the byte in bitplane to get the color IDs. Each pixel row is represented in the following image. As an example, pixel row 0 is bytes 18 00 00 00: | ||
- | |||
- | {{ff3: | ||
- | |||
- | Bitplanes are read as 1, 2, 3, 4 or top-left, top-right, bottom-left, | ||
- | |||
- | {{ff3: | ||
- | |||
- | First, you must see each byte in its binary representation. Here the example is symetric but you would usually read from right to left. Each pixel value of the row is represented by the aligned column of those 4 bytes. As an example for first pixel of the row, you read bitplane 1, 2, 3 and 4 which are 0, 0, 0, 0. You color ID is therefore 0000, i.e. palette ID 0. | ||
- | |||
- | {{ff3: | ||
- | |||
- | Since there is 8 bit in 1 bytes, the 8x8 tile format take all its sense here. Here are the color values of row 2. As you can see it correspond what is in our previous color array of the tile. | ||
- | |||
- | {{ff3: | ||
- | |||
- | The SNES 4bpp format is not made to be easily humanly readable and was made this way because of the hardware. Don't worry if you struggle with this; this is the detailed technical side and mastering it is not required at all to sprite. Same goes for the coming palette description. | ||
- | |||
- | Palettes are a sequence of color data that is " | ||
- | |||
- | A SNES Color is in 15 bits RGB format. In short, this mean each color can be represented by 2 bytes (16 bits). Each channel value (R, G or B) is 5 bits long, and the first bit is always 0. Specifically, | ||
- | |||
- | {{ ff3: | ||
- | |||
- | So we know a SNES color fits into 2 bytes; therefore, a 16 color palette takes up 32 bytes of space in the ROM. This is valid for all SNES games. As quickly mentioned previously, transparency is a color because there is no alpha channel in the 15 bits RGB format. The game determines which color is transparent. In the case of FF6, it is always color 0. So this color in the palette will have a RGB value, but it will be //masked// by the game to show transparency instead. | ||
- | |||
- | Here is an example in 5 steps how to convert a color to B,G,R format. We will take our precendent palette of the 4bpp example: | ||
- | |||
- | {{ff3: | ||
- | {{ff3: | ||
- | |||
- | We will take the first color, the medium-dark grey. The steps are inverted 2 bytes value to binary, separation in 3 times 5 bits (1 bit not used) and finally conversion to a decimal value between 0 and 31: | ||
- | |||
- | {{ff3: | ||
- | {{ff3: | ||
- | {{ff3: | ||
- | {{ff3: | ||
- | |||
- | Here are the results for the first 8 colors of our palette: | ||
- | |||
- | {{ff3: | ||
- | |||
- | This basically covers the technical side of colors, palettes and GFX. Little of what was explained is mandatory to accomplish everyday spriting tasks like editing a sprite in FF3usME, but I think it is good to understand how these elements work on the byte level. If you are using an utility that lets you import images (.png, .bmp, .gif, .jpg, etc.), you should work in an image editor such as Gimp in the " | ||
- | |||
- | ==== 3. Editing Tiles (YY-CHR) ==== | ||
- | |||
- | If you wish to do simple tile edits, YY-CHR can be a solution. There is a {{ff3: | ||
- | |||
- | Character sprite are located at $D50000 ($D50200 with header). You can either {{ff3: | ||
- | |||
- | If you want the right colors (i.e., the right palette), you can import the {{ff3: | ||
- | |||
- | There are several different tile arrangements available. Since we are dealing with 16x24 sprites for characters, a more convenient way to view the tiles would be {{ff3: | ||
- | |||
- | {{ ff3: | ||
- | |||
- | To summarize this section, YY-CHR can help with basic tasks, but for complex sprite editing, FF3usME, FF3SpriteEd, | ||
- | |||
- | ==== 4. Editing Sprites ==== | ||
- | |||
- | This section will cover the FF6 spriting utilities' | ||
- | |||
- | === A. FF3SE (no longer developed) === | ||
- | |||
- | First up is [[ff3: | ||
- | |||
- | {{ ff3: | ||
- | |||
- | === B. FF3SpriteEd (merged with FF3usME) === | ||
- | |||
- | Second comes [[ff3: | ||
- | |||
- | {{ ff3: | ||
- | |||
- | === C. FF3usME (still being developed) === | ||
- | |||
- | Finally, there is [[ff3: | ||
- | |||
- | {{ ff3: | ||
- | |||
- | To conclude this section, I'll talk about the spritesheet formats. FF3SE exports the sprite sheet in the //old// format, meaning they have no " | ||
- | |||
- | {{ff3: | ||
- | |||
- | ==== 5. Sprite Animations and Poses ==== | ||
- | |||
- | Each character sprite in [[ff3: | ||
- | |||
- | {{ff3: | ||
- | |||
- | [[ff3: | ||
- | |||
- | [[ff3: | ||
- | [[ff3: | ||
- | |||
- | |||
- | For a short description of each pose ID, refer to the [[ff3: | ||
- | |||
- | The possible animations and pose patterns are used mainly in the event code (as well as battle module and world map module). For events, you can call a pose in an action queue of a character or NPC (event commands $00-$35). Walking combinations have their own [[ff3: | ||
- | |||
- | There is an " | ||
- | |||
- | If we come back to spriting, is it important to make sure all the edited poses work correctly with the sprites animations shown in FF3usME. Editing a tile can sometime have an effect on a pose we did not suspected at first glance. Get used to the tile sharing of the sprite poses, that is the same if we look at all sprite sheets of the same size. | ||
- | |||
- | ==== 6. Editing Palettes ==== | ||
- | |||
- | One of the biggest puzzle for those who have sprite with different palette is making sure everything fit together. Why? Because sprite share palettes! As an example, if you change Celes hair color to blue, Sabin, Edgar and Leo's hair will be blue. | ||
- | |||
- | {{ ff3: | ||
- | |||
- | |||
- | Also there are two 16 colors palettes assigned for each character, one palette for battle and one for maps and overworld. Most of the time they match but they are exceptions. There are 8 battle palettes (located at $ED6300) and 32 overworld palettes (located at $E68000). Here are the first 7 of each type: | ||
- | |||
- | {{ff3: | ||
- | |||
- | They are both assigned in a different way. The battle palette | ||
- | |||
- | This {{ff3: | ||
- | |||
- | While there are many overworld palettes all regular characters and //character NPCs// use a palette ID between 0 and 5, with exception of Esper Terra that use overworld palette 8 and battle palette 6. The reason for you being unable to use 6 and 7 is due to those palettes not being able compatible with save/ | ||
- | |||
- | **Overworld palette** | ||
- | | Palette ID |Sprites using the palette| | ||
- | | 00 |Edgar, Sabin, Celes, Imp, Leo, Ghost, generic elder, generic man, Maria, Rachel| | ||
- | | 01 |Locke, Imperial, Merchant, Scholar, Returner, Clyde, generic woman, generic boy, generic girl, Narshe guard, sailor| | ||
- | | 02 |Terra, waitress, Figaro Sergent, Figaro Guard, Katarin, Darryl| | ||
- | | 03 |Strago, Relm, Gau, Gogo, Banon, Kefka, Gestahl, Gau (suit), Cid, generic thief| | ||
- | | 04 |Cyan, Shadow, Setzer, Interceptor, | ||
- | | 05 |Mog, Umaro, Ultros, Chupon| | ||
- | | 08 |Esper Terra| | ||
- | |||
- | |||
- | |||
- | **Battle Palette** | ||
- | | Palette ID |Sprites using the palette| | ||
- | | 00 |Edgar, Sabin, Celes, Imp, Leo, Ghost, generic elder, generic man, Interceptor| | ||
- | | 01 |Locke, Imperial, Merchant| | ||
- | | 02 |Terra| | ||
- | | 03 |Strago, Relm, Gau, Gogo, Banon, Kefka, Gestahl| | ||
- | | 04 |Cyan, Shadow, Setzer| | ||
- | | 05 |Mog, Umaro| | ||
- | | 06 |Esper Terra| | ||
- | |||
- | Finally when you edit your sprite and colors, there is an order to respect. One of the reason is explained in next section and also why you can only use the first 12 colors for a battle sprite: | ||
- | | Color ID |Description | ||
- | | 00 |transparent | ||
- | | 01 |outline (black) | ||
- | | 02 |eyes | | ||
- | | 03 |pupils | ||
- | | 04 |hair (lighter shade) | ||
- | | 05 |hair (darker shade) | ||
- | | 06 |skin (lighter tone) | | ||
- | | 07 |skin (darker tone) | | ||
- | | 08 |outfit 1 (lighter shade) | ||
- | | 09 |outfit 1 (darker shade) | ||
- | | 10 |outfit 2 (lighter shade) | ||
- | | 11 |outfit 2 (darker shade) | ||
- | |||
- | ==== 7. Other Specifications ==== | ||
- | |||
- | === A) You can set different sprite for battle and overworld === | ||
- | While the vanilla game has same sprite for battle and NPC or overworld PC, you could set a different sprite for battle. The game get a sprite GFX index for each battle sprite in a pointer table at $C2CE43. Each entry is 3 bytes and there are 24 entries. As for NPCs, this is also in the NPC data which can be edited with FF6LE. Finally playable characters get their GFX set with an event command in the same way the palette is assigned, except it is with event command $37. | ||
- | |||
- | === B) Color changes in battle === | ||
- | One thing you must keep in mind and be made aware of is battle sprites have color changes during battle. To be more specific, the outer line of characters glows from effects such as Haste, Protect, etc, and their skin tone changes due to Poison, Zombie, etc. These change the colors of the specified number on the palette: | ||
- | |||
- | {{ff3: | ||
- | |||
- | #1 is what's used for the outline of magical effects around the character, and #2 and #3 are what's used for skin color changes like Poison, Zombie, etc. Please note if you use the skin color for clothing or draw black outlines around your eyes, this will make them change color with the above. Personally, I don't think it's super noticeable, so please don't worry too much. | ||
- | |||
- | === C) Color changes in battle === | ||
- | The total number of colors usable for battle sprites isn't 16 actually, but 12. Out of the 16 colors, 4 are masked via the system colors used (finger cursor, damage font color, etc). Since they do not appear in battle, those last 4 colors can be used for NPCs without worring. There is however a [[https:// | ||
- | |||
- | However using this hack will make characters on palette 4 and 5 display the last 4 colors save/ | ||
- | |||
- | ==== 8. Portraits ==== | ||
- | |||
- | Portraits are 40x40 with a palette of 16 colors. Each portrait has its own palette. The easiest way to edit portraits and import custom ones is with FF3SE. Note that the {{ff3: | ||
- | |||
- | {{ff3: | ||
- | |||
- | If you ever edit directly in the ROM with as an example YY-CHR, the tile order is as follow: | ||
- | |||
- | {{ff3: | ||
- | |||
- | ==== 9. Conclusion ==== | ||
- | |||
- | Becoming a good FF6 spriter require to take a lot in consideration. However many started from nothing and became good with time. It's more a matter of practice and knowing the basics, specifications and exceptions before starting for real. This is what I tried to do with this tutorial. I might revise it a bit but I covered most of the content I wanted to cover. | ||
- | |||
- | If you want to read more on the artistic part of Pixel Art, there is a bunch of external tutorial links available on this [[ff3: | ||
- | |||
- | === Tools used === | ||
- | [[ff3: | ||
- | [[ff3: | ||
- | [[ff3: | ||
- | {{ff3: | ||
- | |||
- | |||
- | |||
- | |||