NatureGL Islandv1.1.0

Playing

Time and weather

NatureGL Sky runs the day, NatureGL Water and NatureGL Sky presets set the look of the sea and sky, and NatureGL Weather adds rain. All of it is in the Time of day and Sky & sea panels.

From the pier-sunset scenario with the clock at 0.3 in-game hours per second: the sun goes down over the sea, the pier lamps come on and the stars come out.

#The clock

The game starts with the clock paused. Press T to run or pause it, or use the Time of day panel:

ControlEffect
Time sliderJump to any time, 0–24 h
Clock runningSame as T
Day length10 s, 1 min, 10 min (default), 30 min or 1 h for a full day
PresetsDawn 06:12, Morning 09:00, Noon 12:30, Afternoon 15:30, Sunset 17:57, Night 21:30

The slider snaps the sky to the new time. The preset buttons ease into it.

The sun is placed so that it sets over the sea south-west of the pier: at start-up IslandGame calls sky.setSunAngles(1.5, 205) and keeps the resulting northOffset for every later time change.

#Nights

NatureGL Sky's auto exposure would render a moonlit night almost as bright as an overcast day. The game caps it when it creates the sky:

src/IslandGame.js
this.sky = await SkySystem.create({
  renderer, scene, camera, quality: q.sky, preset: 'partlyCloudy', autoExposure: true,
  maxExposure: 2.4, nightExposure: 5,
});

NatureGL Water then tone-maps with the sky's capped display exposure, so the sea, the sky and the land agree. At night the game also adds a faint blue hemisphere fill, the stars are 1.8× brighter than the preset, and every lamp over the lagoon throws a pool of light and a reflection streak on the water.

#Sky and sea looks

The Sky & sea panel picks a NatureGL Sky preset and a NatureGL Water preset. The time of day is kept when you change the sky.

Sky (SKY_LOOKS)

KeyLabel
partlyCloudyTrade-wind cumulus (default)
clearClear
marineMarine
toweringTowering cumulus
overcastOvercast
stormSquall

Sea (WATER_LOOKS)

KeyLabel
tropicalTropical (default)
sunsetSunset swell
stormStorm
foggyFoggy calm

Over every sea preset the game applies its lagoon tuning: clearer water, stronger shore breakers and foam. storm adds denser fog and foggy a lot more. The overcast and storm skies also raise the NatureGL Grass wind, so the palms and grass move harder.

The Exposure slider (0.5–1.8) is a bias on top of the metered exposure.

The beach scenario with the Overcast sky and the Foggy calm sea.

#Rain

Tick Rain (naturegl-weather) in the Sky & sea panel. The first time, the game creates a WeatherSystem. Then it:

  • switches the sky to storm and the sea to storm, remembering the previous looks;
  • sets rain 0.85, wind 0.65, fog 0.1, lightning 0.25 and full wetness;
  • wets the terrain and the village (NatureGL Weather's patchMaterial), with the village, trees and boat as rain occluders.

Unticking it restores the previous sky and sea and dries everything off.

Rain mode on the beach: NatureGL Weather's rain and splashes over NatureGL Water's storm sea, under NatureGL Sky's squall sky.

See Composing the libraries for how the rain is layered over the water.