A1: Style guide, palette and the woodcut print pass
docs/STYLE.md sets Tidewall's look: a drowned coast printed by hand. It has the palette, shape language, character proportions, shading, UI motifs, audio palette and a do-not-do list. - Palette (src/client/style/palette.gd) is the one table of client colours. Every colour that was scattered over the views now names its entry, with values unchanged. test_palette fails on a colour literal anywhere else in src/client or src/app, and on a palette colour the guide doesn't list. - Look sets up the sky, the salt-faded grading (saturation 0.86, contrast 1.05), the sun and the print pass, for the match view and the capture scenes. - folk_print.gdshader is one full-screen quad multiplied over the frame. It draws ink lines at depth jumps and creases (fading with distance, scaled with screen height), diagonal hatching cut into real shadow, and faint paper grain. Ground under the sea gets none. - make style-captures renders a hamlet and a dock with and without the pass. Closes #41 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,7 +87,7 @@ func _ready() -> void:
|
||||
_status = Label.new()
|
||||
_status.position = Vector2(24.0, 20.0)
|
||||
_status.add_theme_font_size_override("font_size", 22)
|
||||
_status.add_theme_color_override("font_outline_color", Color(0.08, 0.08, 0.08))
|
||||
_status.add_theme_color_override("font_outline_color", Palette.OUTLINE)
|
||||
_status.add_theme_constant_override("outline_size", 6)
|
||||
add_child(_status)
|
||||
if DisplayServer.get_name() != "headless" and not input.autoplay:
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
class_name BuildGhost
|
||||
extends Node3D
|
||||
|
||||
const VALID_COLOUR: Color = Color(0.46, 0.80, 0.70, 0.38)
|
||||
const INVALID_COLOUR: Color = Color(0.86, 0.32, 0.22, 0.38)
|
||||
const VALID_COLOUR: Color = Palette.GHOST_OK
|
||||
const INVALID_COLOUR: Color = Palette.GHOST_REFUSED
|
||||
|
||||
## Whether the last update showed a placement the server would accept.
|
||||
var valid: bool = false
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
## Builds meshes for structure pieces from their collision boxes, so what players see is
|
||||
## what blocks them. Faces are split into planks, stone courses or iron panels, each
|
||||
## with its own slight tint, in the weathered palette from docs/ORIGINALITY.md. This is
|
||||
## with its own slight tint, in the weathered palette from docs/STYLE.md. This is
|
||||
## a blockout look; the v0.6 art pass replaces it.
|
||||
class_name PieceMesher
|
||||
extends RefCounted
|
||||
|
||||
## Base colour per material code, in sRGB.
|
||||
const COLOURS: Array[Color] = [Color(0.62, 0.50, 0.36), Color(0.60, 0.59, 0.55), Color(0.50, 0.34, 0.26)]
|
||||
const COLOURS: Array[Color] = [Palette.DRIFTWOOD, Palette.DRESSED_STONE, Palette.SALVAGE_IRON]
|
||||
## Size of a plank, course or panel, in metres, per material code.
|
||||
const STRIP: Array[float] = [0.5, 0.5, 1.0]
|
||||
## Gap between strips, shown as a darker seam.
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
## Draws what moves in a match: players, the sky barge while it crosses, items lying
|
||||
## in the world and sea chests. `sync()` matches everything to the simulation as it is
|
||||
## now. These are stand-in shapes built in code, in the weathered seafaring palette of
|
||||
## docs/ORIGINALITY.md: an oilskin coat, a sou'wester and a canvas wing-sail. The art
|
||||
## docs/STYLE.md: an oilskin coat, a sou'wester and a canvas wing-sail. The art
|
||||
## pass replaces them. Nothing here is ever used for collision.
|
||||
class_name EntityView
|
||||
extends Node3D
|
||||
|
||||
## Oilskin colours. A player's is picked by entity ID; the local player wears the first.
|
||||
const OILSKINS: Array[Color] = [
|
||||
Color(0.86, 0.66, 0.16), Color(0.56, 0.27, 0.20), Color(0.33, 0.55, 0.56), Color(0.36, 0.40, 0.30),
|
||||
Color(0.48, 0.46, 0.44), Color(0.30, 0.36, 0.48), Color(0.62, 0.44, 0.28),
|
||||
Palette.OILSKIN, Palette.OCHRE_RED, Palette.SEA_PAINT, Palette.OILSKIN_MOSS,
|
||||
Palette.OILSKIN_SLATE, Palette.OILSKIN_NAVY, Palette.TANNED_SAIL,
|
||||
]
|
||||
const SKIN: Color = Color(0.74, 0.58, 0.46)
|
||||
const CANVAS: Color = Color(0.84, 0.80, 0.68)
|
||||
const TAR: Color = Color(0.19, 0.16, 0.13)
|
||||
const PLANK: Color = Color(0.50, 0.45, 0.37)
|
||||
const CHEST_SHUT: Color = Color(0.33, 0.55, 0.56)
|
||||
const CHEST_OPEN: Color = Color(0.22, 0.20, 0.18)
|
||||
const ITEM: Color = Color(0.93, 0.80, 0.42)
|
||||
const SKIN: Color = Palette.SKIN
|
||||
const CANVAS: Color = Palette.CANVAS
|
||||
const TAR: Color = Palette.TAR
|
||||
const PLANK: Color = Palette.PLANK
|
||||
const CHEST_SHUT: Color = Palette.SEA_PAINT
|
||||
const CHEST_OPEN: Color = Palette.HOLD_SHADOW
|
||||
const ITEM: Color = Palette.GILT
|
||||
## How far apart passengers stand on the barge's deck, in metres. The simulation
|
||||
## carries them all at one point; this only spreads them out to be seen.
|
||||
const DECK_SPACING: float = 1.3
|
||||
|
||||
@@ -17,37 +17,17 @@ var structures: StructureView
|
||||
var entities: EntityView
|
||||
var camera: Camera3D
|
||||
var rig: CameraRig = CameraRig.new()
|
||||
## The woodcut print pass over the camera (Look.add_print_pass).
|
||||
var print_pass: MeshInstance3D
|
||||
|
||||
|
||||
## Builds the scene for `simulation`. `local_id` is the player this client plays, or 0.
|
||||
func setup(simulation: Simulation, local_id: int = 0) -> void:
|
||||
sim = simulation
|
||||
var sky_material: ProceduralSkyMaterial = ProceduralSkyMaterial.new()
|
||||
sky_material.sky_top_color = Color(0.32, 0.5, 0.68)
|
||||
sky_material.sky_horizon_color = Color(0.82, 0.78, 0.68)
|
||||
sky_material.ground_bottom_color = Color(0.18, 0.2, 0.2)
|
||||
sky_material.ground_horizon_color = Color(0.82, 0.78, 0.68)
|
||||
var sky: Sky = Sky.new()
|
||||
sky.sky_material = sky_material
|
||||
var environment: Environment = Environment.new()
|
||||
environment.background_mode = Environment.BG_SKY
|
||||
environment.sky = sky
|
||||
environment.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
|
||||
environment.ambient_light_energy = 0.45
|
||||
environment.tonemap_mode = Environment.TONE_MAPPER_FILMIC
|
||||
environment.fog_enabled = true
|
||||
environment.fog_light_color = Color(0.78, 0.78, 0.74)
|
||||
environment.fog_density = 0.0005
|
||||
environment.fog_aerial_perspective = 0.4
|
||||
var world: WorldEnvironment = WorldEnvironment.new()
|
||||
world.environment = environment
|
||||
world.environment = Look.environment()
|
||||
add_child(world)
|
||||
var sun: DirectionalLight3D = DirectionalLight3D.new()
|
||||
sun.rotation_degrees = Vector3(-35.0, -130.0, 0.0)
|
||||
sun.light_energy = 0.95
|
||||
sun.shadow_enabled = true
|
||||
sun.directional_shadow_max_distance = 400.0
|
||||
add_child(sun)
|
||||
add_child(Look.sun())
|
||||
|
||||
camera = Camera3D.new()
|
||||
camera.near = CameraRig.NEAR
|
||||
@@ -55,6 +35,7 @@ func setup(simulation: Simulation, local_id: int = 0) -> void:
|
||||
camera.fov = CameraRig.FOV
|
||||
add_child(camera)
|
||||
camera.make_current()
|
||||
print_pass = Look.add_print_pass(camera)
|
||||
|
||||
if sim.island != null:
|
||||
terrain = TerrainView.new()
|
||||
@@ -81,6 +62,7 @@ func setup(simulation: Simulation, local_id: int = 0) -> void:
|
||||
## Matches everything drawn to the simulation as it is now.
|
||||
func sync() -> void:
|
||||
water.follow(sim)
|
||||
Look.set_sea_level(print_pass, water.level)
|
||||
props.sync()
|
||||
structures.sync()
|
||||
entities.sync()
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
## Draws an island's points of interest from their parts: one MultiMesh of boxes per
|
||||
## look, so the whole set costs a handful of draw calls. Colours follow the weathered
|
||||
## seafaring palette in docs/ORIGINALITY.md: tarred wood, grey planks, stone, faded red
|
||||
## seafaring palette in docs/STYLE.md: tarred wood, grey planks, stone, faded red
|
||||
## roofs, salt-faded paint and white salt. No textures; the art pass replaces these.
|
||||
class_name PoiView
|
||||
extends Node3D
|
||||
|
||||
const LOOKS: Dictionary = {
|
||||
Poi.LOOK_TARRED_WOOD: {"colour": Color(0.19, 0.16, 0.13), "roughness": 0.7},
|
||||
Poi.LOOK_PLANK: {"colour": Color(0.50, 0.45, 0.37), "roughness": 0.9},
|
||||
Poi.LOOK_STONE: {"colour": Color(0.56, 0.54, 0.49), "roughness": 0.95},
|
||||
Poi.LOOK_ROOF: {"colour": Color(0.56, 0.27, 0.20), "roughness": 0.85},
|
||||
Poi.LOOK_PAINT: {"colour": Color(0.33, 0.55, 0.56), "roughness": 0.8},
|
||||
Poi.LOOK_SALT: {"colour": Color(0.90, 0.90, 0.86), "roughness": 0.6},
|
||||
Poi.LOOK_LAMP: {"colour": Color(0.98, 0.86, 0.55), "roughness": 0.3, "glow": 1.6},
|
||||
Poi.LOOK_TARRED_WOOD: {"colour": Palette.TAR, "roughness": 0.7},
|
||||
Poi.LOOK_PLANK: {"colour": Palette.PLANK, "roughness": 0.9},
|
||||
Poi.LOOK_STONE: {"colour": Palette.STONE, "roughness": 0.95},
|
||||
Poi.LOOK_ROOF: {"colour": Palette.OCHRE_RED, "roughness": 0.85},
|
||||
Poi.LOOK_PAINT: {"colour": Palette.SEA_PAINT, "roughness": 0.8},
|
||||
Poi.LOOK_SALT: {"colour": Palette.SALT, "roughness": 0.6},
|
||||
Poi.LOOK_LAMP: {"colour": Palette.LAMP, "roughness": 0.3, "glow": 1.6},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ const FADE: float = 30.0
|
||||
## How far an instance's colour may stray from white, per channel.
|
||||
const TINT: float = 0.12
|
||||
|
||||
const BARK: Color = Color(0.40, 0.30, 0.22)
|
||||
const NEEDLES: Array[Color] = [Color(0.22, 0.36, 0.28), Color(0.26, 0.40, 0.30), Color(0.31, 0.44, 0.32)]
|
||||
const SCRUB: Array[Color] = [Color(0.45, 0.48, 0.30), Color(0.53, 0.53, 0.34)]
|
||||
const STONE: Color = Color(0.56, 0.55, 0.51)
|
||||
const LICHEN: Color = Color(0.62, 0.61, 0.45)
|
||||
const TAR: Color = Color(0.31, 0.26, 0.22)
|
||||
const PLANK: Color = Color(0.64, 0.60, 0.52)
|
||||
const CRATE: Color = Color(0.68, 0.55, 0.38)
|
||||
const BARK: Color = Palette.BARK
|
||||
const NEEDLES: Array[Color] = Palette.NEEDLES
|
||||
const SCRUB: Array[Color] = Palette.SCRUB
|
||||
const STONE: Color = Palette.BOULDER
|
||||
const LICHEN: Color = Palette.LICHEN
|
||||
const TAR: Color = Palette.TAR_WEATHERED
|
||||
const PLANK: Color = Palette.PLANK_BLEACHED
|
||||
const CRATE: Color = Palette.CRATE_WOOD
|
||||
|
||||
## Props drawn and props hidden since setup.
|
||||
var drawn: int = 0
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
// Tidewall's woodcut print pass (docs/STYLE.md, "Shading"). One full-screen quad, drawn
|
||||
// last and multiplied over the frame, adds what a hand-cut print has and a render
|
||||
// doesn't:
|
||||
// - ink lines where depth jumps (silhouettes) or bends (creases), thick near the
|
||||
// camera and fading with distance so far hills stay quiet;
|
||||
// - diagonal hatching cut into shadow, its lines thickening as the shadow deepens;
|
||||
// - a faint grain of unbleached paper.
|
||||
// It only darkens (blend_mul), so lit colours stay the palette's own. Colour grading
|
||||
// (salt-faded saturation, contrast) is done by the Environment in Look. Ground under
|
||||
// the sea gets no ink or hatching, because the water is drawn over it. No textures:
|
||||
// every pattern is generated here.
|
||||
shader_type spatial;
|
||||
render_mode unshaded, blend_mul, depth_test_disabled, depth_draw_never, cull_disabled, fog_disabled, shadows_disabled;
|
||||
|
||||
uniform sampler2D depth_texture : hint_depth_texture, filter_nearest;
|
||||
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
|
||||
uniform vec3 ink_colour : source_color = vec3(0.16, 0.13, 0.11);
|
||||
// 0 turns the pass off without removing it.
|
||||
uniform float strength : hint_range(0.0, 1.0) = 1.0;
|
||||
// Line weight, in pixels at 720 lines of screen; scales with the screen's height.
|
||||
uniform float line_pixels = 1.0;
|
||||
// Relative depth jump that counts as a silhouette, and depth bend that counts as a crease.
|
||||
uniform float silhouette_threshold = 0.035;
|
||||
uniform float crease_threshold = 0.010;
|
||||
// Lines are full strength out to ink_near metres and fade to ink_far_strength by ink_far.
|
||||
uniform float ink_near = 35.0;
|
||||
uniform float ink_far = 260.0;
|
||||
uniform float ink_far_strength = 0.2;
|
||||
// Hatching: spacing in pixels at 720 lines, and the scene luminance (linear, before
|
||||
// tone mapping) below which it begins: only real shadow, never lit ground.
|
||||
uniform float hatch_spacing = 5.0;
|
||||
uniform float hatch_start = 0.055;
|
||||
uniform float hatch_depth = 0.28;
|
||||
uniform float grain = 0.035;
|
||||
// The sea's height: ground below it gets no ink.
|
||||
uniform float sea_level = -1000.0;
|
||||
uniform float camera_far = 2500.0;
|
||||
|
||||
float hash(vec2 p) {
|
||||
p = fract(p * vec2(123.34, 456.21));
|
||||
p += dot(p, p + 45.32);
|
||||
return fract(p.x * p.y);
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
POSITION = vec4(VERTEX.xy, 1.0, 1.0);
|
||||
}
|
||||
|
||||
vec3 view_position(vec2 uv, mat4 inv_projection) {
|
||||
float depth = textureLod(depth_texture, uv, 0.0).r;
|
||||
#if CURRENT_RENDERER == RENDERER_COMPATIBILITY
|
||||
vec4 ndc = vec4(uv * 2.0 - 1.0, depth * 2.0 - 1.0, 1.0);
|
||||
#else
|
||||
vec4 ndc = vec4(uv * 2.0 - 1.0, depth, 1.0);
|
||||
#endif
|
||||
vec4 view = inv_projection * ndc;
|
||||
return view.xyz / view.w;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = SCREEN_UV;
|
||||
float scale = VIEWPORT_SIZE.y / 720.0;
|
||||
vec2 step_uv = line_pixels * scale / VIEWPORT_SIZE;
|
||||
|
||||
vec3 centre = view_position(uv, INV_PROJECTION_MATRIX);
|
||||
float d = -centre.z;
|
||||
float d_l = -view_position(uv - vec2(step_uv.x, 0.0), INV_PROJECTION_MATRIX).z;
|
||||
float d_r = -view_position(uv + vec2(step_uv.x, 0.0), INV_PROJECTION_MATRIX).z;
|
||||
float d_u = -view_position(uv - vec2(0.0, step_uv.y), INV_PROJECTION_MATRIX).z;
|
||||
float d_d = -view_position(uv + vec2(0.0, step_uv.y), INV_PROJECTION_MATRIX).z;
|
||||
|
||||
bool sky = d > camera_far * 0.9;
|
||||
vec3 world = (INV_VIEW_MATRIX * vec4(centre, 1.0)).xyz;
|
||||
bool under_sea = world.y < sea_level - 0.15;
|
||||
|
||||
// Silhouettes: the nearer side of a depth jump gets the line, so outlines hug objects.
|
||||
float near_d = min(d, min(min(d_l, d_r), min(d_u, d_d)));
|
||||
float jump = max(max(abs(d_l - d), abs(d_r - d)), max(abs(d_u - d), abs(d_d - d))) / max(near_d, 0.001);
|
||||
float silhouette = smoothstep(silhouette_threshold, silhouette_threshold * 2.0, jump);
|
||||
// Creases: depth bending (second difference) on one surface.
|
||||
float bend = (abs(d_l + d_r - 2.0 * d) + abs(d_u + d_d - 2.0 * d)) / max(d, 0.001);
|
||||
float crease = smoothstep(crease_threshold, crease_threshold * 2.5, bend) * 0.7;
|
||||
float distance_fade = mix(1.0, ink_far_strength, smoothstep(ink_near, ink_far, near_d));
|
||||
float ink = max(silhouette, crease) * distance_fade;
|
||||
if (sky && near_d > camera_far * 0.9) {
|
||||
ink = 0.0;
|
||||
}
|
||||
// Samples past the screen's edge clamp to it and read as a depth jump: no frame.
|
||||
vec2 pixel = FRAGCOORD.xy;
|
||||
if (pixel.x < 2.0 * scale || pixel.y < 2.0 * scale || pixel.x > VIEWPORT_SIZE.x - 2.0 * scale || pixel.y > VIEWPORT_SIZE.y - 2.0 * scale) {
|
||||
ink = 0.0;
|
||||
}
|
||||
|
||||
// Hatching in shadow: diagonal lines in screen space whose width grows with darkness.
|
||||
float hatch = 0.0;
|
||||
if (!sky && !under_sea) {
|
||||
vec3 scene = textureLod(screen_texture, uv, 0.0).rgb;
|
||||
float luminance = dot(scene, vec3(0.2126, 0.7152, 0.0722));
|
||||
float shade = smoothstep(hatch_start, hatch_start * 0.25, luminance);
|
||||
float spacing = hatch_spacing * scale;
|
||||
float stripe = fract((FRAGCOORD.x + FRAGCOORD.y) / spacing);
|
||||
float width = shade * 0.55;
|
||||
float aa = 1.2 / spacing;
|
||||
hatch = shade > 0.0 ? (1.0 - smoothstep(width - aa, width + aa, abs(stripe - 0.5) * 2.0)) * hatch_depth * distance_fade : 0.0;
|
||||
} else if (under_sea) {
|
||||
ink = 0.0;
|
||||
}
|
||||
|
||||
float paper = 1.0 - grain * hash(floor(FRAGCOORD.xy / max(scale, 1.0)));
|
||||
vec3 multiplier = mix(vec3(1.0), ink_colour, clamp(ink, 0.0, 1.0));
|
||||
multiplier *= 1.0 - hatch;
|
||||
multiplier *= paper;
|
||||
ALBEDO = mix(vec3(1.0), multiplier, strength);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://ceub1y4rrplht
|
||||
@@ -0,0 +1,80 @@
|
||||
## The shared set-up of Tidewall's look (docs/STYLE.md): the salt-hazed sky, the
|
||||
## environment's colour grading, the low coastal sun and the woodcut print pass. The
|
||||
## match view and the capture scenes all use it, so they show the same picture.
|
||||
class_name Look
|
||||
extends RefCounted
|
||||
|
||||
const PRINT_SHADER: Shader = preload("res://src/client/style/folk_print.gdshader")
|
||||
|
||||
## Salt-faded grading: colours a little greyer and a little warmer than they render.
|
||||
const SATURATION: float = 0.86
|
||||
const CONTRAST: float = 1.05
|
||||
const BRIGHTNESS: float = 1.02
|
||||
|
||||
|
||||
## The sky, ambient light, fog and grading. `graded` false leaves colours as rendered,
|
||||
## for captures that compare against the old look.
|
||||
static func environment(graded: bool = true) -> Environment:
|
||||
var sky_material: ProceduralSkyMaterial = ProceduralSkyMaterial.new()
|
||||
sky_material.sky_top_color = Palette.SKY_TOP
|
||||
sky_material.sky_horizon_color = Palette.SKY_HAZE
|
||||
sky_material.ground_bottom_color = Palette.SKY_BELOW
|
||||
sky_material.ground_horizon_color = Palette.SKY_HAZE
|
||||
var sky: Sky = Sky.new()
|
||||
sky.sky_material = sky_material
|
||||
var environment: Environment = Environment.new()
|
||||
environment.background_mode = Environment.BG_SKY
|
||||
environment.sky = sky
|
||||
environment.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
|
||||
environment.ambient_light_energy = 0.45
|
||||
environment.tonemap_mode = Environment.TONE_MAPPER_FILMIC
|
||||
environment.fog_enabled = true
|
||||
environment.fog_light_color = Palette.SEA_FOG
|
||||
environment.fog_density = 0.0005
|
||||
environment.fog_aerial_perspective = 0.4
|
||||
if graded:
|
||||
environment.adjustment_enabled = true
|
||||
environment.adjustment_saturation = SATURATION
|
||||
environment.adjustment_contrast = CONTRAST
|
||||
environment.adjustment_brightness = BRIGHTNESS
|
||||
return environment
|
||||
|
||||
|
||||
## The low afternoon sun from the sea side.
|
||||
static func sun(shadow_distance: float = 400.0) -> DirectionalLight3D:
|
||||
var light: DirectionalLight3D = DirectionalLight3D.new()
|
||||
light.rotation_degrees = Vector3(-35.0, -130.0, 0.0)
|
||||
light.light_energy = 0.95
|
||||
light.shadow_enabled = true
|
||||
light.directional_shadow_max_distance = shadow_distance
|
||||
return light
|
||||
|
||||
|
||||
## Adds the woodcut print pass to `camera`, as a full-screen quad drawn after
|
||||
## everything else. Returns the quad, whose material takes `sea_level` (see
|
||||
## set_sea_level) and `strength`.
|
||||
static func add_print_pass(camera: Camera3D) -> MeshInstance3D:
|
||||
var quad: QuadMesh = QuadMesh.new()
|
||||
quad.size = Vector2(2.0, 2.0)
|
||||
var material: ShaderMaterial = ShaderMaterial.new()
|
||||
material.shader = PRINT_SHADER
|
||||
material.render_priority = Material.RENDER_PRIORITY_MAX
|
||||
material.set_shader_parameter("ink_colour", Palette.INK)
|
||||
material.set_shader_parameter("camera_far", camera.far)
|
||||
quad.material = material
|
||||
var pass_node: MeshInstance3D = MeshInstance3D.new()
|
||||
pass_node.name = "PrintPass"
|
||||
pass_node.mesh = quad
|
||||
pass_node.cast_shadow = GeometryInstance3D.SHADOW_CASTING_SETTING_OFF
|
||||
# Never culled: the vertex shader puts it over the whole screen wherever it is.
|
||||
pass_node.extra_cull_margin = 16384.0
|
||||
pass_node.custom_aabb = AABB(Vector3(-1.0e5, -1.0e5, -1.0e5), Vector3(2.0e5, 2.0e5, 2.0e5))
|
||||
camera.add_child(pass_node)
|
||||
return pass_node
|
||||
|
||||
|
||||
## Tells the print pass where the sea is, so ground under it gets no ink.
|
||||
static func set_sea_level(pass_node: MeshInstance3D, level: float) -> void:
|
||||
if pass_node == null:
|
||||
return
|
||||
((pass_node.mesh as QuadMesh).material as ShaderMaterial).set_shader_parameter("sea_level", level)
|
||||
@@ -0,0 +1 @@
|
||||
uid://bolk1wkcixhy1
|
||||
@@ -0,0 +1,95 @@
|
||||
## Tidewall's one table of colours: the drowned-coast palette from docs/STYLE.md.
|
||||
## Every colour the client draws with comes from here, so the look stays one look; a
|
||||
## test (test_palette.gd) fails on a colour literal anywhere else in src/client or
|
||||
## src/app. All values are sRGB. Add a colour here, named for what it is in the world,
|
||||
## before using it, and add it to the table in docs/STYLE.md.
|
||||
class_name Palette
|
||||
extends RefCounted
|
||||
|
||||
# --- Wood, rope and tar -------------------------------------------------------------
|
||||
## Fresh pine tar on hulls, piles and sheds. The darkest thing in the world.
|
||||
const TAR: Color = Color(0.19, 0.16, 0.13)
|
||||
## Tar that has weathered grey-brown: wrecks and old piles.
|
||||
const TAR_WEATHERED: Color = Color(0.31, 0.26, 0.22)
|
||||
## Grey planking on walls and decks.
|
||||
const PLANK: Color = Color(0.50, 0.45, 0.37)
|
||||
## Planks bleached pale by salt and sun: wreck ribs, jetties.
|
||||
const PLANK_BLEACHED: Color = Color(0.64, 0.60, 0.52)
|
||||
## Driftwood, the first build material.
|
||||
const DRIFTWOOD: Color = Color(0.62, 0.50, 0.36)
|
||||
## Crates and chests' unpainted wood.
|
||||
const CRATE_WOOD: Color = Color(0.68, 0.55, 0.38)
|
||||
## Pine bark.
|
||||
const BARK: Color = Color(0.40, 0.30, 0.22)
|
||||
## The dark inside of an emptied chest or hold.
|
||||
const HOLD_SHADOW: Color = Color(0.22, 0.20, 0.18)
|
||||
## Hemp rope and sailcloth, unbleached.
|
||||
const CANVAS: Color = Color(0.84, 0.80, 0.68)
|
||||
## Sails tanned with bark, as working boats had them.
|
||||
const TANNED_SAIL: Color = Color(0.62, 0.44, 0.28)
|
||||
|
||||
# --- Stone, iron and salt -----------------------------------------------------------
|
||||
## Field stone in walls and quays.
|
||||
const STONE: Color = Color(0.56, 0.54, 0.49)
|
||||
## Loose boulders, a touch cooler than walls.
|
||||
const BOULDER: Color = Color(0.56, 0.55, 0.51)
|
||||
## Dressed stone, the second build material.
|
||||
const DRESSED_STONE: Color = Color(0.60, 0.59, 0.55)
|
||||
## Yellow-grey lichen on high rock.
|
||||
const LICHEN: Color = Color(0.62, 0.61, 0.45)
|
||||
## Rusted salvage iron, the third build material.
|
||||
const SALVAGE_IRON: Color = Color(0.50, 0.34, 0.26)
|
||||
## Salt pans and whitewash.
|
||||
const SALT: Color = Color(0.90, 0.90, 0.86)
|
||||
|
||||
# --- Salt-faded paint ---------------------------------------------------------------
|
||||
## Red ochre roofs and doors, faded.
|
||||
const OCHRE_RED: Color = Color(0.56, 0.27, 0.20)
|
||||
## Verdigris sea-green paint on trim, shutters and sea chests.
|
||||
const SEA_PAINT: Color = Color(0.33, 0.55, 0.56)
|
||||
## Oilskin yellow: the local player's coat, and the one warm accent of the HUD.
|
||||
const OILSKIN: Color = Color(0.86, 0.66, 0.16)
|
||||
## Moss-green oilskin.
|
||||
const OILSKIN_MOSS: Color = Color(0.36, 0.40, 0.30)
|
||||
## Slate-grey oilskin.
|
||||
const OILSKIN_SLATE: Color = Color(0.48, 0.46, 0.44)
|
||||
## Faded navy oilskin.
|
||||
const OILSKIN_NAVY: Color = Color(0.30, 0.36, 0.48)
|
||||
## Gilt on carved figureheads, loot glints and the lamp's brass.
|
||||
const GILT: Color = Color(0.93, 0.80, 0.42)
|
||||
## Lamp glass, lit.
|
||||
const LAMP: Color = Color(0.98, 0.86, 0.55)
|
||||
## Weathered skin.
|
||||
const SKIN: Color = Color(0.74, 0.58, 0.46)
|
||||
|
||||
# --- Growing things -----------------------------------------------------------------
|
||||
const NEEDLES: Array[Color] = [Color(0.22, 0.36, 0.28), Color(0.26, 0.40, 0.30), Color(0.31, 0.44, 0.32)]
|
||||
const SCRUB: Array[Color] = [Color(0.45, 0.48, 0.30), Color(0.53, 0.53, 0.34)]
|
||||
|
||||
# --- Sky and air --------------------------------------------------------------------
|
||||
const SKY_TOP: Color = Color(0.32, 0.50, 0.68)
|
||||
## The pale, salt-hazed horizon.
|
||||
const SKY_HAZE: Color = Color(0.82, 0.78, 0.68)
|
||||
const SKY_BELOW: Color = Color(0.18, 0.20, 0.20)
|
||||
const SEA_FOG: Color = Color(0.78, 0.78, 0.74)
|
||||
|
||||
# --- Print and paper (the woodcut pass and the HUD) ---------------------------------
|
||||
## Printer's ink: outlines and hatching, warm, never pure black.
|
||||
const INK: Color = Color(0.16, 0.13, 0.11)
|
||||
## Unbleached paper: HUD panels and text on dark ground.
|
||||
const PAPER: Color = Color(0.91, 0.87, 0.78)
|
||||
## Paper in shadow, for panel edges and dimmed text.
|
||||
const PAPER_DIM: Color = Color(0.66, 0.62, 0.54)
|
||||
## Dark text outline on the HUD.
|
||||
const OUTLINE: Color = Color(0.08, 0.08, 0.08)
|
||||
|
||||
# --- Signals ------------------------------------------------------------------------
|
||||
## "Allowed" in the build ghost: sea green.
|
||||
const GHOST_OK: Color = Color(0.46, 0.80, 0.70, 0.38)
|
||||
## "Refused" in the build ghost: rust red.
|
||||
const GHOST_REFUSED: Color = Color(0.86, 0.32, 0.22, 0.38)
|
||||
## Danger on the HUD: the tide's next line, low health. Paired with a shape or a word,
|
||||
## never alone.
|
||||
const WARNING: Color = Color(0.86, 0.32, 0.22)
|
||||
## The sea on the HUD's tide gauge and map.
|
||||
const SEA_INK: Color = Color(0.20, 0.34, 0.42)
|
||||
@@ -0,0 +1 @@
|
||||
uid://byqxsw564h4c2
|
||||
Reference in New Issue
Block a user