Author Topic: Palette cycling webpage  (Read 25953 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Re: Palette cycling webpage
« Reply #15 on: July 23, 2015, 05:26:03 PM »
I tried implementing this in SCI (see attached), but it doesn't look as convincing.

The palette colors are different than the ones that appear for this image on the website (edit: oh ok, these are for the cloudy waterfall scene, they look ok). I don't know if that's the issue, or perhaps the timing (not really sure how the SCI palette animation speeds tie into actual speeds).

Maybe someone else can poke around with it?
(note that the high index for palANIMATE is exclusive... I'm pretty sure I have the ranges right)

« Last Edit: July 23, 2015, 05:45:23 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Palette cycling webpage
« Reply #16 on: July 23, 2015, 05:30:07 PM »
Anyway, for the day night cycles it might be nice to track down where this was done in the QfG VGA games, those those only shifted by entering a screen, not while ego is already in that room.

Do they just lighten/darken/tint the scene, or is there something more complicated going on? Like where different sides of objects get lit different amounts different times a day?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Palette cycling webpage
« Reply #17 on: July 23, 2015, 05:59:46 PM »
No, it just tints the whole palette red (for sunrise/sunset) and blue (for night) in QFG. That can already be done now with the recent addition of palette tinting to SCI Companion. This method doesn't have the advanced shadowing/colouring shifting that Ferrari's screens do.

One thing about dithering is it looks much better in hi-res 640x480 than it does in 320x190, which is probably why not many have tried dithering with palette shifting in low-res games before.

Kawa, do your conversions create 8-bit PNG files with the indexed palettes intact? When I try opening the PNGs you posted in PSP, it opens as a 32-bit colour image without a palette. It's obviously very important for indexed colour images (especially with colour cycling) to keep the palette entries exactly as they are originally in 8-bit.

EDIT: I see that they do. I need to stop thinking that copying and pasting an image copies it exactly in its format.
« Last Edit: July 23, 2015, 06:07:20 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: Palette cycling webpage
« Reply #18 on: July 23, 2015, 06:06:51 PM »
Kawa, do your conversions create 8-bit PNG files with the indexed palettes intact? When I try opening the PNGs you posted in PSP, it opens as a 32-bit colour image without a palette. It's obviously very important for indexed colour images (especially with colour cycling) to keep the palette entries exactly as they are originally in 8-bit.
Affirmative.

This is in fact what the /KP switch I mentioned is supposed to ensure: Keeping the Palette.

Offline MusicallyInspired

Re: Palette cycling webpage
« Reply #19 on: July 23, 2015, 06:08:00 PM »
Ah, edited before I saw your post. Yeah, I realized that they do. I had copied the image and pasted into PSP, which loses all original data and creates a 32-bit image.

Would you release this tool? :D
« Last Edit: July 23, 2015, 06:11:47 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: Palette cycling webpage
« Reply #20 on: July 23, 2015, 06:11:31 PM »
Ferrari states that some gradients in his images' palettes are cycling at different speeds than others. This isn't possible in SCI is it? It has basically a forward and backward flag? I suppose you could delay it and make it slower, but you can't really speed it up beyond the game's cycle speed eh? That might be enough, I guess though.

8-bit art is so interesting! Working with indexed colours and stencils is almost like working with layers! That's the only way Ferrari could have had as much individual control over each section of an image as he did. I'm almost sad that we don't have a version of SCI that can compile SCI32 scripts for 640x480 games. It's like an untapped 8-bit dream. I'm sure there is much we can do with SCI1.1 as well, though.
« Last Edit: July 23, 2015, 06:20:24 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: Palette cycling webpage
« Reply #21 on: July 23, 2015, 06:24:42 PM »
Ah, edited before I saw your post. Yeah, I realized that they do. I had copied the image and pasted into PSP, which loses all original data and creates a 32-bit image.

Would you release this tool? :D
I'd rather not, but I'll gladly describe how I did it.

  • Rip a scene.php file from cache.
  • Remove the bits of JS at the ends -- CanvasCycle.initScene( ... );
  • The program loads the resulting near-JSON (it has unquoted keys but my self-rolled library doesn't give a shit) and a 640?480 8bpp bitmap file prepared earlier.
  • The palette data is taken from /base/colors, which is [R,G,B] and written to the bitmap's palette area (starting at 0x36) in BGRA order -- the A is zero. (Yes Milwaukee bitmap files can have alpha layers, just look at the Windows 7 Start button.)
  • The pixel data is from /base/pixels, and is written to 0x436... upside down, because bitmaps are weird like that. The height is actually set to -480 and many readers may refuse a positive value.
  • pngout v08.bmp /kp
  • Color cycle information is in /base/cycles.

To do the time of day variants, use the values from /palettes/id/colors instead, where id is any of the entries in /timeline.

Edit: also, you can find out which scene.php file to grab by looking at scenes.js -- the name field for "Jungle Waterfall" is V08, so find a scene.php with "filename:'V08.LBM'" near the top.
« Last Edit: July 23, 2015, 06:26:50 PM by Kawa »

Offline troflip

Re: Palette cycling webpage
« Reply #22 on: July 23, 2015, 06:37:37 PM »
Ferrari states that some gradients in his images' palettes are cycling at different speeds than others. This isn't possible in SCI is it? It has basically a forward and backward flag? I suppose you could delay it and make it slower, but you can't really speed it up beyond the game's cycle speed eh? That might be enough, I guess though.

Can't go beyond a certain speed, no, but you can definitely cycle different ranges at different speeds. So that part is possible.

8-bit art is so interesting! Working with indexed colours and stencils is almost like working with layers! That's the only way Ferrari could have had as much individual control over each section of an image as he did. I'm almost sad that we don't have a version of SCI that can compile SCI32 scripts for 640x480 games. It's like an untapped 8-bit dream. I'm sure there is much we can do with SCI1.1 as well, though.

Lol, if only I had infinite time, I would probably make SCI Companion support SCI32. I don't know how similar the resource formats are, so I have no idea how difficult a task it is.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Palette cycling webpage
« Reply #23 on: July 23, 2015, 06:58:59 PM »
It looks like I misinterpreted the "rate" in the original list of palette ranges and speeds. Lower rates are slower, which is the opposite of SCI.

In SCI, a palette animation speed of 8 will be twice as slow as 4, etc.... The only exception is 1 (i.e. 1 is not twice as fast as 2), probably because it's running right near the frame rate.

Anyway, if I can figure out what "rate" means for the original animations, I can see if I can get something better.

[edit:] Ok, it looks like the png kawa provided has some incorrect indices. For instance, there is no index 198 anywhere in the picture, but there is a cycling range range from 196 to 202 (of which 198 is a key part, if you look at the original "jungle waterfall afternoon" on the website).

I dunno if the data was pulled from the wrong file (the images look nearly exact, it's just a handful of indices here and there that are absent), or there's a problem with kawa's tool, or an issue with saving it as a png despite "keep the palette".
« Last Edit: July 23, 2015, 07:21:02 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Palette cycling webpage
« Reply #24 on: July 23, 2015, 07:26:55 PM »
I dunno if the data was pulled from the wrong file (the images look nearly exact, it's just a handful of indices here and there that are absent), or there's a problem with kawa's tool, or an issue with saving it as a png despite "keep the palette".
Trust me, what you see there is the actual palette data as described. If you set the time on the site just right...

Offline troflip

Re: Palette cycling webpage
« Reply #25 on: July 23, 2015, 07:32:13 PM »
I don't doubt the palette ranges are correct. The image data is wrong though. Compared to the image on the site,

195 is absent and those pixels that were 195 in the original, are 192 in the png you provided.
198 is absent and those pixels that were 198 in the original, are 196 in the png you provided.

So 192 and 196 got "doubled up", so to speak.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Palette cycling webpage
« Reply #26 on: July 23, 2015, 07:36:52 PM »
If it weren't for the byte order, it'd be a straight copy. I don't see how my conversions can be "wrong".

Offline troflip

Re: Palette cycling webpage
« Reply #27 on: July 23, 2015, 07:48:28 PM »
I'm not sure what's up. It doesn't quite look like bytes were just "overlapped", but your image is definitely different than what's here for "jungle waterfall afternoon", based on hovering the mouse over the palette on the right:
http://www.effectgames.com/demos/canvascycle/?sound=0


The top one is index 192 highlighted on the site.
The bottom one is index 192 in your png.

And if you load your png into SCI Companion and look at the palette, you'll see there are missing indices in the middle of palette cycle ranges. In fact, for the main waterfall, there's a missing index every 7 palette entries (and the 5 cycling ranges for the waterfall are all 7 entries in length). So it's almost like the image was captured in mid-transition or something..
« Last Edit: July 23, 2015, 09:20:28 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Palette cycling webpage
« Reply #28 on: July 23, 2015, 07:50:30 PM »
The missing entries could be a time of day thing.

Offline MusicallyInspired

Re: Palette cycling webpage
« Reply #29 on: July 23, 2015, 08:57:59 PM »
Lol, if only I had infinite time, I would probably make SCI Companion support SCI32. I don't know how similar the resource formats are, so I have no idea how difficult a task it is.

Oh, I know. I wasn't requesting it. That would be far too much work and we've only started finally getting SCI1.1 together. There's no need. AGS can do colour cycling as well, after all.
Brass Lantern Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.023 seconds with 22 queries.