• Welcome to Zoo Tycoon Designer Guild.
 

News:

Welcome to the Zoo Tycoon Designer Guild's newest home.

Main Menu

Animal recolouring - enhancements of Devona's method

Started by dr rick, December 22, 2013, 06:37:59 AM

0 Members and 1 Guest are viewing this topic.

dr rick

Devona's recolouring method and Dr Rick's animal recolouring enhancements - a tutorial

This was written a few years back but never released into the public eye (mainly owing to my own perfectionism and insecurity). I have decided that i waswrong to withhold it and so here it is (spread over the next 5 posts). If any of it does not make sense, or if you have any questions, please post them and I will edit/answer as appropriate.

There are two basic ways of editing animals:
1.   Change the .pal file for the animal (which changes the colour)
2.   Extract the images via Ape or Zoot, edit each image individually, and put them back  via Ape

The first method means a new animal can be made in 2 to 4 hours.
The second method means that a new animal with a limited animation set can be made in a few days or weeks, with a full animation set, the work is more likely to take months.

This tutorial deals mainly with method 1, changing the .pal file.

There are several ways of obtaining .pal files...

1.   Use a .pal file from an existing animal (the Hungarian Reed Wolf illustrates this – it uses the camel .pal file)
    All in-game animal files work fine but be prepared for some surprises
2.   Use the .pal file from an existing scenery object (the Vancouver Island Wolf shows this – using one of the .pal files from the cliff available through APE-XP).  Be aware that many of these have bits of plant in the images, which can give random green pixels in your animals!
3.   Use Devona's method or my variations of it.  Make an image containing the colours that you want. Insert the image into APE which creates a .pal file.  Use that .pal file but be prepared to experiment.

The rest of this tutorial fall into two parts:

Part A – how to get a .pal file into a ztd
Part B – how to do Devona's recolouring method
        and Dr Rick's variations of it. (to be added later)

Part A

First find or make your .pal file.  


- For example, to get an animal pal file, find an animal that has the colours you want.  Create a new ztd of this animal using Ape and save it as, for example, camelpalsource.ztd.  
- Unzip the animal ztd using your Zip program (I use Winrar and find it excellent – it is featured in the illustrations to this tutorial).  
- Look inside the unzipped animal, look inside the animals folder, then inside the folder with the animal's id number on it where you will find some folders, sound files and one .pal file, e.g. dromcaml.pal
- Copy the .pal file (see top part of first illustration which shows the .pal file in its original location)

Second insert your chosen .pal file into the animal

- Create a new ztd of the animal to be re-coloured using APE
- This example will use the Prezwalski's horse
- Unzip that ztd
- Look inside the unzipped animal, look inside the animals folder, then inside the folder with the animal's id number on it where you will find some folders, sound files and one .pal file, e.g. przewals.pal
- Paste your chosen .pl file (e.g. dromcaml.pal) in with the original przewals.pal (shown in the first illustration)
- You have to rename the new pal, e.g. dromcaml.pal EXACTLY what the old .pal was called, e.g. przewals.pal
- If my memory is OK, I delete the old pal and rename it from memory.
- If my memory is dodgy, I add 1 to the old .pal file name e.g. przewals1.pal (which now won't work) and then rename the new .pal file e.g. from dromcaml.pal to przewals.pal, and then delete the old one (e.g. przewals1.pal)
- Now find the animals folder (in which you just put the .pal file) and using your zip program make a winzip of the animal e.g. zip up animals and name it as DrRCamelPalHorse.zip (shown in the second illustration)
- Now test it in APE (shown in the final illustration)
- If you like it, then all that's left is to sort out the icons, text file, plaque and uca configurations and bonza - a new animal.
Dr Rick

How does that work?

dr rick

#1
Part B

Devona's method

Basically Devona's method for recolouring is based on the fact that when an animal icon is created in APE, a .pal file is created that may work like an in-game animal .pal file.

1.  To make the image Devona recommended extracting an image from the animations of your desired animal and recolouring that in your graphics program until it was the right colour you wanted. (Watch that the shadow does not get too far from black.)  This must be saved as a .png image file somewhere you can find it.
2.  Then Devona suggested that you make a .pal file by opening the desired animal in APE and putting your re-coloured image into the animal icon by clicking on the folder next to the icon in the general screen in APE and browsing until you find your image file. (see first illustration)
3.  Save the animal for which you just changed the icon (for example as HorsePalSource1.ztd) and close down APE.
4.  Unzip the animal you just created. Look inside the unzipped animal, look inside the animals folder, then inside the folder with the animal's id number on it where you will find some folders, look inside the folder that starts ic..., for example icprezwa, where you will see two .pal files.  
5.  Copy N.pal which is the .pal file you just created.
6.  Follow the instructions in 'Second insert your chosen .pal file into the animal' in Part A above.

This method did not work well for me because the backgrounds of the images contain a lot of grey (or pink if I extract them using zoot) and that contaminates the resulting animal (see second illustration) so I quickly developed the image used for icons to reduce the amount of background (see third illustration) which gave somewhat improved results (see fourth illustration), providing a spur to further experiments.
Dr Rick

How does that work?

dr rick

#2
Dr Rick's enhancements of Devona's recolouring method

The key to Dr Rick's enhancement was provided by my frustration with the speed of experimentation – every pal I made I had to make a new animal and every pal I made took up Mb of space on my hard drive.  Also the lack of control over the colours expressed.  So...

The Scenery Item Icon Method of making .pal files

To make 4 .pal files at a time and using only a few kb of memory.

1. Make 4 square images 16 pixels by 16 pixels (256 squares) each with a slightly different variation of the colours that you want.  Use graduated shade to shade these through from black through all the shades you want your animal to use to the palest.  I normally do this in two operations – one from black at top left to lightest at bottom right, then a second on 90% transparency from black along the top down to pale at the bottom, giving 256 differently coloured pixels.  
2. Paint the top left pixel hot pink. Save them as .png image files where you can find them.  I usually call them p1, p2, p3 and p4.
3. In Ape, create an Acacia Caffra tree (or other small simple object from near the top of the new items menu) and go to the icons_images page.
4. Put each of your images into one of the icons by clicking on the folder above and to the right of the icon and browsing until you find your .png file.
5. Save the scenery object from Ape as something imaginative like Palmaker.ztd
6. Unzip the object and look in it, within the objects folder, inside the folder with the id number of the object you will find 2 .pal files which I always delete and 5 folders (see illustration 1).  
7. The .pal files made using the icon method are in the four icon folders, icacatne, icacatnw, icacatse, icacatsw.  If you put p1 in the ne icon and then carried on across the APE screen, icacatne contains the pal made from p1.png, icacatnw contains the pal from p4, icacatse contains the pal from p2, icacatsw contains the pal from p3.
8.  For each .pal file follow the instructions in 'Second insert your chosen .pal file into the animal' in Part A above.  See also below for my protocol for making multiple experiments quickly.

You can use larger images to make .pal files using the scenery item icon method but for some reason I find I more often get stray black pixels in the palest parts of the image.  A lot of the early wolves were made this way.

You can't successfully use 16x16 pixel images to make .pal files by inserting them into game images.  You get a galloping black pixel problem (see illustration 2).  However you can do this as follows.

The Scenery Item Game Images Method of making .pal files

This is a second method to make 4 .pal files at a time using only a few kb of memory

1. Make 4 square images 255 pixels by 255 pixels (the largest APE will take in this way) each with a slightly different variation of the colours that you want.  Use graduated shade to shade these through from black through all the shades you want your animal to use to the palest.  I normally do this in two operations – one from black at top left to lightest at bottom right, then a second on 90% transparency from black along the top down to pale at the bottom, giving a large number of differently coloured pixels.  
2. Paint the top left pixel hot pink. Save each as .png image files where you can find them.  I usually call them p5, p6, p7 and p8.
3. In Ape, create an Acacia Caffra tree (or other small simple object from near the top of the new items menu) and go to the icons_images page.
4. Put each of your images into one of the game images by clicking on the folder above and to the right of the image and browsing until you find your .png file.
6. Unzip the object and look in it, within the objects folder, inside the folder with the id number of the object you will find 2 .pal files which I always delete and 5 folders (see illustration 1).  
7. The .pal files made using the game images method are in the idle folder which you should open.  If you put p1 in the ne game image and then carried on across the APE screen, NE.pal is made from p5.png, NW.pal from p8, SE.pal from p6, SW.pal from p7.
8.  For each .pal file follow the instructions in 'Second insert your chosen .pal file into the animal' in Part A above.  See also below for my protocol for making multiple experiments quickly.

In the end I might use this method most as it does seem to produce few black pixels, no stray gray ones and nice smooth colours.

Making Multiple Experiments Quickly    You can do this how you like, but this is the protocol I use...

1. You can combine both operations described above to make 8 .pal files simultaneously.  Use 4 16x16 or larger images for the icon .pal files and 4 255x255 images for the game image files (see illustration 3)
2. This gives you a ztd with 8 .pal files.  Unzip it (or in Winrar, look inside it) and locate the .pal files.  In illustration 4 this is the Winrar screen at top left of the page.  
3. Use APE to make a ztd of your desired animal.  I usually click on descriptions and put in an English name, phrase, tooltip and the name of the animal in the description to make sure that the uca file is OK.  Save this ztd somewhere you can find it.
4. Open another copy of your zip program unzip your newly created animal and find the animals folder, but don't open it. In illustration 4 this is the Winrar screen at the top right of the page.
5. Open, using windows explorer, the unzipped animal and open the animals folder and the folder with the animals id in it.  Locate the .pal file and write down its name e.g. przewals.pal.  In illustration 4 this is the folder across the bottom of the screen.

If you can see both copies of your zip program and the folder, you are now ready to go into mass production of test ztds (all with the same identity number so if your experiments are successful, you will need to transfer the good .pal files from some of the experiments into new ztds with different identities).

6. Copy the N.pal in icacatne. (see top left Winrar screen in illustration 4)
7. Paste into the folder with the original .pal file (see bottom folder in illustration 4)
8. Delete the original .pal file and rename N.pal with the EXACT name of the original .pal file e.g. przewals.pal (see bottom folder in illustration 5)
9. In the other copy of your zip program, make the animals folder into a zip file called Pal1.zip.
10. Repeat 6.-9. for the other three N.pal files, calling the resulting files Pal4.zip for the pal from icacatnw, Pal2.zip for icacatse and Pal3.zip for icacatsw (so you know which of your original images produces what outcome)
11. Repeat 2.-9. for the four .pal files, NE.pal (Pal5.zip), NW.pal (Pal8.zip), SE.pal (Pal6.zip) and SW.pal (Pal7.zip)

You now have 8 zips, each containing a different .pal file and ready to be tested in APE.

12. Change each of the 8 .zip files into a ztd.
13. Open APE and look at each in turn.  Look especially for:
- the colour combinations that you desired (don't compromise or you'll end up unsatisfied)
- stray black pixels in pale area such as noses and underneath when the animal rolls over - too much contrast in the png image seems to make this worse - the only one of these horses with this problem came from p7.png which has that pale line across it as an experiment (reject ruthlessly or you'll end up unsatisfied).
- the colour of the shadow – in desert and savannah animals you can tolerate more of a brownish tint than in other areas, and more greyish in snowy or highlands environments otherwise black is best (less of a priority than the others)
14. For ones that you like, save a walking imafe from the animations screen as rawiconPX.png (where X is 1-8 depending which .pal it is) which APE will call rawiconPX0008.png or similar, both as a potential icon raw material and also so you can compare several nice colours in your graphics program.

15A If there is only one you like, rename the ztd as YourInitialsAnimalName.ztd, make an icon, a plaque and text file, configure the uca file and bonza, a new animal.

15B If you like more than one, make one into an animal as in 15A.  For each of the others, use APE to create a new ztd, unzip it and transfer the .pal file, naming the ztd appropriately and bonza, you've got two or three or more new animals.
Dr Rick

How does that work?

dr rick

#3
OK and here's the end product...

The first two horses contain pal1 and pal5 respectively, which were made using 16x16 p1.png and 255x255 p5.png which both have the same range of colours.  Notice that pal1 is less evenly coloured and smooth, which looks great for a shaggy long-haired look, whereas pal5 gives a much smoother look.

The second two contain pal4 and pal8 respectively, made using 16x16 p4.png and 255x255 p8.png, both lightened versions of P1 and P5.  The horses have a paler colour overall, again with the small 16x16 giving a nice long-haired look and 255x255 a short-haired smooth look.

Finally, the last image shows why Pal7.ztd was rejected.  It contains the experimental 255x255 high contrast image with the pale stripe across it (p7).  You'll notice that it has a stray dark pixel on its nose sometimes (in the yellow ring), which I regard as a serious fault.
Dr Rick

How does that work?

dr rick

Other methods to generate successful .pal files

There are two other things that I have tried that have worked.

- For the ZTUF Dingo, Ratbag Oz had started painting individual animation images about two years before i made the ZTUF wolves, and had put a few views of walk and bark into APE so people could see what it looked like (image 1).  However RB had made no progress since then. 
- I realised that each of these attempts would have created a .pal file.  Unzipping the object and exploring the depths of the animation files this proved to be true. 
- I tested each .pal in a grey wolf using an adapted multiple experiments protocol.  All but one introduced spurious black pixels in pale parts of the image.  One didn't (image 2).  That one is the .pal file in the animal that was released during ATW5 as the ZTUF Dingo.

- At the time I was attempting to make a Dire Wolf that is 110% the size of a grey wolf and modestly re-coloured a reddish/grey colour (like some other American Wolves) (image 3). (long since abandoned)
- Even with a reduced animation set it was taking an age to do, so I decided it might be a good idea not to resize the sit and lie animations where it would not show, if I could re-colour them with a .pal file. 
- All of my existing views gave .pal files which introduced those pesky black pixels. 
- As an experiment I put individual frames of lots of different views and animations into a single animations screen so the wolf appeared to jump and roll about all over the place.  This created a .pal file including a lot more different coloured pixels (since the different orientations and attitudes of the animal often contain darker or lighter or differently coloured material). 
- This worked fine although it is a bit lighter and redder than the manual re-colour images (image 4). I should probably have re-started this animal as I should probably recolour everything first and then extract and re-size it - at least I knew I had a good .pal file to start with.

I think that this could be developed into a successful routine method for making .pal files, but have yet to try it routinely...  It goes like this.

1. Extract a variety of orientations and attitudes of the chosen animal from APE or zoot
2. Manually re-colour as desired, best by using whole image re-colouring as this will retain the relationship between light and dark that is the key to successful .pal recolouring
3. Put them all back into a single animation screen in a scenery object, so that the scenery object would consist of three blank views and one animal that would jump and roll about.  Save this as Palmakeronly.ztd
4. Unzip it or extract the .pal using Winrar.
5. Place the .pal file into the desired animal using the instructions in 'Second insert your chosen .pal file into the animal' in Part A above and test.
Dr Rick

How does that work?