A sky for Defold that also lights your game.

Volumetric clouds, a real day-night cycle, and one weather dial that takes you from clear to storm — over a grass field that bends in the same weather, on rolling hills, round a stone circle the moss creeps over while the game runs.

Most sky shaders hand you a pretty backdrop and a lighting bug: the sky turns orange at dusk while your light stays white, and the world is lit at noon under a sunset. Firmament ships a rig that closes that gap. One time of day value gives you the sun's direction, its colour and its strength, the moon, the ambient level and the fog colour — so the scene is lit by the sky the player can actually see.

Also for Godot — Firmament for Godot 4: the original edition, as two Godot 4 addons: the same sky, rig, weather dial, grass and hills, moss that grows on your own models, and a playable of its own. Sold separately.

Also for Unity — Firmament for Unity 6 URP: the same sky, rig, weather dial, grass and hills for the Universal Render Pipeline, with moss that grows on your own models, as a Unity project with a .unitypackage and a playable of its own. Sold separately.

The demo above is the thing you are buying, built for the browser. Set the clock, the weather, the preset, the grass, the hills, the torches and the moss's growth from the panel, then drag to look and fly with WASD, E to climb, Q to sink and left Shift to go faster.

EngineDefold 1.13 — built and tested on 1.13.1
Tested onThe HTML5 build, in Chrome on macOS
Render scriptIts own, firmament/render/firmament.render: use it as it is, or merge its draw order into yours
NeedsNo textures, no native extensions, no library dependencies — Lua, shaders and models
You getThe firmament/ library and its render script, the demo collection with its panel, the stone circle and a 20-model landscape kit
LicenceUnlimited commercial projects, no royalty, attribution not required

At a glance

FeatureIn this edition
Volumetric skyRaymarched clouds, marched at half resolution in a render pass of their own, under a full-resolution atmosphere, sun, moon and stars
Fog and tonemapDistance and height fog in the colour the rig gives it, and an ACES filmic tonemap, in the materials
Day-night rigOne clock gives the sun, the moon, the ambient light and the fog colour, from real solar geometry (latitude and day of year), in Lua
Weather dialOne value from clear to storm, read by the clouds, the light and the grass's wind
PresetsSix sky presets: clear morning, fair weather, broken cloud, overcast, storm and alien dusk
HillsFlat, Rolling or Hilly over a 900 m square of ground; flatten pads; height_at and normal_at in Lua for placing your own objects
GrassWind-animated blades in a field that wraps around the camera, on the hills or on flat ground
Stone circle63 stones, about 75k triangles, as glTF
Landscape kit20 boulders, outcrops, walls and dead timber, as glTF
MossGrows over the stone circle while the game runs, from bare stone to a green ruin, and darkens in the wet; drawn flat on the stone
Torches and firefliesIn the demo collection, fading out at sunrise
TexturesNone. The clouds, the atmosphere, the stars, the grass and the moss are all procedural
Playable demoThe Defold build, in the browser, at the top of this page

☀️  One clock lights the scene — the rig and the presets

firmament/rig.lua works out the sun and the moon, their colours and their strength, the ambient light and the fog colour from a single clock, using real solar geometry: give it the latitude and the day of the year and the sun rises where it would, at the height it would. The demo's controller hands the result to the sky and to every material in the scene each frame, so dusk is lit like dusk.

Six presets come with it in firmament/presets.lua — clear morning, fair weather, broken cloud, overcast, storm and alien dusk — each a table of colours and values to start from: copy one and change any colour, because nothing in them is painted.

 

🌦️  The weather dial — one value, clear to storm

One value, 0 to 1. It moves coverage, density, absorption, cloud-top height and edge erosion together, because those five move together in the real sky — asking you to keep them consistent by hand would be asking you to do the shader's job.

Erosion is tied to it deliberately: billowed, cauliflower edges belong to fair-weather cumulus. A storm deck is one solid sheet, and applying cumulus erosion to it punches holes that show blue sky through an overcast.

 

🌾  Grass that answers the same dial — a field that follows the camera

The grass is a field of wind-animated blades that wraps around the camera, so walking never reaches its edge. Its wind comes off the same weather value as the clouds — turn the dial toward a storm and the cloud thickens, the sun dims and the field starts to move, because in the real world those are not three separate settings.

The blades stand on Firmament's own ground, flat or hilly, and fade out with distance. The demo's Grass amount thins the field or fills it.

 

⛰️  Rolling hills — and the ground under them

firmament/terrain.lua holds the height field, and the ground's vertex shader draws the same one, so whatever you place with height_at and normal_at sits on the ground the player sees. Pick Flat, Rolling or Hilly, or set the height, scale and roughness yourself. A flatten pad seats the stone circle on level ground under every preset, and there is room for four.

The ground is a 900 m square: one flat mesh that the shader lifts into hills, with no collision of its own.

 

🌿  Moss that grows while the game runs — on the stone circle

The stones of the circle carry moss that grows while the game runs, where moss would grow: on tops and ledges where rain collects, and on the side of a stone the sun seldom reaches. Sunny faces stay bare. Nothing is painted and there is nothing to author — no textures, no UVs. One growth value takes the circle from bare stone to a green ruin, and the demo's Bare, Grow and Ruin buttons run it.

The moss soaks through to a deep green under rain cloud and dries out slowly after, and the latitude buttons move its shaded side from one hemisphere to the other. It is drawn flat on the stone, by the stone's own material, so it costs no extra objects.

 

🗿  The stone circle and the landscape kit — 63 stones and 20 models

The monument in the demo comes with the pack, under the same licence as everything else. 63 stones, about 75k triangles, no textures: the weathering is baked into vertex colours, drawn by the vertex-colour material that comes with it, so damp dark bases, rain-pale tops and lichen patches cost nothing to ship. It follows the real plan and the real ruin — a surviving run of lintels, two broken trilithons, fallen stones, an altar stone and a heel stone.

The landscape kit is 20 boulders, outcrops, walls and dead timber in the same stone, as glTF; the demo scatters most of them round the circle.

 

🎨  Its own render script — a cloud pass, and not one texture
  • The clouds are marched in a pass of their own, at half the window's resolution and never more than 150,000 pixels, into a half-float target that the sky reads back, so the atmosphere, the sun, the moon and the stars stay sharp. Clouds are soft, so it looks the same.
  • Distance and height fog in the colour the rig gives it, and an ACES filmic tonemap, are part of the materials.
  • The sky, the ground, the grass and the models each have a render tag, so the draw order can be merged into a render script of your own.

Everything is procedural — the cloud shapes, the atmosphere, the stars, the moon. That is why there is nothing to import, and why you can change any colour without repainting anything.

 

⚠️  What it is not — the edges
  • The weather dial is the sky's: cloud, light and wind. There is no rain or snow.
  • No shadows. The sun and the sky light every model, but nothing casts a shadow.
  • The moss lies flat on the stone, and the demo grows it on the stone circle.
  • The ground is a 900 m square, not endless, and it has no collision. The grass grows on it, not on ground of your own.
  • The torches and fireflies are part of the demo collection. They are there to show the night, and you are free to keep them.
  • It is tested in the HTML5 build, in Chrome. Other Defold targets have not been run.

 

📥  What you download, and the licence — one zip

The download

Defold project — demo collection + firmament/ libraryThe whole Defold project: the firmament/ folder to copy into yours, the render script, the demo collection with its panel, and the models

The licence

Use it in commercial and non-commercial projects, unlimited titles, no revenue cap. Modify it freely. Attribution appreciated, not required. You may not resell or redistribute the asset itself.

Full terms are in firmament/LICENSE.txt.

Download

Download NowName your own price

Click download now to get access to the following files:

Defold project — demo collection + firmament/ library 13 MB
Version 3.4.4

Leave a comment

Log in with itch.io to leave a comment.