#19896 - doudou - Tue Apr 27, 2004 8:51 pm
Can someone introduce me to 16 colors palettes for tiles in mode 0 ? There is nothing about that in Jonathan Harbour's book and all the professionnal games I played used it. There must already be a topic on this in this forum, but I searched and found nothing.
#19900 - sajiimori - Tue Apr 27, 2004 9:08 pm
It's in the Pern tutorials. Set bit 7 of the BG control register to 0, then put the palette number in bits 12-15 of each map cell.
#19901 - doudou - Tue Apr 27, 2004 9:09 pm
Which tool convert a 256 colors bitmap to 16 separated palettes ?
#19915 - tepples - Wed Apr 28, 2004 12:05 am
In general, a sprite or a tiled object drawn on the background will be all one palette. You can draw those in 16 colors (#0 being transparent), use any of several image conversion tools to get 4-bit tile data, and assign a palette ID at runtime.
If you need to make a single tiled object on the background using multiple 15-color palettes, based on a 256-color or high-color bitmap, take a look at Quither.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#20526 - Popstar - Wed May 12, 2004 2:39 pm
I made an action some months ago in photoshop which converts an image into 16 images of 16 colors each (one color being the background color - #FF00FF)
I tried it on one of the images the Quither tool also used and I got a far better result.
I've uploaded a zip file containing the action, the individual images and the quither output image so you can compare.
If anyone would like me to explain what the action does, I'd be more than happy to do so.
Here's the zip:
Right here!
_________________
-One pixel to rule them all, one pixel to find them.
-One pixel to bring them all, and in the darkness bind them.
#21475 - doudou - Sat May 29, 2004 7:38 pm
I saw the tools, but I don't figure how to use the images that they generate. I'd like to now how, from those images, I can build a tileset that I can use in a map editor and do the link between tiles and palettes at runtime. If you know a demo (with source) that does this, it would be appreciate.
#22368 - kanelo - Sat Jun 19, 2004 3:40 pm
I tried your "action" but doesnt work for me. What are the prerequisites for the image you pass to the action.
I would like to know what does your action do, so I can learn. I like photoshop but not good with it ^_^. I know how to change image mode to indexed but nothing more.
thank you for your time.
#23355 - Popstar - Sat Jul 10, 2004 11:48 am
First of all, the image must be proportioned right: pixel width and height must be a multiple of 8.
The action does this:
- It duplicates the image.
- The duplicate image is scaled down to 12.5%, which means that each pixel in the duplicated image coresponds to each 8x8 tile.
- The duplicate image is then turned into a 16 color image (by using indexed color) which coresponds to a color for every palette.
- Then I adjust the 16 colors so that they are like this: #000000, #111111, #222222 etc up to #FFFFFF - this is so that the action can pick the colors later by their value, instead of their location on the screen.
- The last thing to do to the duplicated image now, is to scale it up to its original size (or 800%) using nearest neighbour. Now the action selects the entire image (ctrl+a) and copies it (ctrl+c).
- The duplicated image is closed and we don't need to save it.
On the original image, we now paste the clipboard to a new layer.
[loop]
- Copy the new layer, turn off the visibility of the copy and go back to the layer you just pasted.
- Using the function 'Color Range' we can now select each of the specific colors, starting with #000000. Press OK after having set fuzziness to 0 and press the Delete key.
- Now you have a weird looking greyscale-mosaic with parts of the image peering out of the holes you just made.
- With the selection still active, you press ctrl+shift+I to invert the selection and fill with your prefered background color. I usually use magenta. #FF00FF.
- Now you have have an image with some tiles on a magenta background. Duplicate this image with merged layers and set the indexed colors to 16. Now you have all the tiles for your first palette.
- Save the duplicated image and go back to the original. delete all the layers except the layer you copied earlier... turn the visibility on and start over from [loop]. Now you just use #111111 instead of #000000 to pick the next batch of tiles.
[/loop]
You end up with 16 images, one for each palette, which you can copy into a single psd file and remove all magenta pixels from each layer. Thus ending up with a single image containing 8x8 tiles with 16 colors each from one of 16 palettes.
That's how it works.
What happened when you played the action?
_________________
-One pixel to rule them all, one pixel to find them.
-One pixel to bring them all, and in the darkness bind them.