ComfyUI Node

Compass

Give your battlemap a compass rose so players stop asking which way is north

By fmatray·Created 2 years ago·Updated 2 years ago· 0
Compass
  • image
  • image
font/System/Library/Fonts/Supplemental/Arial.ttf
cardinalsNWSE
positionbottom right
size64
rotation0
seed0
random_rotationtrue

Every good battlemap needs a compass rose in the corner, and every table has that one player who still asks "wait, which way is north?" This node is the "are we done yet" final touch of the ComfyUI battlemap pipeline: take your finished map, drop a compass on it, export, and you're done. It's a pure image-compositing utility - no models, no GPU, nothing clever - which is exactly what you want for a task this boring.

How it works

It draws a classic rose straight onto your image with PIL: two concentric ring ellipses for the outer circle, then eight wedges radiating from the center - four black-and-white arrowheads for the intercardinal directions, four with cardinal letters (N, E, S, W) labeled on top. The letters come from a TTF font you point it at, which matters more than you'd think (see the trap below). Everything lives in the same corner you choose, and the output image is your map plus the rose, done.

The inputs that matter

Eight inputs, but the ones you'll actually set:

  • position - top left, top right, bottom left, or bottom right. Bottom right is the default and the usual choice.
  • size - the rose's overall diameter in pixels. 64 is small and subtle; crank it up if you want it readable.
  • random_rotation - the trap. It defaults to ON, which means every run gives you a randomly rotated rose. That's a feature for people who like maps that don't look copy-pasted, but if you want north to point up like a normal map, turn it off and set rotation yourself (0 = north up).
  • seed - paired with random_rotation: same seed, same rotation. Set it if you need reproducibility, ignore it otherwise.
  • cardinals - NWSE or NOSE. The second one is a joke option that labels the points N, O, S, E. It's there, it's intentional, use it or don't.

The font trap

The default font path is /System/Library/Fonts/Supplemental/Arial.ttf - a macOS path, hardcoded from the author's own machine. On Windows or Linux this file doesn't exist, and ImageFont.truetype will throw and the node will error out the moment it runs. It's a plain text input though, so just type a real path on your system:

C:\Windows\Fonts\arial.ttf        # Windows
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf   # Linux

That's the single most common way this node bites people, and it's a one-line fix.

How to install it

Install the pack once and you get all four Battlemaps nodes. ComfyUI Manager: search ComfyUI_BattlemapGrid. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/fmatray/ComfyUI_BattlemapGrid

Then install the pack's one hidden dependency - aggdraw, used by the grid node but absent from any requirements file - or the whole pack fails to import:

path/to/ComfyUI/venv/bin/pip install aggdraw

Restart, and look under the Battlemaps category. No model downloads, nothing heavy.

Common issues

  • Node errors immediately on Windows/Linux - it's the font path, almost certainly. Point font at a TTF that exists.
  • Rose rotated when you didn't ask for it - random_rotation defaults on. Flip it off.
  • Letters missing or gibberish - the font file you gave it doesn't have the glyphs; use a system font.

It's the last node in the chain for a reason: after this one, there's nothing left to fix.

CategoryBattlemaps

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
fontSTRING/System/Library/Fonts/Supplemental/Arial.ttf
cardinalsCOMBONWSE2 options: NWSE, NOSE
positionCOMBObottom right4 options: top left, top right, bottom left, bottom right
sizeINT6410–2048
rotationINT00–360
seedINT00–18446744073709550000
random_rotationBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE