On Tue, 5 Dec 2006 17:26:56 +0000
Stuart J Urquhart <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> I've been trying to create some new room graphics to try things out.
> However, i encountered a few problems, but eventually solved them by
> examining the room example a bit more closely.
>
> First off, i read the documents on the wiki, which pretty much told
> me i had to convert the images to indexed format and somehow merge
> the palettes together, so i'd essentially end up with a combined
> palette like this:
>
> [room colors] [actor colors]
When i wrote that page i was using gimp 1.x wich can do palette
concatenation iirc. gimp 2.x can't afaik so i wrote palcat.
> After failing miserably trying to use the gimp, i tried looking
> around for command-line batch processing tools that might be able to
> do the job. The only one i found was imagemagick. Whilst it could
> generate palette'd images, it didn't seem to be able to offset the
> colors of the actor images properly.
>
> I then took a closer look at the room example, and noticed in
> devil.scost that there was a palette range for the costume:
> palette([0-31]);
> Which pretty much solved my issue of needing to offset the palettes
> in the actor images. The only remaining problem was that i needed to
> concatenate the palettes together, which is when i found the "palcat"
> tool included in scummc. For some reason, it wasn't compiled by
> default, but i managed to compile it manually, i.e.:
> gcc palcat.c scc_img.c scc_fd.c scc_util.c scc_param.c -
> DIS_LITTLE_ENDIAN -I<build dir> -o palcat
It's part of the utils target. You can run make all or make utils
or make palcat to build it. make help print a list of the possible
targets.
> Then all i had to do was run it, i.e.:
> palcat -o combined_room.bmp room.bmp actor_image.bmp
> Then change the offset in devil.scost, which in my case needed to be:
> palette(200-231);
>
> The end result was that the devil didn't look like a gooey grey mess.
> Although i forgot to include the colors for the verb's and text
> (whoops), so i really should have added those into the mix.
Yep, what i did lastly was to start with a basic palette (red, green, blue
yellow, etc) for the verbs and text, then the actors palettes then the
room palette. I suppose one should also leave a few free slot for effects
like actor shadows, etc
> I was surprised that i could not find any decent image editors or
> batch processing tools for editing images with palettes. It would be
> nice if there was a magic tool that would take in a list of palette
> ranges, along with a set of images associated with them, handle the
> down-sampling, and generate a master palette. e.g.:
> palgen -prefix real_ -group 0,200 -image room.bmp -group 200,255 -
> image actor*.bmp -o master.pal
> Which could generate the images real_room.bmp and real_actor*.bmp,
> which would share the generated palette, master.pal.
I was thinking about that too, such a tool could make things a lot easier.
It's probably not too hard to do with all the code available in scummc.
Basicaly extend the BMP reader to read RGB image and write the code to
convert to paletted.
> Though then again, i don't have the time to make such a tool, so i
> should probably just stick with palcat & co.
You can take a look at gimp 1.x it have a few more features for paletted
format. Not that it so much better than gimp 2.x + palcat.
> Anyone else have any tips or suggestions for handling the scummc art
> pipeline?
Write a new palette oriented editor or scripts/plugins for gimp.
Making plugins/scripts for gimp is probably the simplest way,
on the other hand a custom editor could be much more powerfull
in the end. However i never looked at gimp scripts/plugins so
i don't really know what kind of things are possible.
Albeu
_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general