Overview
Cycles the colors in a palette. Without moving a single pixel, it animates water, fire, or waterfalls by rotating only their color assignmentsโdirectly reproducing the classic retro-game technique of palette cycling.
Usage tips
- It works as a three-node set:
image_to_indexed_image(assign indices) โ Palette Cycle (rotate the palette) โindexed_image_apply_palette(recolor). Cycle does nothing on its own. - The go-to setup is to promote
shiftto an input pin ๐ and connecttime_sourceร frame count. Rotate by exactly the number of colors in the range over one loop for a perfect cycle. - Partial cycling with
range_start/range_countis the practical key: restrict the animation to a color range such as the four water colors. - In the source image, paint the colors to be cycled in gradient order for a clean flow.
Related nodes
image_to_indexed_image/indexed_image_apply_paletteโ required before and after this nodetime_sourceโ drivesshiftanimation_renderโ bake the animationpalette_getโ one-off color lookup (without cycling)
Technical details
- With
shift = 1, every color advances by one slot and the last wraps to the first. - The shift wraps automatically by the number of colors in the range (for a four-color range, shift 5 = shift 1).
- The slider keeps a convenient
-256..256display range, but typed and connected values may continue beyond it. Values such as257or300still wrap by the selected color count, so a long-running animation does not stop at 256. - Slots outside the range are unchanged, allowing partial cycles such as rotating only four water colors while keeping skin colors fixed.
Examples
Water animation (classic palette cycling)
Image โ Image to Indexed Image โโ Indexed Image Apply Palette โ completed animation
โ palette โโ Palette Cycle โโ
Time Source โ (connect to shift)
- Convert the water image to indices with
Image to Indexed Image. - Pass its palette output through
Palette Cycle, and connectTime Sourcetoshift. - Recolor with
Indexed Image Apply Paletteโ turn it into a sprite sheet withAnimation Render.
Partial cycle
If the water colors occupy slots 4โ7 of a 16-color palette, use range_start: 4,
range_count: 4. Only the water flows while the character colors remain fixed.