Glitter - a shitty but somewhat useful command-line post-process map editor

what the title says

Download Glitter (Python) OR view example images

Friends and non friends,

I bring you something I made a couple of years ago but never bothered to properly share: glitter, a map reading and post-processing script for aos maps. Think of it as a map beautifier: if all you’ve colored on your map are solid colors, you might wanna run a couple passes of glitter on it before publishing it because chances are it looks worse than what it could’ve been had you given it a chance to poupounne itself ú_ù

It simply runs procedural graphical operations on the given map file and outputs a different map file as per the given arguments. The available arguments are:

-g --grade
Multiplies the map’s color with the given RGB value

-nm --noisemono
Adds monochromatic noise to the map

-nc --noisecolor
Adds chromatic noise to the map

-rx --rampx , -ry --rampy, -rz --rampz …
Adds a ramp over the map in the given direction

-sh --shadow
Adds shadow under structures. Keep in mind Openspades already draws shadows, so this might be conficting with some player’s setups.

-sn --snow
Self-explanatory

-rp --repair
Fixes the map blocks’ alpha channel so they appear properly when loaded in some version of goxel.

-d --debug
Renders a P-map in the map’s color channel. Few case scenario for your average map, but pretty! Also useful in order to make sure your map is well-read. Are the colors all messed up? The script won’t work properly if so!

If you can make sense of my shitty code, please feel free to expand on it so I may merge other procedural methods possible into the script. process_block() contains the logic for changing the blocks’ color, so it is a good starting point to lurk that part of the code to understand it.

8 Likes

Not shitty!

Played about a bit; snow and grading are neat ways to make map variations very quickly.
Shadows were a bit on the simple side; something projected would’ve been better but I appreciate that ups the complexity a lot.
Will try the others at some point.

Either way, handy tool, thanks for making.

2 Likes