Look panel: lighting, weather, fog and quality
The Look panel (right rail) sets how a map looks and sounds: sky, sun, mist, clouds, weather, lights and the finished picture. It all goes to every player with the map (MapEnvironment). Ground borders and cliffs are on Terrain; water is on Water.
Apply a preset look
- Open Look.
- Pick a Preset at the top (the game's named looks: winter, swamp, dusk).
- It sets sky, light, mist, wind, clouds, weather and water at once, as one undo step. The map's sounds, grounds and cliffs are kept.
The panel also says which preset the map's look is nearest to.
Set the sun and time of day
- Open Look › Light: where the sun is, and its colours by day.
- Open Look › Time of day: the hour the game starts at, and whether the clock stands still.
- The scene shows the light, sky and mist at the hour you pick.
Add mist and fog
- Open Look › Sky and mist.
- Mist by distance: where it starts, where nothing is seen through it, and its colour.
- Ground mist: below what height it lies, where it thins out, its thickness and colour (a valley full of mist).
- Mist in places: press Draw a rectangle or Draw a circle, then drag on the map. Or Over a region… to follow a named region.
- Select an area to set its heights, thickness, colour, soft edge and drift.
Mist areas are things on the map: listed under Mist in the Hierarchy, moved, copied and named like the rest. At low quality only ground mist is drawn.
Add clouds
- Open Look › Cloud layer.
- Set height, cloud size, cover, how much they show, shadow darkness, colour, drift and swing.
- Cover the whole map, or draw patches with Draw a rectangle/circle, or follow a region.
- Tick Volumetric for 3D clouds (high quality) and set Thickness.
Add rain or snow
- Open Look › Weather.
- Pick none, rain, snow or your game's own kind.
- Set how much, its slant (or with the wind), colour, size, speed, splashes, how white it leaves the ground, and a looping sound.
- To have it fall only in places, draw areas as for mist, each with its own amount.
Set the wind
Open Look › Wind: its direction, strength and gusts. Grass sways and leans with it, rain slants, snow and mist drift.
Place a light
- Press I (the bulb on the tool strip).
- Click the map to put a light down. A new one is on at every hour, bright enough for day.
- Select it to set point or spot, colour, brightness, reach, when it is on (at night, always, between two hours), flicker, priority and height.
- Drag it to move it; turn a spot's cone with the handles.
Lights are listed under Lights in the Hierarchy. A doodad whose model the game lights has Its light in the Inspector: put it out, or change its colour.
Light the map at night
- Open Look › Lights: how bright the map's lights are, and when they come up and are fully on.
- Press See it at night to preview.
- Open Look › Glow to set how much bright things glow past their edges, by day and at night.
Finish the picture
- Open Look › Picture.
- Set tone mapping (standard, ACES, neutral), exposure, contrast, colour, tint, a colour grade (a LUT from
textures/), bloom, vignette, sharpening and ambient occlusion. - Tick Its own at night for a night grade, blended in as the lights come up.
Each row shows the game's value where the map sets none; As the game's clears the map's.
Give part of the map its own look
- Open Look › Picture, down to the zones.
- Press Draw a rectangle or Draw a circle and drag on the map, or pick Over a region… to follow a named region.
- In the zone's rows set Blends in over (how far in from its edge its look is all there, in cells), its look with the same rows as the map's picture, and if you like Its own mist and Light leans (a colour the sun and the light from all around lean to).
- Press the eye on its row to see its look, mist and light wherever the camera is. Press it again to see it as the camera looks. The locate button frames the zone.
What a zone leaves out shows the map's value. Zones are things on the map: listed under Picture zones in the Hierarchy, moved, copied and named like mist areas, outlined in amber while the Look panel is open. See Picture zones.
See the game's own passes
A game's own passes over the picture (GameView.world.passes) draw in the editor's view as in the game, once their shaders are ready. They're listed at the foot of Look › Picture with where each goes: untick one to see the picture here without it. The game doesn't change. See Passes of your own.
See units behind trees
- Open Look › See through.
- Set it on, for whose units, faded or a hole cut round each unit, how much is left, how fast it fades, and which kinds (trees, scenery, buildings).
It shows in Play here and in the game; the editor's own view draws everything whole. See See units behind trees.
Set level of detail by distance
- Open Look › Detail: the map's levels, their distances, where nothing is drawn, and shadow levels.
- Press Shift+V (View › Detail levels) to tint what is drawn at which level.
- To pin one doodad to a level, select it and set it in the Inspector.
View › Full detail draws everything as made. See Detail by distance.
Set the game's quality presets
- Open Look › Quality (it is the game's, not the map's).
- Set the most pixels a preset draws, and for each preset its resolution and anti-aliasing (none, FXAA, TAA, MSAA).
- Save: it is written to the game's
quality.json. A player's own settings win over it.
Add sounds and music to the map
- Open Look › Sounds and music.
- Place sounds that keep playing at places of the map with the sound tool, and pick the map's music.
To set how loud and how far each sound plays everywhere in the game, open the Sounds panel (right rail): pick a sound, set Volume, Lowest pitch and Highest pitch, Reach, Cutoff and Bus, and press Play (Space) to hear it. It writes the game's sounds.json. See How each sound is played.
Tune effects, unit plates, floating words and pings
| Panel or fold | What it tunes | Writes | Guide |
|---|---|---|---|
| Effects (right rail) | Any effect on a stage: its parts and knobs, by day or night | fx.json | Effects |
| Unit HUD (right rail) | The plates over units: widgets, when each shows, for whom | hud.json | Indicators |
| Words (right rail) | Floating words: damage, heal, xp, level up, the game's own | floats.json | Float a number |
| Material (right rail) | A unit type's materials: colours, pictures, metal, roughness | looks.json | Materials |
| Look › Pings | The kinds of ping and the ping wheel | pings.json | Indicators |
In each, pick what to tune, change fields while it plays on a stage, and save the map (Ctrl+S). As the code's takes it out of the file. A game played here takes changes at once.
Materials
The Material panel (right rail) sets a unit type's model's materials, written to looks.json as ModelDef.material (Materials).
- Pick the Unit type: the types drawn with a model are listed.
- Pick a material: Every material, or one of the file's by its name, with the meshes drawn with it beside it. set marks one the look says something of.
- Change its Colour, Shines, Highlights, Picture, Shine picture, Normal map (paths in
textures/), Opacity, Metal, Rough or Both sides. As made takes a colour out of the file.
Each change is drawn in the scene at once and is a step of the history (Ctrl+Z). Save the map (Ctrl+S) to write looks.json. All as made takes out everything said of the material.
In code
editor.applyEnvironment('winter')
editor.setGroundMist(change)
editor.setMist(change)
editor.setCloudLayer(change)
editor.setWind(change)
// places of the look, by id: mist, weather, cloud patches, picture zones, lights, decals, waterfalls
editor.doc.look.add('mistAreas', area)
editor.doc.look.add('pictureZones', { shape: { region: 'swamp' }, blend: 12, look: { saturation: 0.7 } })
editor.screen.showZone(id) // its look wherever the camera is; undefined for as the camera looks
editor.screen.drawPass(editor.screen.passes[0], false) // a game's pass off in this view
editor.doc.look.set('weatherAreas', id, change)
editor.doc.look.remove('cloudPatches', ids)
// lights
editor.doc.look.addLight({ x: 32, z: 32 }, options)
editor.doc.look.setLight(id, change)
editor.doc.look.removeLights(ids)
editor.doc.look.setEnvironment({ lamps })
// pings
editor.pingHere(def)Reference
| Fold | Kept in | Notes |
|---|---|---|
| Preset | GameView.world.environments | MapEditor.look.applyEnvironment(look) without a screen |
| Light, Time of day | MapEnvironment | Sky and mist follow the hour where the game says (GameView.world.daylight) |
| Sky and mist | MapFog, MapMist.ground, MapMist.areas | Areas can follow a region (AreaRef) |
| Cloud layer | MapEnvironment.cloudLayer (MapCloudLayer) | Shadows at medium quality and up |
| Wind | MapWind | |
| Weather | MapWeather, MapWeather.areas | Splashes at medium quality and up |
| Lights | MapEnvironment.lights, MapEnvironment.lamps | A model's own: ModelDef.lights; a doodad's: MapDoodad.light |
| Glow | MapEnvironment.glow | A model's own: ModelDef.glow |
| Picture | MapEnvironment.picture | Editor view: EditorPrefs.graphics.picture, occlusion |
| Picture zones | MapEnvironment.pictureZones (MapPictureZone) | Areas can follow a region (AreaRef); passes: GameView.world.passes |
| See through | MapEnvironment.seeThrough | Over GameView.world.seeThrough |
| Detail | MapEnvironment.detail | A doodad's: MapDoodad.detail |
| Quality | The game's quality.json (QUALITY_FILE) | |
| Pings | The game's pings.json (PINGS_FILE) | Kinds the rules allow: pingKinds(registry) |
Every control is a setting (LookSetting, LOOK_SETTINGS): its name, bounds and tooltip in one place, so the search finds it ("ground mist", "bloom", "LUT").
Files the editor writes beside your code are laid over your view in order with layFiles:
import looksFile from '../looks.json'
export const myView: GameView = layFiles({ units: { looks } /* ... */ }, [[LOOKS_FILE, looksFile], [HUD_FILE, hudFile], [FX_FILE, fxFile], [QUALITY_FILE, qualityFile], [FLOATS_FILE, floatsFile], [PINGS_FILE, pingsFile]])The editor lays a file again as its panel writes it (editor.takeFile(def, file)), and a game played here takes it at once (client.takeFile). Your own file is one more: defineViewFile({ name: 'waves.json', read, text, fields: ['waves'], lay, game }). To read the HUD or floats files in code: readHudFile, hudText, plainHud, readFloatsFile, floatsText, plainFloat, readPingsFile, pingsText, plainPing; HudPreview and FloatPreview draw them on a stage in a panel of your own.