Palette Editing How To:
What are palettes?
Palettes are how hero and child chao coloration works. Instead of being static textures applied over a base color (like neutral and dark chao), child chao and hero chao have a grayscale texture that is colored over by the game itself. Palettes are what determine these colors, but they don't change the base color of the chao themselves. Child chao have a light blue base color, while hero chao have a white base color. That's why all monotone normal hero chao are white, while monotone child chao can change colors. In the images you can see the difference between monotone normal child chao and monotone white child chao, and how that compares to monotone normal dark chao and hero chao of the same colors (that being, the monotone normal hero is identical to monotone white hero).
Before you start:
Note: Do not use the color templates on this page as a base, they're not formatted correctly and are only here as visual examples. Please only use the templates in the .zip folder supplied on the home page.
Palette file names and palette file types
Palettes are saved as .pvp (for SA1) and .gvp (for SA2). The file names are labeled as follows:
- al = "artificial life". These are the internal reference for chao.
- h = hero, n = neutral, d = dark, c = child
- s = swim, f = fly, r = run, p = power, n = normal, z = zero* (palette for early adulthood, prior to second evolution)
So for example, al_hpf would be the palette for Hero Power/Fly. al_dc is Dark Child (child chao after maxing out dark aligntment) and al_hc is Hero Child (child chao after maxing out hero aligntment).
*When chao first evolves, before the second (gradual) evolution
Format and dimensions:
To make a palette, you'll need an image editing program. I use photoshop for this, so this tutorial will assume you have photoshop. If you don't have photoshop, then don't worry, you can still make your own custom palettes but you may need to do some additional testing to understand how your palette affects textures.
Image format:
- The image size has to be 16 pixels wide and 3 pixels tall
- PNG with 8 bits per color is recommended. Not necessarily required, but since textures do require this, it's better to remain consistent.
- Image mode has to be in RBG for color consistency
The templates included in the zip file has these already set-up, but I've included these requirements in case you're using a program other than photoshop and need this information for reference. Here is what the template looks like, for reference:
Palette Colors:
Textures in the game use Index4 and IntensityA8, which means the image is 4-bit and uses transparency. As of right now, I have yet to fully understand the full capabilities of Alpha8, but a texture that uses 4-bit images will only be able to use 16 colors maximum (think 4x4 = 16). Textures have 3 palette banks to choose from, and each bank is assigned to a specific row within your palette (referred to as banks). If you add all the rows (banks) together, the maximum colors a palette can have is 48. Technically you could have a minimum of 1 color for the entire palette, but that would essentially be the same as a monotone chao.
When making your palette, the banks are as follows:
- Top row is the arms, legs, and horns of the chao. This is referred to as bank 0 within SA tools. The 1st color of the 16 color row is the chao's body color, while the 16th color is usually the tip of the horns.
- Middle row is the belly and occasionally the tail. This is bank 1. 1st color of the row is the chao's body color, while the 16th color is usually the middle point of the belly. For child chao, this is the circles on the back of their head.
- Bottom row is the chao's wings. This is bank 2. The 16th color is actually the base of the wings, which is the closest to the chao's body, while the 1st color is the tip of the wings. For child chao, this is the belly.
Below is what a Hero Normal chao's palette looks like, along with the image mask texture and colored texture:
Template:
When creating a palette from the included template, you can either use the PNG file or the .PSD file. If working in photoshop, you can edit this template in two ways:
- You can manually set each color through the color table. This is the faster method when you understand how to make gradients in a color table, which this guide covers. It'll also allow you to export the color table for easy access when working on another palette, as well as allowing you to see how your palette affects a texture in real time.
- You can use the pen tool to set each color. This is tedious and you won't be able to see how your palette looks on any of the textures before importing your palette to SA tools. If you do want to see how your palette affects the texture in real time, you'll have to go back and manually color pick.
If not using photoshop, then you'll have to stick with using the pen tool to set each pixel according to the palette. This is the same as method 2.
Method 1 (Photoshop):
Step 1:
Navigate to the Palette Template folder and open the Palette Template.psd file. When it's open, you'll need to zoom in to see each individual pixel
Then, navigate to the folder of the chao you'd like to change the palette for. For this tutorial, we'll use the Hero Fly chao. Go to Hero Palettes > Fly. Then open the al_hf template.psd. (or the .png)
Step 2:
In the al_hf template file, go to Image > Mode > Color Table. Here you can either start working with the uncolored textures, or import the pre-made color tables for reference.
You can also open a .PNG file from the Palette References folder, but it's possible that the color table from those may not work properly. If they don't, I'll go ahead and update this tutorial.
To import a color table, click load then navigate to Hero Palettes > Fly > Photoshop_Color_Tables. Here, I opened the Fly/Normal color table.
Step 3:
Create your custom palette. You can drag across the rows to make it one gradient or one color. To make a gradient, pick your first color then click okay. Then, it'll prompt you to pick your second color for the gradient. Make sure to not ctrl + click a color on accident or else it'll delete the color from your color table and you may have to potentially start over.
Step 4:
After you finish your color table, click save, put it in a convenient folder, then name the color table. If you want, you can save the .psd with your color table active -- just remember to give it a new name. DO NOT SAVE THIS AS A PNG AND TRY TO LOAD IT INTO SA TOOLS. It will not work at all if you do.
Step 5:
Click back to Palette Template.psd then once again go to Image > Mode > Color Table. Then click "Load". Navigate to where you saved your palette's color table and open it. After that, your color palette should be formatted correctly.
Step 6:
Now either go to file > export > export as... or hit alt + shift + ctrl + W. Format should be PNG, transparency unchecked, and uncheck "Convert to sRGB". Like always, give it an easy to remember name and save it in a convenient location. After that, it should be ready to import into SA Tools.
Method 2 (Any program):
Step 1:
Navigate to the Palette Template folder and open the Palette Template.png file (you can also open the .psd file). When it's open, you'll need to zoom in to see each individual pixel. If you're editing in photoshop, make sure to go to Image > Mode and change it to RGB Color and double click the lock over on layer 0 in order to be able to edit anything.
Step 2:
Select the pencil tool or equivalent and begin editing the palette to your liking.
Photoshop Tip: if you want to make a 16 color gradient, open a new file and make a gradient using the two colors on your toolbar (foreground and background).
Go to filter > pixelate > mosaic
Adjust the cell size to 112 square.
You can color pick these squares as you go, but you may need to adjust in order to have better contrast. Find a tutorial for photoshop swatches (or equivalent) in order to do this somewhat faster.
Step 3:
When you're done, for Photoshop, you can either go to file > export > export as... or hit alt + shift + ctrl + W. Format should be PNG, transparency unchecked, and uncheck "Convert to sRGB". For a different program, you may be able to get away with just saving as .PNG. Just make sure your opacity is at 100. Give the .PNG an easy to remember name and save it in a convenient location.
After that, it should be ready to import into SA Tools.
Import to SA Tools:
Step 1:
Before you get started, make sure you back up all the .GVP files inside gd_pc in case you make a mistake. Save it somewhere easy to naviagte to later, such as a documents folder. Follow the steps to set up a project here. Then, open the texture editor.
Step 2:
Then go to file > new > GVM (or PVM for SADX). If you skip this step, you may get an error for the texture files for the textures that use palettes.
Step 3:
Click add. Navigate to where you have SA2 or SA1 installed through steam. Program files > steam apps > Sonic Adventure 1/2 > resource > gd_pc. From here, select al_body.prs. This is where the chao textures are stored.
Step 4:
Select the texture you'd like your palette to use. Then, click "load" (not import, that's for chaging the texture). Go to where you saved your palette PNG and choose it.
When it asks to import as ARGB8888, click on "no".
If done correctly, your new palette should be generated in SA tools properly.
Step 5:
Click "save". Make sure to save it somewhere you can access easily later. If you save your palette with the same file name as the palette you want to replace, do not save it in gd_pc as it'll completely overwrite the original palette.
Step 6:
From here you should be able to make this into a mod, to which you'll have to navigate back to the chao modding docs and SA Tools wiki. You could also replace the palette file in gd_pc for quick testing, but it can be easy to lose track of what you changed if you do. I do not recommend that method of testing due to the issues it could possibly cause.