Random Landscape Generator

Procedurally draws a simple layered SVG landscape: a day or night sky gradient, a sun or moon placed at a random point in the sky, a random jagged hill/mountain silhouette across the horizon, and a handful of simple trees scattered along the ridge line. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This generator draws a simple, calming landscape scene: a gradient sky, a sun or moon, a jagged horizon of hills, and a scattering of small trees along the ridge.

Every part, the sky's exact colors, the celestial body's position, the hill's jagged shape, and how many trees appear and where, comes from fresh randomness on every generation.

What Is Random Landscape Generator?

A procedural SVG generator that layers a background sky gradient, a sun or moon circle, a jagged hill silhouette polygon, and a handful of simple two-part trees (a trunk rectangle and a canopy circle).

Time of day can be forced to 'day' or 'night', or left as 'random' to let the tool decide, reporting back which one it picked.

How Random Landscape Generator Works

A vertical linear gradient fills the whole canvas as the sky, with colors chosen from a day-appropriate blue-to-warm range or a night-appropriate navy-to-purple range depending on the resolved time of day.

A single circle (a yellow sun by day, a pale moon by night) is placed at a random point in the upper portion of the sky.

The hill's ridge line is built from 8-12 points spaced evenly across the canvas width, each given a random height offset, then closed into a filled polygon down to the bottom of the canvas; a random subset of those same ridge points are reused directly as tree positions.

When To Use Random Landscape Generator

Use it for quick decorative nature-themed art, a placeholder landscape background, or a calming visual accent for a page or app.

It's well suited anywhere a simple, stylized scenic illustration works better than a photorealistic landscape image.

Features

Advantages

  • Time of day is fully controllable (forced day, forced night, or random) rather than being entirely left to chance.
  • Trees are guaranteed to sit correctly on the hill's ridge line since they reuse the same randomly generated points.
  • Produces a crisp, infinitely scalable SVG with a cohesive day/night color palette.

Limitations

  • The hill silhouette is a simplified random jagged polygon, not real elevation or terrain data.
  • Only one hill layer and a fixed simple two-part tree shape are supported; there's no multi-layer parallax or varied tree species.
  • This is stylized generative art, not a photorealistic or geographically specific landscape rendering.

Examples

A day scene with 4 trees

Input

(no input; generated from settings)

Output

A 600x400 SVG with a blue-to-warm sky gradient, a sun, a jagged green hill, and 4 trees along the ridge

timeOfDay: "day" forces the bright sky and sun regardless of the random 50/50 default.

A night scene with 2 trees

Input

(no input; generated from settings)

Output

The same style of scene with a dark navy-to-purple sky, a pale moon, a darker hill, and fewer trees

timeOfDay: "night" forces the dark sky and moon; tree count is independently randomized between 2 and 5.

Best Practices & Notes

Best Practices

  • Use 'Random' time of day if you want variety across regenerations without manually toggling day/night yourself.
  • Regenerate a few times at the same time-of-day setting to see the range of hill shapes and tree placements.

Developer Notes

Tree positions are deliberately drawn from the same array of {x, y} points used to build the hill's polygon path, rather than being independently randomized, which is what guarantees every tree's trunk base lines up exactly with the ridge line beneath it regardless of how jagged that particular hill turned out.

Random Landscape Generator Use Cases

  • Decorative nature-themed background art for a page or app
  • A quick placeholder scenic illustration for a mockup
  • Illustrating SVG gradient and polygon-based landscape techniques

Common Mistakes

  • Expecting the hill shape to represent real terrain or elevation data — it's a randomly jagged stylized silhouette.
  • Assuming 'Random' time of day always alternates evenly across generations; it's an independent 50/50 coin flip each time, so short streaks of the same result can happen.

Tips

  • Force 'Day' or 'Night' directly if you need a consistent mood across multiple generations for a matching set.
  • Download the SVG if you want to adjust the sky colors or tree placement afterward in a vector editor.

References

Frequently Asked Questions