Landscape Generator
Procgen 9000's Landscape Generator
- image
The name is a lie. Despite the "9000," Procgen 9000's Landscape Generator doesn't call any API, needs no key, and doesn't load a single model. It's pure math and Pillow: the node draws a stylized, multi-layer mountain scene - flat-color ridgelines, an optional glowing sun - and hands you a real ComfyUI IMAGE tensor. That's the whole point. It exists to manufacture seeds: structured base images you feed into img2img or ControlNet instead of starting from noise or a stock photo.
The author (Hal Rottenberg) frames the whole pack this way - procedural images for image-editing workflows. For a landscape shape, that's genuinely handy. You get a scene whose exact silhouette, color palette, and horizon placement are all driven by one seed, so you can roll through hundreds of compositions cheaply and keep the one worth refining.
How it works
The terrain uses the midpoint displacement algorithm (a faithful port of the classic "Landscape generation using midpoint displacement" blog post). Start with a straight ridge line between two endpoints, take the midpoint, nudge it up or down by a random amount, then repeat with a shrinking displacement that follows a roughness factor. Do that enough iterations and you get a jagged, natural-looking ridge - the same trick behind a lot of old-school procedural terrain.
The node runs that four times, each layer with its own roughness and scale, and draws them back-to-front as vertical fills down to the bottom of the frame. The result is layered mountain silhouettes. The sun is drawn last at 75% across, 18% up, with a soft multi-ring glow. Everything is numpy + Pillow, fully deterministic, and driven by Python's built-in random seeded with your seed - so the same seed always gives the same landscape. The node even overrides IS_CHANGED to make sure ComfyUI doesn't cache away your seed changes. Output is a [1, H, W, 3] float tensor in 0–1, exactly what downstream nodes expect.
The inputs that matter
There are only a handful, and you'll touch three of them:
- seed - reproducibility, and it also seeds the Random palette. Roll it to explore.
- width / height (64–8192, step 8, default 1024×512) - the algorithm samples per pixel per layer, so 8192 gets slow for no benefit on a seed image. 1024×512 is plenty.
- style - six named palettes (Twilight, Desert Dusk, Arctic, Forest, Volcanic, Ocean) plus Random (seeded, so repeatable) and Custom.
- show_sun - toggle the sun, obviously.
- custom_colors (optional string) - a JSON blob used when style is Custom:
{"sky":[r,g,b], "sun":[r,g,b], "layers":[[r,g,b],[r,g,b],[r,g,b],[r,g,b]]}.
The output image wires into a VAEEncode + img2img setup, or straight into a ControlNet preprocessor. Its hard edges and flat fills are catnip for Canny or lineart - the structure it hands over is exactly what ControlNet conditions on.
Installing it
Through ComfyUI Manager: search "Procgen 9000" and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/halr9000/procgen9000
Then restart ComfyUI. The only real dependencies are Pillow and numpy - torch comes with ComfyUI itself. No model downloads, no heavy weights, no external service. It's about as light as a custom node gets.
Where people get burned
Two spots. First, Custom mode silently falls back to Twilight if your JSON is malformed or missing a key - the code swallows the parse error. The live color-swatch row under the dropdown helps: in Custom mode, clicking a swatch writes the JSON back into the field for you, so you rarely have to hand-type it. Second, Random palettes are literally random RGB, which means occasionally glorious and occasionally vomit green. Since it's seed-reproducible, just roll the seed until you land a palette you'd actually frame.
Don't expect a rendered scene - this is a flat, stylized base, not photorealism. Used as a seed for img2img or a ControlNet condition, that's a feature. Used as a final image, it's a Lite-Brite drawing. Which is a perfectly good reason to feed it to a model and let it do the painting.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 420–4294967295 | Controls reproducibility. Same seed → same landscape. |
| width | INT | 102464–8192 | — |
| height | INT | 51264–8192 | — |
| style | COMBO | Twilight | Color palette. Choose a named style, Random (seeded), or Custom. |
| show_sun | BOOLEAN | true | Toggle the sun on or off. |
| custom_colorsopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |