diff --git a/docs/BUILD_IN_PUBLIC_PLAN.md b/docs/BUILD_IN_PUBLIC_PLAN.md index 2f17001..a6f6792 100644 --- a/docs/BUILD_IN_PUBLIC_PLAN.md +++ b/docs/BUILD_IN_PUBLIC_PLAN.md @@ -774,17 +774,23 @@ Completed: stable-ID resource anchors in a resource-specific horizontal grid. Exact expanding queries preserve current scoring and selected targets while the reviewed 1,800-source case inspects about 4.4 candidates instead of 1,800. +36. `Jajce River 03`: the deterministic Terrain3D source now carves a raised + waterfall shelf, upper stream, plunge basin, and curved downstream channel. + Shared watercourse profiles keep generated terrain and both water ribbons + aligned; softened foam/mist and a smaller rock frame make the falls part of + the landform. A matched Metal capture records the change, and the rebaked + navigation mesh passes terrain-height and runtime route checks. Next: -1. Sculpt a real Terrain3D river channel and waterfall shelf before adding a - broad foliage asset pass. Use Terrain3D particles for nearby grass and - intentional instancing for tree/fern/rock masses, then rebake and validate - the required village/resource routes. -2. During that first larger foliage pass, prove a bounded authoring workflow - that places intentional stable-ID `ResourceNode` anchors beside decorative - Terrain3D instances. Add livestock only with a real identity and interaction - contract. +1. Prove one bounded foliage/resource authoring workflow at a riverbank or + forest edge. Use decorative Terrain3D/intentional instances for tree, fern, + flower, and rock masses, but create simulation-owned finite resources only + through selected stable-ID `ResourceNode` anchors. +2. Validate that villagers discover both nearby and farther authored anchors, + preserve reachable interaction points, and keep the visual batch inside a + measured presentation budget. Add livestock only with a real identity and + interaction contract. Do not start with GIS data, a full city, a large asset pack, or more NPC mechanics. The next proof is a beautiful stage for the systems that already diff --git a/docs/LEARNING_ROADMAP.md b/docs/LEARNING_ROADMAP.md index fde7efb..d675c32 100644 --- a/docs/LEARNING_ROADMAP.md +++ b/docs/LEARNING_ROADMAP.md @@ -889,15 +889,29 @@ Unload/rebind state authority, stable tie order, moved anchors, reservations, player parity, and a deliberately far high-priority winner remain covered. See [Loaded Resource Discovery 01](benchmarks/LOADED_RESOURCE_DISCOVERY_01.md). -The immediate next slice should pair this systems foundation with the authored -world: sculpt the real Terrain3D river channel and waterfall shelf, rebake and -validate navigation, then use the first larger foliage/resource pass to prove a -bounded stable-ID anchor placement workflow alongside decorative Terrain3D -instancing. Do not generalize the resource grid to people/buildings/events or +The authored-watercourse slice is complete. `JajceWatercourse` now gives the +deterministic terrain generator and both water ribbons one shared profile; the +generated Terrain3D data contains an upper stream, raised waterfall shelf, +plunge basin, and curved downstream channel. A matched Metal capture records +the result, and the Terrain3D-derived navigation mesh was rebaked and validated +against required village/resource routes. + +The immediate next slice should prove one bounded foliage/resource authoring +workflow in the real world: build a restrained riverbank or forest-edge cluster +with decorative Terrain3D/intentional instances, pair only selected harvestable +trees or berry patches with stable-ID `ResourceNode` anchors, and verify nearby +and farther loaded anchors remain discoverable through `ActiveWorldAdapter`. +Keep decorative instances out of simulation state, measure the bounded visual +cost, and do not generalize the resource grid to people/buildings/events or introduce active/abstract LOD before those consumers need it. Recently completed: +- `Jajce River 03`: deterministic Terrain3D generation now carves the upper + stream, raised waterfall shelf, plunge basin, and curved downstream channel; + shared watercourse geometry keeps both water ribbons aligned, soft masked + mist replaces hard billboards, and the rebaked navigation mesh passes + terrain-height and runtime resource-route checks. - Loaded-resource spatial discovery: a resource-specific active-world grid preserves exact score winners and lifecycle authority while reducing the reviewed 1,800-anchor query from 6.45 ms to 46.94 µs. diff --git a/docs/PROJECT_CONTEXT.md b/docs/PROJECT_CONTEXT.md index 01efe8a..6f1b2ce 100644 --- a/docs/PROJECT_CONTEXT.md +++ b/docs/PROJECT_CONTEXT.md @@ -341,8 +341,9 @@ but retain far sources whenever their authoritative metadata can still win. - a centered 512 m Terrain3D landscape split across four regions; - deterministic shaped terrain data and six game-owned surface layers; -- a larger summit citadel, eight cascading houses, mill, full-span bridge, - rock-framed waterfall, mist, smoke, and a Terrain3D-sampled river ribbon; +- a larger summit citadel, eight cascading houses, mill, full-span bridge, and + a deterministic Terrain3D watercourse with an upper stream, raised waterfall + shelf, rock-framed drop, plunge basin, mist, and curved downstream ribbon; - authored dirt path strips that make the current village task loop readable; - compact silhouette props for the ridge landmark, guard, study, and rest sites, plus a physical pantry whose empty/low/stocked arrangement follows @@ -979,10 +980,12 @@ Raw samples and workload exclusions live in [Simulation scaling baseline 02](benchmarks/SIMULATION_SCALING_BASELINE_02.md) and [Loaded Resource Discovery 01](benchmarks/LOADED_RESOURCE_DISCOVERY_01.md). -The next slice should return to the authored Jajce stage: sculpt the real -Terrain3D river channel and waterfall shelf, rebake/validate navigation, and -use the following foliage expansion to prove a bounded stable-ID resource -anchor placement workflow beside decorative Terrain3D instances. Do not yet +The authored Jajce watercourse and its Terrain3D-derived navigation rebake are +complete. The next slice should prove a bounded stable-ID resource-anchor +placement workflow beside decorative Terrain3D/intentional foliage instances +at one riverbank or forest edge. It should validate nearby and farther loaded +resource discovery, reachable interaction points, and a measured presentation +budget without making decorative instances authoritative. Do not yet generalize the resource grid or introduce active/abstract simulation LOD. The remaining simulation-garden target still aims for: diff --git a/docs/baselines/JAJCE_RIVER_03.md b/docs/baselines/JAJCE_RIVER_03.md new file mode 100644 index 0000000..7d9f8da --- /dev/null +++ b/docs/baselines/JAJCE_RIVER_03.md @@ -0,0 +1,80 @@ +# Jajce River 03 + +Captured: 2026-07-17 + +## Files + +- [before overview](jajce_river_03_before.png) +- [after overview](jajce_river_03_after.png) +- `tools/capture_jajce_lookdev.gd` +- `tools/generate_jajce_terrain.gd` +- `tools/bake_jajce_navigation.gd` + +The images use the same 1280×720 camera, fixed daylight value, warmup, and +Metal renderer. They are a matched checkpoint rather than two independently +composed beauty shots. + +## What changed + +The previous river was a turquoise presentation ribbon laid across a mostly +flat valley. Its waterfall was held by a large freestanding rock frame, so the +water feature read more like a prop than part of the landscape. + +The deterministic Terrain3D source now creates: + +- a raised shelf upstream of the falls; +- a shallow upper stream widening toward the lip; +- an approximately 12 m drop into a shaped plunge basin; +- a curved downstream channel with visible banks; and +- slope-driven rock texture around the drop and steeper channel edges. + +The waterfall frame is smaller and nested into that landform. Its foam is more +restrained, and the mist uses a soft radial mask so individual particle quads +do not appear against the dark cliff. The result remains deliberately reduced: +citadel, roofs, shelf, falls, bridge, and river form one readable village-center +composition without attempting a literal reconstruction of Jajce. + +## Deterministic authoring contract + +`JajceWatercourse` owns the shared center lines, widths, bed heights, shelf +height, and water offset. `generate_jajce_terrain.gd` uses that profile to +produce the checked-in Terrain3D regions; `TerrainRiverRibbon.gd` uses the same +profile and samples the generated terrain for both water meshes. Changing the +watercourse therefore has one explicit regeneration and navigation-rebake +path instead of unrelated hand-tuned terrain and presentation coordinates. + +This is presentation and interaction geometry only. No resource IDs, +simulation records, RNG streams, save data, or NPC decision rules changed. + +## Validation + +The focused watercourse scenario records an upper-stream height of 11.28 m, a +12.43 m shelf bank, and a -0.65 m plunge basin. It also checks multiple points +along the downstream bed and verifies both generated water ribbons remain +within 3 cm of the Terrain3D surface plus the shared water offset. + +The navigation bake now contains 403 vertices and 620 polygons. The Jajce +scaffold verifies required paths reach their destinations and track the new +terrain heights, while the runtime integration scenario still completes real +player resource gathering with all 18 finite resource anchors loaded. + +## Next visual/system proof + +The next pass should author one bounded riverbank or forest-edge foliage mass, +using decorative Terrain3D/intentional instances for visual density and only a +small selected set of stable-ID `ResourceNode` anchors for finite harvestable +resources. Bank stones, ferns, flowers, and tree masses can improve the channel +edge during that proof. Bridge, buildings, and fortress geometry remain +prototype blockouts and should be replaced gradually rather than through a +broad asset dump. + +## Capture command + +```bash +HOME="$PWD/logs/quality/godot_profile" \ +APPDATA="$PWD/logs/quality/godot_profile" \ +LOCALAPPDATA="$PWD/logs/quality/godot_profile" \ +/Applications/Godot.app/Contents/MacOS/Godot \ + --path "$PWD" --script res://tools/capture_jajce_lookdev.gd -- \ + --output=res://docs/baselines/jajce_river_03_after.png +``` diff --git a/docs/baselines/jajce_river_03_after.png b/docs/baselines/jajce_river_03_after.png new file mode 100644 index 0000000..0aa9dae Binary files /dev/null and b/docs/baselines/jajce_river_03_after.png differ diff --git a/docs/baselines/jajce_river_03_after.png.import b/docs/baselines/jajce_river_03_after.png.import new file mode 100644 index 0000000..90433be --- /dev/null +++ b/docs/baselines/jajce_river_03_after.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://r87qvthnulve" +path="res://.godot/imported/jajce_river_03_after.png-43f5610f2e4f42d23b2a77674f846c7e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://docs/baselines/jajce_river_03_after.png" +dest_files=["res://.godot/imported/jajce_river_03_after.png-43f5610f2e4f42d23b2a77674f846c7e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/docs/baselines/jajce_river_03_before.png b/docs/baselines/jajce_river_03_before.png new file mode 100644 index 0000000..c0be4ff Binary files /dev/null and b/docs/baselines/jajce_river_03_before.png differ diff --git a/docs/baselines/jajce_river_03_before.png.import b/docs/baselines/jajce_river_03_before.png.import new file mode 100644 index 0000000..f6136e2 --- /dev/null +++ b/docs/baselines/jajce_river_03_before.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2whbruuqbywc" +path="res://.godot/imported/jajce_river_03_before.png-1cca7b1c7659c390906ee3738cc8b95f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://docs/baselines/jajce_river_03_before.png" +dest_files=["res://.godot/imported/jajce_river_03_before.png-1cca7b1c7659c390906ee3738cc8b95f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/terrain/jajce/data/terrain3d-01-01.res b/terrain/jajce/data/terrain3d-01-01.res index 98007f7..503a023 100644 Binary files a/terrain/jajce/data/terrain3d-01-01.res and b/terrain/jajce/data/terrain3d-01-01.res differ diff --git a/terrain/jajce/data/terrain3d-01_00.res b/terrain/jajce/data/terrain3d-01_00.res index 3250cb0..0b2868c 100644 Binary files a/terrain/jajce/data/terrain3d-01_00.res and b/terrain/jajce/data/terrain3d-01_00.res differ diff --git a/terrain/jajce/data/terrain3d_00-01.res b/terrain/jajce/data/terrain3d_00-01.res index 1172646..9f7b18b 100644 Binary files a/terrain/jajce/data/terrain3d_00-01.res and b/terrain/jajce/data/terrain3d_00-01.res differ diff --git a/terrain/jajce/data/terrain3d_00_00.res b/terrain/jajce/data/terrain3d_00_00.res index a305acf..df969a0 100644 Binary files a/terrain/jajce/data/terrain3d_00_00.res and b/terrain/jajce/data/terrain3d_00_00.res differ diff --git a/tests/jajce_watercourse_terrain_test.gd b/tests/jajce_watercourse_terrain_test.gd new file mode 100644 index 0000000..d513cfd --- /dev/null +++ b/tests/jajce_watercourse_terrain_test.gd @@ -0,0 +1,117 @@ +extends SceneTree + +const JajceWatercourse := preload("res://world/jajce/JajceWatercourse.gd") + +var failures: Array[String] = [] + + +func _initialize() -> void: + call_deferred("_run") + + +func _run() -> void: + var camera := Camera3D.new() + camera.current = true + root.add_child(camera) + var world: Node3D = load("res://world/jajce/JajceWorld.tscn").instantiate() + root.add_child(world) + await process_frame + for _frame in 4: + await physics_frame + + var terrain := world.get_node("TerrainRoot/Terrain3D") as Terrain3D + _check(terrain != null, "Jajce watercourse validation requires Terrain3D") + if terrain == null: + _finish() + return + + var shelf_z := -36.0 + var shelf_center_x := JajceWatercourse.upper_stream_center_x(shelf_z) + var shelf_half_width := JajceWatercourse.upper_stream_half_width(shelf_z) + var shelf_stream_height := _terrain_height(terrain, shelf_center_x, shelf_z) + var shelf_bank_height := _terrain_height( + terrain, shelf_center_x + shelf_half_width + 4.0, shelf_z + ) + var plunge_height := _terrain_height( + terrain, JajceWatercourse.PLUNGE_POOL_CENTER.x, JajceWatercourse.PLUNGE_POOL_CENTER.y + ) + _check(shelf_stream_height >= 10.8, "Upper stream should remain on the raised waterfall shelf") + _check( + shelf_bank_height - shelf_stream_height >= 0.45, + "Upper stream should be visibly carved below its shelf bank" + ) + _check( + shelf_stream_height - plunge_height >= 10.0, + "Waterfall shelf should create a readable drop into the plunge basin" + ) + + var downstream_samples := PackedFloat32Array([-10.0, 12.0, 34.0]) + for world_z in downstream_samples: + var center_x := JajceWatercourse.downstream_center_x(world_z) + var half_width := JajceWatercourse.downstream_half_width(world_z) + var channel_height := _terrain_height(terrain, center_x, world_z) + var left_bank_height := _terrain_height(terrain, center_x - half_width - 5.0, world_z) + var right_bank_height := _terrain_height(terrain, center_x + half_width + 5.0, world_z) + _check( + channel_height <= JajceWatercourse.downstream_bed_height(world_z) + 0.08, + "Downstream bed should follow its authored profile at z=%.1f" % world_z + ) + _check( + maxf(left_bank_height, right_bank_height) - channel_height >= 0.45, + "Downstream channel should read below a natural bank at z=%.1f" % world_z + ) + + var river_surface := world.get_node("WaterRoot/RiverSurface") as Node3D + _check_ribbon_tracks_terrain( + terrain, river_surface.get_node("RiverRibbon") as MeshInstance3D, "Downstream water" + ) + _check_ribbon_tracks_terrain( + terrain, river_surface.get_node("UpperRiverRibbon") as MeshInstance3D, "Upper-stream water" + ) + + print( + ( + "[TEST] Jajce watercourse samples | shelf=%.2f bank=%.2f pool=%.2f" + % [shelf_stream_height, shelf_bank_height, plunge_height] + ) + ) + _finish() + + +func _terrain_height(terrain: Terrain3D, world_x: float, world_z: float) -> float: + return terrain.data.get_height(Vector3(world_x, 0.0, world_z)) + + +func _check_ribbon_tracks_terrain( + terrain: Terrain3D, ribbon: MeshInstance3D, label: String +) -> void: + _check(ribbon != null and ribbon.mesh is ArrayMesh, "%s ribbon should be generated" % label) + if ribbon == null or not ribbon.mesh is ArrayMesh: + return + var arrays := ribbon.mesh.surface_get_arrays(0) + var vertices: PackedVector3Array = arrays[Mesh.ARRAY_VERTEX] + _check(not vertices.is_empty(), "%s ribbon should contain vertices" % label) + for vertex_index in range(0, vertices.size(), maxi(1, vertices.size() / 12)): + var world_vertex := ribbon.to_global(vertices[vertex_index]) + var terrain_height := terrain.data.get_height(world_vertex) + if is_nan(terrain_height): + failures.append("%s ribbon sampled outside Terrain3D" % label) + return + if absf(world_vertex.y - terrain_height - JajceWatercourse.WATER_SURFACE_OFFSET) > 0.03: + failures.append("%s ribbon should hug the carved terrain" % label) + return + + +func _check(condition: bool, message: String) -> void: + if not condition: + failures.append(message) + + +func _finish() -> void: + if failures.is_empty(): + print("[TEST] Jajce watercourse terrain passed") + quit(0) + return + for failure in failures: + push_error("[TEST] " + failure) + quit(1) diff --git a/tests/jajce_watercourse_terrain_test.gd.uid b/tests/jajce_watercourse_terrain_test.gd.uid new file mode 100644 index 0000000..408feab --- /dev/null +++ b/tests/jajce_watercourse_terrain_test.gd.uid @@ -0,0 +1 @@ +uid://bs5xfsxii5j8w diff --git a/tests/jajce_world_scaffold_test.gd b/tests/jajce_world_scaffold_test.gd index cc79361..5f10ecc 100644 --- a/tests/jajce_world_scaffold_test.gd +++ b/tests/jajce_world_scaffold_test.gd @@ -1,5 +1,7 @@ extends SceneTree +const JajceWatercourse := preload("res://world/jajce/JajceWatercourse.gd") + var failures: Array[String] = [] @@ -213,7 +215,7 @@ func _run() -> void: "Waterfall mist particles should have visible billboard geometry" ) _check( - waterfall_mist.position.distance_to(Vector3(25.0, 2.05, -24.0)) < 0.01, + waterfall_mist.position.distance_to(Vector3(25.0, 0.65, -21.5)) < 0.01, "Waterfall mist should stay at the waterfall base instead of obscuring the village" ) _check(world.has_node("WaterRoot/RiverSurface"), "WaterRoot should include a river surface") @@ -222,10 +224,34 @@ func _run() -> void: river_ribbon.mesh is ArrayMesh, "River should build a lightweight ribbon from the current Terrain3D surface" ) + var upper_river_ribbon := ( + world.get_node("WaterRoot/RiverSurface/UpperRiverRibbon") as MeshInstance3D + ) + _check( + upper_river_ribbon.mesh is ArrayMesh, + "Waterfall shelf should expose a terrain-following upper stream" + ) _check( world.has_node("WaterRoot/RiverSurface/PlungePool"), "River should widen into a readable plunge pool beneath the waterfall" ) + var plunge_pool := world.get_node("WaterRoot/RiverSurface/PlungePool") as MeshInstance3D + var expected_pool_height: float = terrain.data.get_height( + Vector3(JajceWatercourse.PLUNGE_POOL_CENTER.x, 0.0, JajceWatercourse.PLUNGE_POOL_CENTER.y) + ) + _check( + ( + absf( + ( + plunge_pool.global_position.y + - expected_pool_height + - JajceWatercourse.WATER_SURFACE_OFFSET + ) + ) + < 0.03 + ), + "Plunge-pool water should follow the carved basin height" + ) var environment: Environment = ( (world.get_node("WorldEnvironment") as WorldEnvironment).environment ) diff --git a/tools/generate_jajce_terrain.gd b/tools/generate_jajce_terrain.gd index a78636e..3c8fa2a 100644 --- a/tools/generate_jajce_terrain.gd +++ b/tools/generate_jajce_terrain.gd @@ -5,6 +5,7 @@ const HALF_SIZE := MAP_SIZE / 2 const HEIGHT_SCALE := 40.0 const DATA_DIRECTORY := "res://terrain/jajce/data" const TEXTURE_DIRECTORY := "res://terrain/jajce/textures" +const Watercourse := preload("res://world/jajce/JajceWatercourse.gd") func _initialize() -> void: @@ -41,13 +42,15 @@ func _generate() -> void: var southern_hill := ( 11.0 * _elliptical_peak(world_x, world_z, -35.0, -125.0, 130.0, 85.0) ) - var river_trench := -5.0 * exp(-pow((world_x - 25.0) / 18.0, 2.0)) var broad_slope := maxf(0.0, (-world_x - 30.0) * 0.035) var detail := noise.get_noise_2d(world_x, world_z) * 2.4 var height := ( - (ridge + eastern_hill + southern_hill + river_trench + broad_slope + detail) - * outside_play_area + (ridge + eastern_hill + southern_hill + broad_slope + detail) * outside_play_area ) + height = _shape_waterfall_shelf(height, world_x, world_z, detail) + height = _shape_upper_stream(height, world_x, world_z) + height = _shape_plunge_pool(height, world_x, world_z) + height = _shape_downstream_channel(height, world_x, world_z) height_map.set_pixel(image_x, image_z, Color(height / HEIGHT_SCALE, 0.0, 0.0, 1.0)) terrain.data.import_images( @@ -64,6 +67,44 @@ func _elliptical_peak( return exp(-(pow((x - center_x) / width, 2.0) + pow((z - center_z) / depth, 2.0))) +func _shape_waterfall_shelf(height: float, x: float, z: float, detail: float) -> float: + var horizontal_mask := 1.0 - smoothstep(10.0, 28.0, absf(x - Watercourse.WATERFALL_CENTER.x)) + var upstream_mask := smoothstep(-76.0, -54.0, z) + var drop_mask := 1.0 - smoothstep(-25.0, -21.0, z) + var shelf_mask := horizontal_mask * upstream_mask * drop_mask + var shelf_height := Watercourse.SHELF_TOP_HEIGHT + detail * 0.08 + return lerpf(height, maxf(height, shelf_height), shelf_mask) + + +func _shape_upper_stream(height: float, x: float, z: float) -> float: + if z < Watercourse.UPPER_STREAM_START_Z or z > Watercourse.UPPER_STREAM_END_Z: + return height + var center_x := Watercourse.upper_stream_center_x(z) + var half_width := Watercourse.upper_stream_half_width(z) + var channel_mask := 1.0 - smoothstep(half_width, half_width + 3.2, absf(x - center_x)) + var target_height := minf(height, Watercourse.upper_stream_bed_height(z)) + return lerpf(height, target_height, channel_mask) + + +func _shape_plunge_pool(height: float, x: float, z: float) -> float: + var offset := Vector2(x, z) - Watercourse.PLUNGE_POOL_CENTER + var elliptical_distance := Vector2(offset.x / 10.5, offset.y / 7.8).length() + var basin_mask := 1.0 - smoothstep(0.68, 1.15, elliptical_distance) + var cliff_front_mask := smoothstep(-25.0, -20.5, z) + var target_height := minf(height, Watercourse.PLUNGE_POOL_BED_HEIGHT) + return lerpf(height, target_height, basin_mask * cliff_front_mask) + + +func _shape_downstream_channel(height: float, x: float, z: float) -> float: + if z < Watercourse.DOWNSTREAM_START_Z or z > Watercourse.DOWNSTREAM_END_Z: + return height + var center_x := Watercourse.downstream_center_x(z) + var half_width := Watercourse.downstream_half_width(z) + var bank_mask := 1.0 - smoothstep(half_width, half_width + 4.5, absf(x - center_x)) + var target_height := minf(height, Watercourse.downstream_bed_height(z)) + return lerpf(height, target_height, bank_mask) + + func _generate_texture( file_name: String, dark_color: Color, light_color: Color, seed_value: int ) -> void: diff --git a/world/jajce/JajceNavigationMesh.tres b/world/jajce/JajceNavigationMesh.tres index a5fb734..c402ce4 100644 --- a/world/jajce/JajceNavigationMesh.tres +++ b/world/jajce/JajceNavigationMesh.tres @@ -1,8 +1,8 @@ [gd_resource type="NavigationMesh" format=3] [resource] -vertices = PackedVector3Array(-33.25, 10.300001, -21.25, -32.5, 9.800001, -21.25, -32.25, 9.900002, -22.25, -28.5, 6.2000003, -17.25, -28.5, 5.9, -16, -27.5, 5.1, -15.25, -35.5, 11.5, -20, -33.5, 10.300001, -20.5, -29.5, 7.7000003, -20.25, -29.5, 7.1, -18, -28.833334, 6.6, -18.25, -35.5, 10.5, -35.5, -35.5, 11.1, -32.681816, -35.5, 11.700001, -28.454544, -35.5, 11.800001, -24.227272, -32.575, 10.300001, -23.575, -33.55, 11.1, -27.55, -34.525, 11.1, -31.525, -34.489986, 11.300001, -25.514011, -27.5, 3.2000003, -3, -26.5, 2.5000005, -2.25, 35.5, 3.1, -0.25, 31.435486, 1.7000003, -1.2177429, 23.306454, 0.2999997, -3.153225, -15.306452, 0.20000029, -12.346775, -17.33871, 0.2999997, -12.830645, -19.370968, 0.7000003, -13.314516, -23.435484, 2.4, -14.282259, -27.5, 3.9, -11.166666, -27.5, 3.2999997, -7.083332, -24.5, 1.2999997, -2.185482, -22.5, 0.5000005, -2.1209679, -20.5, 0.20000029, -2.05645, 21.5, 0.20000029, -0.7016144, 25.5, 0.5999999, -0.57258224, 29.5, 1.2999997, -0.4435501, -24.00977, 1.5999999, -9.016245, -20.989746, 0.5000005, -8.99427, -25.525, 3.2000003, -13.525, -22.484951, 1.4000001, -11.9810505, -23.989384, 1.2000003, -6.014658, -22.499096, 0.5999999, -4.500967, -25.51912, 1.9000001, -4.5229416, -25.504614, 2.1, -7.5234127, -23.984108, 1.0999999, -4.5119553, -18.019844, 0.20000029, -10.482166, -20.988781, 0.20000029, -3.0153046, -26.5, 2.5000005, -0.25, -26.5, 2.2999997, -1.25, -24.5, 1.2999997, -0.25, -22.5, 0.5000005, -0.25, -20.5, 0.20000029, -0.25, 21.5, 0.20000029, -0.25, 25.5, 0.5999999, -0.25, 29.5, 1.2999997, -0.25, -31.5, 9.400002, -22.25, -32.3, 10.300001, -24.9, -33.1, 10.900002, -27.55, -34.3, 11, -31.525, -30.590908, 9, -23.022728, -31.681818, 10.1, -25.795456, -32.772728, 10.800001, -28.568182, -33.863636, 10.900002, -31.340908, 35.5, 3.4, -35.5, 30.919357, 2.5000005, -35.5, 28.629028, 2.2999997, -35.5, 1.1451607, 3.1, -35.5, -5.725807, 3.9, -35.5, -10.306452, 4.7999997, -35.5, -21.758064, 7.9, -35.5, 35.5, 3.1, -3.1875, 35.5, 3.7000003, -14.9375, 35.5, 3.7000003, -19.34375, 35.5, 3.5000005, -22.28125, 35.5, 3.9, -28.15625, 35.5, 3.9, -31.09375, 1.4890518, 0.5000005, -23.983337, 20.97575, 0.9000001, -19.484158, -12.015022, 0.7000003, -20.987331, -22.510105, 3.9, -21.01424, -25.489384, 8.200001, -33.01466, 10.518063, 1.2000003, -26.98428, 28.507294, 1.7000003, -14.97781, 19.486519, 2.2999997, -31.490625, 26.987122, 2.2999997, -29.991272, -23.987215, 6.5000005, -26.98698, -16.481094, 2.6, -24.015182, 14.976715, 0.20000029, -16.50519, -16.499552, 1.2000003, -19.508835, -28.51119, 7.7999997, -24.003078, -27.02413, 5.2999997, -18.024286, 21.022644, 0.4000001, -13.509184, -9.02449, 0.20000029, -19.503899, -7.521023, 0.9000001, -23.99926, -19.49907, 1.7000003, -18.019352, -29.993336, 9.5, -30.008781, -33.014446, 10.400002, -33.019592, -15.008057, 0.20000029, -14.996435, -28.49225, 8.6, -27.019943, -1.5025635, 1.5999999, -28.505608, -11.976057, 1.5000005, -23.98222, 8.991436, 2.0000005, -31.517536, 24.014233, 1.7999997, -24.018532, 21.022617, 1.7999997, -28.4908, -19.498251, 5.7000003, -29.98187, -31.489986, 9.800001, -34.51401, 25.488354, 0.7999997, -10.510946, 29.993874, 1.5999999, -7.4885006, 10.5046425, 0.5000005, -22.494968, 28.524788, 2.2000003, -22.513124, 5.9853134, 2.7000003, -34.489334, -17.993551, 0.9000001, -16.496906, -14.977142, 3.2000003, -27.021059, -10.481575, 1.7000003, -25.504665, -23.97883, 7.6, -31.509253, -28.509409, 9.200001, -32.986633, -25.499939, 8.400002, -34.520065, 6.005123, 0.20000029, -21.005486, -25.512756, 7.4, -28.4814, -24.004105, 3.6, -18.002312, -25.518612, 4.0000005, -16.50184, -26.998856, 8.6, -31.481226, 30.007149, 2.7000003, -30.019299, -22.492733, 6.2000003, -28.509426, -22.479916, 7.7000003, -34.49809, 25.521801, 1.2000003, -16.47828, -31.503891, 10.1, -31.514187, 32.983772, 3.1, -25.48604, -20.998104, 1.5000005, -14.990383, 31.520836, 2.6, -19.507248, -17.988783, 5.6, -31.515305, 25.509102, 0.5999999, -4.479746, -20.984348, 7.0000005, -32.981697, 28.488205, 2.5000005, -27.002434, 0.005821228, 2.7000003, -32.97788, -4.5097713, 3.4, -34.516247, -18.00507, 2.1, -20.98128, 11.975361, 2.7000003, -34.495388, -25.522228, 7.1, -26.997969, -25.491165, 6.4, -23.981104, -28.500153, 7.0000005, -21.00819, -27.02066, 6.6, -22.519648, -4.4954796, 0.4000001, -22.50484, -25.513844, 8, -31.520239, -25.4883, 7.7999997, -29.975819, 16.520714, 0.5000005, -19.517118, -12.02401, 0.20000029, -18.014416, -14.990564, 1.7000003, -22.48175, -27.003624, 4.9, -16.512829, 30.006332, 2.2999997, -18.006777, 27.0158, 1.7999997, -19.49021, 24.016014, 2.4, -33.002083, -18.5, 2.9, 19.75, -18.5, 3.2999997, 20.5, -17.75, 2.9, 20.5, -7.5, 5.7999997, 31.75, -7.5, 6.2000003, 32.5, -6.75, 6.0000005, 32.5, -7.75, 5.0000005, 30.5, -8, 5.7000003, 31.5, -20.5, 2.6, 16.75, -20.5, 2.9, 17.5, -19.5, 2.5000005, 17.75, -17.5, 3.2999997, 21.5, -16.75, 2.9, 21.5, -11.75, 3.7000003, 26.5, -11.5, 4.2000003, 27.5, -10.75, 4.0000005, 27.5, -10.5, 4.5000005, 28.5, -9.75, 4.2999997, 28.5, -16.5, 3.2999997, 22.5, -15.5, 3.0000005, 22.75, -6.5, 6.6, 33.5, -5.5, 6.6, 33.75, -23.5, 2.2999997, 10.75, -23.5, 2.7000003, 12, -22.5, 2.2999997, 12.75, -22.5, 2.7000003, 14, -21.5, 2.4, 14.75, -21.5, 2.9, 16, -19.5, 3.0000005, 19, -25.5, 2.2999997, 4.75, -25.5, 2.7000003, 7, -24.5, 2.2000003, 7.75, -24.5, 2.7000003, 10, -23.833332, 2.2000003, 9.75, -6.25, 5.9, 32.666664, -15.5, 3.7000003, 24, -13, 4.1, 26.5, -13.833334, 3.7999997, 25.666668, -26.5, 2.9, 4, 35.5, 9, 35.5, -25.75, 1.9000001, 0.97999954, -24.25, 1.2999997, 3.4399986, -21.25, 0.5999999, 8.360001, -19, 0.5000005, 12.049999, -15.25, 0.9000001, 18.2, -13.75, 1.2999997, 20.66, -11.5, 2.2999997, 24.349998, -9.25, 3.7999997, 28.04, -1.1071434, 5.9, 33.9375, 12.071426, 5.2999997, 34.5, 13.535713, 5.1, 34.5625, 17.928574, 5.2000003, 34.75, 22.321426, 5.1, 34.9375, 26.714287, 6.1, 35.125, 29.642853, 7.2000003, 35.25, 35.5, 8.6, 32.520836, 35.5, 7.2999997, 28.052086, 35.5, 6.2999997, 22.09375, 35.5, 4.1, 11.666668, 35.5, 3.2000003, 4.21875, 35.5, 3.0000005, 1.2395821, 12.0204735, 0.4000001, 19.513142, -0.018127441, 1.2999997, 25.48764, 25.505966, 2.4, 21.01361, -3.009262, 0.20000029, 21.004856, 12.011967, 1.7000003, 25.47554, 28.502716, 1.5000005, 8.997097, -6.008539, 1.2000003, 24.01408, 21.002739, 3.4, 28.478714, 30.01281, 5.2999997, 28.494637, 19.513508, 0.2999997, 12.0222435, -4.492466, 3.1, 28.491936, 0.0125694275, 2.6, 28.524895, 29.996376, 4.0000005, 22.487171, 7.5211983, 0.5999999, 22.522366, 4.486908, 1.2999997, 25.520603, -12.010105, 0.2999997, 17.98576, 20.980545, 1.2999997, 19.479061, 25.477077, 3.2999997, 25.524422, 24.010857, 0.4000001, 3.005085, -22.489986, 0.5000005, 1.4859886, -10.484322, 0.7999997, 20.99992, -7.493189, 2.0000005, 25.482708, -18.022228, 0.20000029, 10.502033, 22.508953, 0.7999997, 13.478767, 19.486668, 2.0000005, 24.000862, 9.008621, 4.7999997, 32.980774, -20.989506, 0.20000029, 2.9754715, -3.0228043, 2.1, 26.984295, -2.988514, 0.9000001, 23.986053, 4.5176086, 2.5000005, 28.507858, 2.9932709, 4.1, 31.512146, -0.0038642883, 0.4000001, 22.51743, 13.479702, 0.20000029, 16.509968, 31.48317, 2.5000005, 10.514606, 10.487991, 3.4, 30.009445, 9.00045, 0.20000029, 19.491165, 31.520447, 1.7999997, 1.4815216, 11.976231, 0.9000001, 22.505325, 16.497704, 3.0000005, 28.49575, 28.488472, 5.7999997, 31.498924, 25.518452, 4.9, 31.476952, 31.5085, 6.7000003, 31.520897, 34.52385, 8.6, 34.489525, 26.988567, 1.5000005, 11.9771805, 25.487244, 0.7999997, 7.5186005, -7.478924, 0.7999997, 22.512493, 27.011726, 3.2999997, 24.005798, 12.003342, 4.1, 31.478065, 34.516037, 5.5000005, 20.979534, 31.505241, 3.7000003, 18.004387, -2.9771156, 3.7000003, 30.01056, 19.519749, 0.7000003, 16.503914, 22.523727, 4.7999997, 32.979652, 24.00874, 4.9, 32.99064, -5.997141, 4.2000003, 29.988586, 33.016403, 5.2000003, 22.509148, 24.000568, 1.7999997, 19.501038, -21.75, 2.1, 14, -25.5, 2.0000005, 3.75, -17.55, 2.4, 19.900002, -14.625, 2.7000003, 23.125, -19.514927, 1.4000001, 14.990921, -21.019964, 1.2000003, 12.007961, -22.489986, 1.2000003, 8.985989, -17.994904, 1.7999997, 18.012897, -24.025, 1.5000005, 5.9749985, -14.65625, 2.7000003, 23.21875, -17.5625, 2.4, 19.9375, -14.638889, 2.7000003, 23.166668, -17.555555, 2.4, 19.916668, -5.75, 7.7999997, 35.5, -1.3303566, 7.0000005, 35.5, 11.928574, 5.6, 35.5, 14.875, 5.4, 35.5, 22.24107, 5.2999997, 35.5, 25.1875, 5.7999997, 35.5, -34.5, 21.800001, 32.25, -35.5, 22.300001, 31.25, -35.5, 22.400002, 35.5, -31.5, 20.400002, 34, -33.5, 21.2, 32, -31.25, 20.5, 35.5, -32.666668, 21.2, 35.5) -polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(5, 4, 3), PackedInt32Array(6, 0, 7), PackedInt32Array(3, 9, 10), PackedInt32Array(10, 9, 8), PackedInt32Array(17, 12, 11), PackedInt32Array(12, 17, 13), PackedInt32Array(13, 18, 14), PackedInt32Array(14, 0, 6), PackedInt32Array(0, 15, 2), PackedInt32Array(15, 18, 16), PackedInt32Array(16, 13, 17), PackedInt32Array(18, 15, 14), PackedInt32Array(13, 16, 18), PackedInt32Array(14, 15, 0), PackedInt32Array(3, 10, 5), PackedInt32Array(5, 10, 8), PackedInt32Array(35, 22, 21), PackedInt32Array(22, 35, 23), PackedInt32Array(23, 33, 24), PackedInt32Array(24, 45, 25), PackedInt32Array(25, 45, 26), PackedInt32Array(26, 39, 27), PackedInt32Array(27, 38, 5), PackedInt32Array(5, 38, 28), PackedInt32Array(28, 43, 29), PackedInt32Array(29, 42, 19), PackedInt32Array(19, 42, 20), PackedInt32Array(20, 42, 30), PackedInt32Array(30, 44, 31), PackedInt32Array(31, 46, 32), PackedInt32Array(32, 24, 33), PackedInt32Array(33, 23, 34), PackedInt32Array(34, 23, 35), PackedInt32Array(24, 32, 45), PackedInt32Array(45, 37, 26), PackedInt32Array(39, 38, 27), PackedInt32Array(26, 37, 39), PackedInt32Array(38, 36, 28), PackedInt32Array(43, 42, 29), PackedInt32Array(28, 36, 43), PackedInt32Array(42, 44, 30), PackedInt32Array(44, 41, 31), PackedInt32Array(46, 45, 32), PackedInt32Array(31, 41, 46), PackedInt32Array(45, 46, 37), PackedInt32Array(39, 36, 38), PackedInt32Array(37, 36, 39), PackedInt32Array(43, 40, 42), PackedInt32Array(36, 40, 43), PackedInt32Array(42, 40, 44), PackedInt32Array(44, 40, 41), PackedInt32Array(41, 37, 46), PackedInt32Array(37, 40, 36), PackedInt32Array(40, 37, 41), PackedInt32Array(20, 30, 48), PackedInt32Array(48, 30, 47), PackedInt32Array(47, 30, 49), PackedInt32Array(49, 30, 31), PackedInt32Array(49, 31, 50), PackedInt32Array(50, 31, 32), PackedInt32Array(50, 32, 51), PackedInt32Array(51, 32, 33), PackedInt32Array(51, 33, 52), PackedInt32Array(52, 33, 34), PackedInt32Array(52, 34, 53), PackedInt32Array(53, 34, 35), PackedInt32Array(53, 35, 54), PackedInt32Array(54, 35, 21), PackedInt32Array(2, 15, 55), PackedInt32Array(55, 15, 56), PackedInt32Array(56, 15, 57), PackedInt32Array(57, 15, 16), PackedInt32Array(57, 16, 58), PackedInt32Array(58, 16, 17), PackedInt32Array(58, 17, 11), PackedInt32Array(8, 55, 59), PackedInt32Array(59, 55, 56), PackedInt32Array(59, 56, 60), PackedInt32Array(60, 56, 57), PackedInt32Array(60, 57, 61), PackedInt32Array(61, 57, 62), PackedInt32Array(62, 57, 58), PackedInt32Array(62, 58, 11), PackedInt32Array(75, 64, 63), PackedInt32Array(64, 122, 65), PackedInt32Array(65, 137, 66), PackedInt32Array(66, 135, 67), PackedInt32Array(67, 135, 68), PackedInt32Array(68, 130, 69), PackedInt32Array(69, 105, 11), PackedInt32Array(11, 96, 62), PackedInt32Array(62, 126, 61), PackedInt32Array(61, 98, 60), PackedInt32Array(60, 89, 59), PackedInt32Array(59, 140, 8), PackedInt32Array(8, 148, 5), PackedInt32Array(5, 120, 27), PackedInt32Array(27, 128, 26), PackedInt32Array(26, 111, 25), PackedInt32Array(25, 97, 24), PackedInt32Array(24, 87, 23), PackedInt32Array(23, 131, 22), PackedInt32Array(22, 70, 21), PackedInt32Array(70, 107, 71), PackedInt32Array(71, 129, 72), PackedInt32Array(72, 129, 73), PackedInt32Array(73, 127, 74), PackedInt32Array(74, 122, 75), PackedInt32Array(75, 122, 64), PackedInt32Array(122, 84, 65), PackedInt32Array(137, 110, 66), PackedInt32Array(65, 151, 137), PackedInt32Array(66, 134, 135), PackedInt32Array(135, 113, 68), PackedInt32Array(130, 132, 69), PackedInt32Array(68, 112, 130), PackedInt32Array(105, 96, 11), PackedInt32Array(69, 116, 105), PackedInt32Array(96, 126, 62), PackedInt32Array(126, 95, 61), PackedInt32Array(98, 89, 60), PackedInt32Array(61, 95, 98), PackedInt32Array(89, 140, 59), PackedInt32Array(140, 90, 8), PackedInt32Array(148, 120, 5), PackedInt32Array(8, 90, 148), PackedInt32Array(120, 119, 27), PackedInt32Array(128, 111, 26), PackedInt32Array(27, 119, 128), PackedInt32Array(111, 97, 25), PackedInt32Array(97, 146, 24), PackedInt32Array(87, 91, 23), PackedInt32Array(24, 117, 87), PackedInt32Array(131, 107, 22), PackedInt32Array(23, 106, 131), PackedInt32Array(22, 107, 70), PackedInt32Array(107, 82, 71), PackedInt32Array(71, 149, 129), PackedInt32Array(129, 127, 73), PackedInt32Array(127, 122, 74), PackedInt32Array(84, 151, 65), PackedInt32Array(122, 133, 84), PackedInt32Array(110, 134, 66), PackedInt32Array(137, 101, 110), PackedInt32Array(151, 83, 137), PackedInt32Array(134, 99, 135), PackedInt32Array(113, 112, 68), PackedInt32Array(135, 99, 113), PackedInt32Array(132, 124, 69), PackedInt32Array(130, 104, 132), PackedInt32Array(112, 104, 130), PackedInt32Array(105, 126, 96), PackedInt32Array(116, 115, 105), PackedInt32Array(69, 124, 116), PackedInt32Array(126, 115, 95), PackedInt32Array(98, 138, 89), PackedInt32Array(95, 121, 98), PackedInt32Array(89, 141, 140), PackedInt32Array(140, 141, 90), PackedInt32Array(148, 90, 120), PackedInt32Array(120, 90, 119), PackedInt32Array(128, 94, 111), PackedInt32Array(119, 94, 128), PackedInt32Array(111, 88, 97), PackedInt32Array(146, 92, 24), PackedInt32Array(97, 88, 146), PackedInt32Array(91, 106, 23), PackedInt32Array(87, 145, 91), PackedInt32Array(117, 108, 87), PackedInt32Array(24, 92, 117), PackedInt32Array(131, 106, 107), PackedInt32Array(82, 149, 71), PackedInt32Array(107, 106, 82), PackedInt32Array(149, 109, 129), PackedInt32Array(129, 109, 127), PackedInt32Array(127, 133, 122), PackedInt32Array(84, 103, 151), PackedInt32Array(133, 102, 84), PackedInt32Array(110, 101, 134), PackedInt32Array(137, 81, 101), PackedInt32Array(83, 81, 137), PackedInt32Array(151, 103, 83), PackedInt32Array(134, 101, 99), PackedInt32Array(113, 100, 112), PackedInt32Array(99, 93, 113), PackedInt32Array(132, 114, 124), PackedInt32Array(104, 123, 132), PackedInt32Array(112, 86, 104), PackedInt32Array(105, 115, 126), PackedInt32Array(116, 80, 115), PackedInt32Array(124, 80, 116), PackedInt32Array(115, 121, 95), PackedInt32Array(138, 139, 89), PackedInt32Array(98, 118, 138), PackedInt32Array(121, 118, 98), PackedInt32Array(89, 139, 141), PackedInt32Array(141, 119, 90), PackedInt32Array(94, 88, 111), PackedInt32Array(119, 79, 94), PackedInt32Array(146, 78, 92), PackedInt32Array(88, 78, 146), PackedInt32Array(91, 125, 106), PackedInt32Array(145, 77, 91), PackedInt32Array(87, 108, 145), PackedInt32Array(117, 81, 108), PackedInt32Array(92, 142, 117), PackedInt32Array(82, 125, 149), PackedInt32Array(106, 125, 82), PackedInt32Array(149, 150, 109), PackedInt32Array(109, 133, 127), PackedInt32Array(84, 102, 103), PackedInt32Array(133, 109, 102), PackedInt32Array(81, 76, 101), PackedInt32Array(83, 103, 81), PackedInt32Array(101, 76, 99), PackedInt32Array(100, 86, 112), PackedInt32Array(113, 93, 100), PackedInt32Array(99, 142, 93), PackedInt32Array(114, 80, 124), PackedInt32Array(132, 123, 114), PackedInt32Array(104, 86, 123), PackedInt32Array(80, 121, 115), PackedInt32Array(138, 85, 139), PackedInt32Array(118, 85, 138), PackedInt32Array(121, 144, 118), PackedInt32Array(139, 79, 141), PackedInt32Array(141, 79, 119), PackedInt32Array(94, 136, 88), PackedInt32Array(79, 136, 94), PackedInt32Array(78, 93, 92), PackedInt32Array(88, 147, 78), PackedInt32Array(91, 77, 125), PackedInt32Array(145, 103, 77), PackedInt32Array(108, 81, 145), PackedInt32Array(117, 76, 81), PackedInt32Array(142, 76, 117), PackedInt32Array(92, 93, 142), PackedInt32Array(125, 150, 149), PackedInt32Array(150, 102, 109), PackedInt32Array(102, 77, 103), PackedInt32Array(103, 145, 81), PackedInt32Array(76, 142, 99), PackedInt32Array(100, 147, 86), PackedInt32Array(93, 78, 100), PackedInt32Array(114, 143, 80), PackedInt32Array(123, 144, 114), PackedInt32Array(86, 85, 123), PackedInt32Array(80, 143, 121), PackedInt32Array(85, 79, 139), PackedInt32Array(118, 123, 85), PackedInt32Array(144, 123, 118), PackedInt32Array(121, 143, 144), PackedInt32Array(136, 147, 88), PackedInt32Array(79, 86, 136), PackedInt32Array(147, 100, 78), PackedInt32Array(77, 150, 125), PackedInt32Array(150, 77, 102), PackedInt32Array(147, 136, 86), PackedInt32Array(114, 144, 143), PackedInt32Array(86, 79, 85), PackedInt32Array(154, 153, 152), PackedInt32Array(157, 156, 155), PackedInt32Array(155, 159, 158), PackedInt32Array(162, 161, 160), PackedInt32Array(154, 164, 163), PackedInt32Array(165, 167, 166), PackedInt32Array(167, 169, 168), PackedInt32Array(170, 164, 171), PackedInt32Array(172, 157, 173), PackedInt32Array(176, 175, 174), PackedInt32Array(178, 177, 176), PackedInt32Array(160, 179, 178), PackedInt32Array(152, 180, 162), PackedInt32Array(158, 157, 155), PackedInt32Array(183, 182, 181), PackedInt32Array(174, 184, 185), PackedInt32Array(185, 184, 183), PackedInt32Array(154, 152, 162), PackedInt32Array(162, 160, 178), PackedInt32Array(173, 157, 186), PackedInt32Array(186, 157, 158), PackedInt32Array(188, 189, 165), PackedInt32Array(165, 189, 187), PackedInt32Array(165, 187, 171), PackedInt32Array(164, 154, 162), PackedInt32Array(181, 190, 47), PackedInt32Array(212, 249, 21), PackedInt32Array(21, 249, 54), PackedInt32Array(54, 231, 53), PackedInt32Array(53, 231, 52), PackedInt32Array(52, 245, 51), PackedInt32Array(51, 232, 50), PackedInt32Array(50, 232, 49), PackedInt32Array(49, 192, 47), PackedInt32Array(192, 232, 193), PackedInt32Array(193, 239, 194), PackedInt32Array(194, 235, 195), PackedInt32Array(195, 235, 196), PackedInt32Array(196, 228, 197), PackedInt32Array(197, 233, 198), PackedInt32Array(198, 234, 199), PackedInt32Array(199, 267, 158), PackedInt32Array(158, 267, 186), PackedInt32Array(186, 263, 173), PackedInt32Array(173, 263, 200), PackedInt32Array(200, 238, 201), PackedInt32Array(201, 260, 202), PackedInt32Array(202, 251, 203), PackedInt32Array(203, 265, 204), PackedInt32Array(204, 266, 205), PackedInt32Array(205, 252, 206), PackedInt32Array(206, 255, 191), PackedInt32Array(191, 255, 207), PackedInt32Array(207, 254, 208), PackedInt32Array(208, 268, 209), PackedInt32Array(209, 261, 210), PackedInt32Array(210, 246, 211), PackedInt32Array(211, 249, 212), PackedInt32Array(249, 231, 54), PackedInt32Array(231, 222, 52), PackedInt32Array(245, 216, 51), PackedInt32Array(52, 222, 245), PackedInt32Array(51, 239, 232), PackedInt32Array(232, 192, 49), PackedInt32Array(232, 239, 193), PackedInt32Array(239, 235, 194), PackedInt32Array(235, 228, 196), PackedInt32Array(228, 233, 197), PackedInt32Array(233, 258, 198), PackedInt32Array(234, 267, 199), PackedInt32Array(198, 258, 234), PackedInt32Array(267, 263, 186), PackedInt32Array(263, 224, 200), PackedInt32Array(238, 260, 201), PackedInt32Array(200, 243, 238), PackedInt32Array(260, 251, 202), PackedInt32Array(251, 220, 203), PackedInt32Array(265, 266, 204), PackedInt32Array(203, 220, 265), PackedInt32Array(266, 253, 205), PackedInt32Array(252, 254, 206), PackedInt32Array(205, 253, 252), PackedInt32Array(206, 254, 255), PackedInt32Array(255, 254, 207), PackedInt32Array(254, 221, 208), PackedInt32Array(268, 261, 209), PackedInt32Array(208, 221, 268), PackedInt32Array(261, 262, 210), PackedInt32Array(246, 218, 211), PackedInt32Array(210, 262, 246), PackedInt32Array(211, 218, 249), PackedInt32Array(249, 257, 231), PackedInt32Array(231, 257, 222), PackedInt32Array(216, 235, 51), PackedInt32Array(245, 248, 216), PackedInt32Array(222, 264, 245), PackedInt32Array(51, 235, 239), PackedInt32Array(235, 216, 228), PackedInt32Array(228, 216, 233), PackedInt32Array(233, 216, 258), PackedInt32Array(234, 223, 267), PackedInt32Array(258, 219, 234), PackedInt32Array(267, 223, 263), PackedInt32Array(224, 243, 200), PackedInt32Array(263, 240, 224), PackedInt32Array(238, 247, 260), PackedInt32Array(243, 242, 238), PackedInt32Array(260, 247, 251), PackedInt32Array(251, 237, 220), PackedInt32Array(265, 253, 266), PackedInt32Array(220, 253, 265), PackedInt32Array(252, 221, 254), PackedInt32Array(253, 221, 252), PackedInt32Array(268, 262, 261), PackedInt32Array(221, 225, 268), PackedInt32Array(246, 256, 218), PackedInt32Array(262, 256, 246), PackedInt32Array(218, 257, 249), PackedInt32Array(257, 236, 222), PackedInt32Array(248, 244, 216), PackedInt32Array(245, 213, 248), PackedInt32Array(264, 229, 245), PackedInt32Array(222, 236, 264), PackedInt32Array(216, 219, 258), PackedInt32Array(234, 240, 223), PackedInt32Array(219, 240, 234), PackedInt32Array(223, 240, 263), PackedInt32Array(224, 242, 243), PackedInt32Array(240, 214, 224), PackedInt32Array(238, 242, 247), PackedInt32Array(247, 217, 251), PackedInt32Array(237, 230, 220), PackedInt32Array(251, 217, 237), PackedInt32Array(220, 230, 253), PackedInt32Array(253, 230, 221), PackedInt32Array(268, 225, 262), PackedInt32Array(221, 259, 225), PackedInt32Array(256, 257, 218), PackedInt32Array(262, 269, 256), PackedInt32Array(257, 256, 236), PackedInt32Array(244, 241, 216), PackedInt32Array(248, 226, 244), PackedInt32Array(213, 250, 248), PackedInt32Array(245, 229, 213), PackedInt32Array(264, 269, 229), PackedInt32Array(236, 269, 264), PackedInt32Array(216, 241, 219), PackedInt32Array(219, 241, 240), PackedInt32Array(224, 227, 242), PackedInt32Array(214, 227, 224), PackedInt32Array(240, 241, 214), PackedInt32Array(242, 227, 247), PackedInt32Array(247, 227, 217), PackedInt32Array(237, 215, 230), PackedInt32Array(217, 250, 237), PackedInt32Array(230, 259, 221), PackedInt32Array(225, 215, 262), PackedInt32Array(259, 215, 225), PackedInt32Array(269, 236, 256), PackedInt32Array(262, 215, 269), PackedInt32Array(244, 214, 241), PackedInt32Array(226, 227, 244), PackedInt32Array(248, 250, 226), PackedInt32Array(213, 237, 250), PackedInt32Array(229, 237, 213), PackedInt32Array(269, 237, 229), PackedInt32Array(214, 244, 227), PackedInt32Array(227, 226, 217), PackedInt32Array(215, 259, 230), PackedInt32Array(237, 269, 215), PackedInt32Array(217, 226, 250), PackedInt32Array(174, 185, 176), PackedInt32Array(176, 185, 183), PackedInt32Array(176, 270, 178), PackedInt32Array(178, 270, 162), PackedInt32Array(171, 164, 162), PackedInt32Array(183, 181, 271), PackedInt32Array(271, 181, 47), PackedInt32Array(192, 271, 47), PackedInt32Array(271, 278, 183), PackedInt32Array(183, 276, 176), PackedInt32Array(176, 275, 270), PackedInt32Array(270, 274, 162), PackedInt32Array(162, 277, 272), PackedInt32Array(272, 197, 273), PackedInt32Array(273, 198, 169), PackedInt32Array(169, 199, 158), PackedInt32Array(199, 169, 198), PackedInt32Array(198, 273, 197), PackedInt32Array(197, 272, 196), PackedInt32Array(196, 274, 195), PackedInt32Array(195, 275, 194), PackedInt32Array(194, 278, 193), PackedInt32Array(193, 271, 192), PackedInt32Array(278, 276, 183), PackedInt32Array(271, 193, 278), PackedInt32Array(276, 275, 176), PackedInt32Array(275, 274, 270), PackedInt32Array(274, 277, 162), PackedInt32Array(277, 196, 272), PackedInt32Array(274, 275, 195), PackedInt32Array(196, 277, 274), PackedInt32Array(275, 276, 194), PackedInt32Array(194, 276, 278), PackedInt32Array(165, 171, 279), PackedInt32Array(279, 171, 280), PackedInt32Array(280, 171, 162), PackedInt32Array(162, 282, 280), PackedInt32Array(280, 282, 281), PackedInt32Array(280, 281, 279), PackedInt32Array(279, 281, 165), PackedInt32Array(165, 281, 167), PackedInt32Array(162, 272, 282), PackedInt32Array(282, 272, 273), PackedInt32Array(282, 273, 281), PackedInt32Array(281, 273, 167), PackedInt32Array(167, 273, 169), PackedInt32Array(283, 173, 284), PackedInt32Array(284, 173, 200), PackedInt32Array(284, 200, 285), PackedInt32Array(285, 200, 201), PackedInt32Array(285, 201, 202), PackedInt32Array(285, 202, 286), PackedInt32Array(286, 202, 203), PackedInt32Array(286, 203, 287), PackedInt32Array(287, 203, 204), PackedInt32Array(287, 204, 288), PackedInt32Array(288, 204, 205), PackedInt32Array(288, 205, 206), PackedInt32Array(288, 206, 191), PackedInt32Array(291, 290, 289), PackedInt32Array(294, 295, 292), PackedInt32Array(292, 295, 293), PackedInt32Array(293, 295, 289), PackedInt32Array(289, 295, 291)] +vertices = PackedVector3Array(-33.25, 10.300001, -21.25, -32.5, 9.800001, -21.25, -32.25, 9.900002, -22.25, -28.5, 6.2000003, -17.25, -28.5, 5.9, -16, -27.5, 5.0000005, -15, -35.5, 11.5, -20, -33.5, 10.300001, -20.5, 1.5, 4.6, -33, 2.5, 5.2999997, -33.25, 2.5, 5.7999997, -35.5, 0.5, 3.4, -30, 1.5, 4.0000005, -30.25, -29.5, 7.7000003, -20.25, -29.5, 7.1, -18, -28.833334, 6.6, -18.25, -35.5, 10.5, -35.5, -35.5, 11.1, -32.681816, -35.5, 11.700001, -28.454544, -35.5, 11.800001, -24.227272, -32.575, 10.300001, -23.575, -33.55, 11.1, -27.55, -34.525, 11.1, -31.525, -34.489986, 11.300001, -25.514011, -0.25, 1.7999997, -25.25, 0.5, 2.2999997, -25.5, -0.863636, 2.5000005, -29.556818, -3.590908, 1.9000001, -28.670456, -9.045454, 2.0000005, -26.897728, -14.5, 2.5000005, -25.125, -17.227272, 3.0000005, -24.238636, -22.681818, 4.5000005, -22.465908, -24.045454, 5.2000003, -22.022728, -23.4125, 3.0000005, -16.5375, -20.6875, 2.1, -17.5625, -15.237499, 1.0000005, -19.6125, -8.425001, 0.5999999, -22.175, -2.9749985, 0.7000003, -24.224998, -1.612503, 1.0000005, -24.7375, -1.5049744, 1.5999999, -27.003025, -25.52464, 4.9, -19.495386, -11.989866, 1.5000005, -24.004143, -22.504614, 3.4, -19.523413, -18.014687, 2.1, -20.989334, -27.024517, 4.9, -16.485516, -7.499939, 1.2999997, -25.520065, -24.004734, 4.6, -20.983284, -16.479794, 2.1, -22.48822, -23.994541, 3.6, -18.00749, 0.1521759, 3.7000003, -32.445652, -2.54348, 2.7000003, -31.336956, -7.934782, 2.5000005, -29.119564, -13.326088, 2.7999997, -26.902174, -17.369564, 3.4, -25.23913, -21.413044, 4.4, -23.576088, -25.456522, 5.7000003, -21.913044, -26.804348, 6.4, -21.358696, -31.5, 9.400002, -22.25, -32.3, 10.300001, -24.9, -33.1, 10.900002, -27.55, -34.3, 11, -31.525, 1.0384598, 4.7999997, -35.5, -1.8846169, 3.7999997, -35.5, -4.8076935, 3.9, -35.5, -10.653847, 4.9, -35.5, -20.884615, 7.7000003, -35.5, -26.73077, 8.700001, -35.5, -26.993818, 7.9, -26.998264, -31.499216, 10.200001, -30.01084, -30.023554, 8.300001, -22.50655, -22.52464, 7.4, -32.995388, -27.009409, 8.6, -31.486631, -25.498974, 7.4, -28.491096, -27.003529, 6.6, -22.484573, -21.004131, 6.2000003, -29.983929, -17.999336, 5.6, -31.52071, -29.97871, 9, -25.499382, -28.519964, 9.1, -34.49204, -31.498856, 10.1, -26.981226, -16.499096, 4.7999997, -30.000969, -24.023794, 6.5000005, -26.97629, -22.47895, 6.2000003, -28.519123, -22.489143, 6.7000003, -29.994915, -8.989264, 3.2999997, -31.504787, -6.0192413, 2.9, -31.482813, -17.983746, 4.1, -26.982342, -25.508806, 7.1, -26.987278, -25.493576, 6.4, -23.978523, -24.008564, 5.6, -24.017536, 0.75, 0.5000005, -21.75, -0.25, 0.7000003, -22.5, -3.1184235, 0.2999997, -21.710526, -8.855263, 0.2999997, -20.131578, -13.157894, 0.5000005, -18.947369, -17.460526, 1.0999999, -17.763157, -20.328947, 1.7999997, -16.973684, -23.197369, 2.7999997, -16.18421, -24.675, 3.4, -15.674999, -21.85, 2.2999997, -16.35, -20.4375, 1.7999997, -16.6875, -16.2, 0.7999997, -17.7, -11.9625, 0.2999997, -18.7125, -9.137501, 0.20000029, -19.3875, -2.0750008, 0.20000029, -21.075, -0.25, 1.2999997, -23.875, 9.25, 10.700001, -35.5, 9.5, 10.700001, -33, 10.5, 11.300001, -32.25, 35.5, 12.6, -35.5, 31.125, 12.6, -35.5, 28.208328, 11.5, -35.5, 22.375, 11.400002, -35.5, 20.916668, 11.700001, -35.5, 19.458336, 12.400002, -35.5, 18, 12.6, -35.5, 13.625, 12.5, -35.5, 12.166668, 12.1, -35.5, 9.375, 10.6, -34.25, 13.441177, 12.400002, -32.632355, 14.911766, 12.6, -32.82353, 17.852943, 12.6, -33.205883, 20.794117, 11.5, -33.588234, 22.264706, 11.400002, -33.77941, 28.147057, 11.5, -34.544117, 31.088234, 12.6, -34.92647, 10.474998, 11.400002, -34.525, 10.5, 11.1, -28, 11.5, 11.6, -27.25, 35.5, 12.6, -25.5, 12.911766, 12.200001, -27.147058, 15.735294, 12.6, -26.941177, 17.14706, 12.5, -26.838234, 18.558823, 11.800001, -26.735294, 19.970589, 11.400002, -26.632353, 27.029411, 11.300001, -26.117647, 28.441177, 11.400002, -26.014706, 31.26471, 12.5, -25.808823, 14.995506, 12.6, -28.513542, 19.500542, 11.5, -28.48058, 16.480518, 12.6, -28.502556, 12.005096, 12, -31.487103, 29.975243, 12.300001, -31.505259, 28.490227, 11.6, -31.516245, 31.510254, 12.6, -31.49427, 18.01553, 12.200001, -28.491568, 20.985554, 11.300001, -28.519594, 27.005219, 11.400002, -31.477232, 13.4901085, 12.5, -31.476116, 19.480156, 11.700001, -31.482166, 17.995144, 12.5, -31.493155, 11.5, 11.6, -25.5, 12.911766, 12.200001, -25.5, 15.735294, 12.6, -25.5, 17.14706, 12.5, -25.5, 19.970589, 11.300001, -25.5, 28.441177, 11.300001, -25.5, 31.26471, 12.5, -25.5, 1.75, 0.5000005, -21.5, 1.5, 0.7999997, -22, -18.5, 2.9, 19.75, -18.5, 3.2999997, 20.5, -17.75, 2.9, 20.5, -7.75, 5.1, 30.5, -8, 5.7999997, 31.5, -7.5, 5.7999997, 31.75, -3.5, 5.7000003, 32.75, -5.625, 5.2000003, 31.625, -6.166666, 5.6, 32.083336, -20.5, 2.6, 16.75, -20.5, 2.9, 17.5, -19.5, 2.5000005, 17.75, -17.5, 3.2999997, 21.5, -16.75, 2.9, 21.5, -11.75, 3.7000003, 26.5, -11.5, 4.2000003, 27.5, -10.75, 4.0000005, 27.5, -10.5, 4.6, 28.5, -9.75, 4.2999997, 28.5, -16.5, 3.2999997, 22.5, -15.5, 3.0000005, 22.75, -23.5, 2.2999997, 10.75, -23.5, 2.7000003, 12, -22.5, 2.2999997, 12.75, -22.5, 2.7000003, 14, -21.5, 2.4, 14.75, -21.5, 2.9, 16, -19.5, 3.1, 19, 18.75, 4.2000003, 26.5, 19, 3.7000003, 25.5, 17.75, 3.1, 24.5, -0.71875, 4.7999997, 31.96875, 2.0625, 4.2000003, 31.1875, 4.84375, 3.7999997, 30.40625, 9.015625, 3.5000005, 29.234375, 14.578125, 3.6, 27.671875, 15.09375, 2.7999997, 25.53125, 7.125, 3.0000005, 28.625, 3.140625, 3.6, 30.171875, 0.484375, 4.2000003, 31.203125, 20.5, -0.6999998, 19.75, 20.5, -0.4000001, 21, 21.5, -0.8000002, 21.75, 28.75, -0.9000001, 22.25, 21.875, -0.9000001, 20.166668, 31.5, -0.5, -18, 32.5, -0.099999905, -18.25, 32.5, -0.099999905, -20, 32, -0.19999981, -20.5, 3.75, 0.20000029, -20.5, 3, 0.5999999, -21.5, 17.75, 0.7000003, 18.75, 19.5, -0.3000002, 18.75, 28.5, -0.8000002, 11, 30.5, -0.5, -9.75, 30.5, -0.4000001, -15, 24.380001, -0.6999998, 1.2000008, 20.3, -0.6999998, 12, 18.77, -0.3000002, 16.05, 18.259998, 0, 17.400002, 20.625, -0.8000002, 17.78125, -3.5, 6.6, 34, -5.5, 7.1, 34.25, -5.75, 7.9, 35.5, 24.75, 9.900002, 35.5, 25, 9.400002, 34.5, 22.75, 8.1, 32.5, 15.458332, 6.5000005, 32.916664, 6.708336, 5.7000003, 33.416664, 5.25, 5.9, 33.5, 2.333332, 5.7999997, 33.666664, -2.041668, 6.2000003, 33.916664, 0.059524536, 7.2000003, 35.5, 2.9642868, 7.1, 35.5, 10.226192, 7.2000003, 35.5, 14.583336, 7.6, 35.5, 21.845238, 9, 35.5, 10.500061, 6.7999997, 34.479935, 17.97512, 7.9, 34.48487, 2.9749985, 6.5000005, 34.475, -25.5, 2.2999997, 4.75, -25.5, 2.7000003, 7, -24.5, 2.2000003, 7.75, -24.5, 2.7000003, 10, -23.833332, 2.2000003, 9.75, 31.5, 0, -15.25, -23.238636, 2.6, -15.75, -20.397728, 1.5999999, -16.25, -16.136364, 0.5999999, -17, -11.875, 0.20000029, -17.75, 29.5, -0.6999998, 5, 30.5, -0.5999999, -3, 23, 7.7000003, 31.5, 20.75, 6.2000003, 29.5, 17.897057, 5.6, 30.029411, 13.617645, 5.1, 30.823532, 7.911766, 4.9, 31.882355, 0.7794113, 5.5000005, 33.20588, -2.0735283, 6.1, 33.73529, 14.974998, 5.7999997, 31.474998, 17.995026, 6.5000005, 31.496971, 21, 5.6, 28.5, 10.515049, 4.2999997, 30.018951, -7.5, 6.2999997, 32.5, -4.833334, 5.7000003, 32.666664, -15.5, 3.7000003, 24, -13, 4.2000003, 26.5, -13.833334, 3.7999997, 25.666668, -6.700001, 4.2999997, 29.75, -10.966667, 3.0000005, 25.75, -15.233334, 2.2999997, 21.75, -8.214285, 4.2000003, 29.178574, -5.8571434, 4.7999997, 30.964287, -26.456522, 3.2000003, -10.72826, -25.413044, 2.0000005, -6.456522, -24.717392, 1.4000001, -3.608696, -23.673912, 0.9000001, 0.663044, -21.934782, 0.7999997, 7.782608, -21.23913, 1.0000005, 10.630432, -20.195652, 1.5999999, 14.902176, -2.25, 4.9, 31.926468, 1.5, 3.2000003, 29.45588, 5.25, 2.0000005, 26.985294, 10.25, 1.2999997, 23.691177, 16.5, 1.0999999, 19.573528, 19.236843, -0.5, -17.31579, 13.605263, 0.2999997, -18.473684, -19.518276, 0.4000001, -10.503845, -7.486103, 0.20000029, 19.483475, 16.497944, 0.20000029, 13.515495, -4.5103207, 1.5999999, 25.497635, -14.981428, 0.7999997, 17.98682, 3.009224, 0.20000029, 20.980125, -10.510681, 1.2999997, 22.51802, -20.98972, 0.20000029, 2.9873466, 1.5095825, 0.7999997, 24.009739, -22.498734, 1.4000001, -12.021355, 21.006329, -0.6999998, 5.9932213, 18.020233, 0.099999905, 1.4933968, -18.017647, 0.2999997, 11.977127, -22.50124, 0.5000005, -2.9970284, 20.990257, -0.5999999, 1.5153732, 17.99659, 0.099999905, -12.024704, 21.016617, -0.5, -12.002729, -22.487457, 0.7999997, -7.5067234, -25.514204, 3.2000003, -13.499851, 10.484283, 0.5999999, 20.985062, 16.498547, 0.4000001, 16.514847, 4.4796066, 0.9000001, 23.981712, -19.524157, 0.7000003, -13.505903, -4.5206337, 0.5999999, 22.51197, -7.515236, 2.7999997, 27.024544, -4.500128, 3.1, 28.52343, -10.506128, 0.4000001, 19.511501, -13.47591, 1.4000001, 21.009266, -6.015476, 1.2000003, 24.004803, -24.023312, 1.7999997, -10.486807, -21.003288, 0.7000003, -10.514833, 17.995384, -0.4000001, -16.523413, -21.016228, 0.20000029, -2.9860382, -9.020874, 0.5999999, 20.99223, -8.9855, 1.5999999, 23.982826, 17.982956, 0, 13.476479, 0.00982666, 2.0000005, 26.97948, 18.022644, 0, 11.990814, -16.504131, 0.20000029, -13.483929, -1.4801025, 2.7999997, 28.4954, 10.513775, 0.20000029, 18.023602, -2.995453, 0.9000001, 23.976776, -23.98206, 1.2000003, -5.99415, -16.521719, 0.7999997, 16.523132, -16.516441, 1.2999997, 17.975834, -22.506638, 0.5999999, -4.5096016, -21.012035, 0.2999997, -6.022175, -1.4958153, 0.20000029, 20.997162, 18.618423, -0.5, -20.5, 17.13158, -0.3000002, -20.5, 14.157894, 0.5999999, -20.5, 9.697369, 0.2999997, -20.5, 30.010132, -0.5, -19.50414, 17.980038, -0.5, -19.492039, -21.75, 2.1, 14, 29.5, -0.3000002, 10.75, 31.5, -0.099999905, -3.25, 31.5, 0, -9, 17.75, 1.0000005, 20.1875, 10.520084, 2.0000005, 25.501911, 13.515049, 1.9000001, 24.018948, 16.495026, 2.0000005, 22.496975, -26.5, 2.5000005, -2.25, -26.5, 2.9, 4, -25.7, 2.1, 3.3499985, -26.5, 2.4, 0.25, 21.75, -0.5999999, 23, 23.150002, -0.9000001, 22.849998, -8.708334, 4.2999997, 29.208336, 30.5, -0.3000002, 4.75, -27.166668, 3.6, -10.75, -26.944445, 3.0000005, -7.916666, -27.5, 3.2000003, -3, -27.5, 3.6, -9.666666, -5.916666, 4.9, 31, 28.71875, -0.9000001, 20.84375, 28.65625, -0.4000001, 18.03125, 26.990108, -0.9000001, 18.023884, 34.5, 8.400002, 21.75, 34.5, 8.800001, 23, 35.5, 9.400002, 23.75, 35.5, 4.9, 3, 34.5, 4.4, 3.25, 34.5, 5.5000005, 10.25, 34.699997, 5.2000003, 8.799999, 33.5, 5.0000005, 10.5, 33.5, 7.7000003, 21, 34.5, 6.4, 14.5625, 33.5, 5.9, 14.4375, 35.5, 6.5000005, 13.375, 35.5, 5.6, 8.928574, 29.5, -0.9000001, 24.25, 29.5, -0.8000002, 23, 23.5, -0.9000001, 24.75, 23.5, -0.5999999, 26, 25.25, -1, 27.5, 25.474998, -1, 25.474998, 30.75, -1, 26.25, 31, -0.8000002, 25.5, 26.5, -1, 28.75, 26.5, -0.6999998, 30, 28.5, -1, 31.75, 33.5, -1, 30.25, 33.5, -0.5999999, 29, 31.51001, -1, 28.485985, 28.5, -0.6999998, 33, 30.5, -1.0999999, 34.75, 35.5, -1.0999999, 35.5, 35.5, -1, 32, 30.5, -1, 35.5, -34.5, 21.800001, 32.25, -35.5, 22.300001, 31.25, -35.5, 22.400002, 35.5, -31.5, 20.400002, 34, -33.5, 21.2, 32, -31.25, 20.5, 35.5, -32.666668, 21.2, 35.5) +polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(5, 4, 3), PackedInt32Array(6, 0, 7), PackedInt32Array(10, 9, 8), PackedInt32Array(8, 12, 11), PackedInt32Array(3, 14, 15), PackedInt32Array(15, 14, 13), PackedInt32Array(22, 17, 16), PackedInt32Array(17, 22, 18), PackedInt32Array(18, 23, 19), PackedInt32Array(19, 0, 6), PackedInt32Array(0, 20, 2), PackedInt32Array(20, 23, 21), PackedInt32Array(21, 18, 22), PackedInt32Array(23, 20, 19), PackedInt32Array(18, 21, 23), PackedInt32Array(19, 20, 0), PackedInt32Array(11, 25, 24), PackedInt32Array(24, 39, 11), PackedInt32Array(11, 39, 26), PackedInt32Array(26, 39, 27), PackedInt32Array(27, 45, 28), PackedInt32Array(28, 41, 29), PackedInt32Array(29, 47, 30), PackedInt32Array(30, 43, 31), PackedInt32Array(31, 46, 32), PackedInt32Array(32, 40, 13), PackedInt32Array(13, 40, 15), PackedInt32Array(15, 44, 3), PackedInt32Array(3, 44, 5), PackedInt32Array(5, 44, 33), PackedInt32Array(33, 48, 34), PackedInt32Array(34, 43, 35), PackedInt32Array(35, 41, 36), PackedInt32Array(36, 45, 37), PackedInt32Array(37, 39, 38), PackedInt32Array(38, 39, 24), PackedInt32Array(39, 37, 27), PackedInt32Array(45, 41, 28), PackedInt32Array(27, 37, 45), PackedInt32Array(41, 47, 29), PackedInt32Array(47, 43, 30), PackedInt32Array(43, 42, 31), PackedInt32Array(46, 40, 32), PackedInt32Array(31, 42, 46), PackedInt32Array(40, 44, 15), PackedInt32Array(44, 48, 33), PackedInt32Array(48, 42, 34), PackedInt32Array(43, 47, 35), PackedInt32Array(34, 42, 43), PackedInt32Array(41, 45, 36), PackedInt32Array(35, 47, 41), PackedInt32Array(46, 48, 40), PackedInt32Array(42, 48, 46), PackedInt32Array(40, 48, 44), PackedInt32Array(8, 11, 49), PackedInt32Array(49, 11, 26), PackedInt32Array(49, 26, 50), PackedInt32Array(50, 26, 27), PackedInt32Array(50, 27, 51), PackedInt32Array(51, 27, 28), PackedInt32Array(51, 28, 52), PackedInt32Array(52, 28, 29), PackedInt32Array(52, 29, 53), PackedInt32Array(53, 29, 30), PackedInt32Array(53, 30, 54), PackedInt32Array(54, 30, 31), PackedInt32Array(54, 31, 32), PackedInt32Array(54, 32, 55), PackedInt32Array(55, 32, 56), PackedInt32Array(56, 32, 13), PackedInt32Array(2, 20, 57), PackedInt32Array(57, 20, 58), PackedInt32Array(58, 20, 59), PackedInt32Array(59, 20, 21), PackedInt32Array(59, 21, 60), PackedInt32Array(60, 21, 22), PackedInt32Array(60, 22, 16), PackedInt32Array(8, 61, 10), PackedInt32Array(61, 49, 62), PackedInt32Array(62, 50, 63), PackedInt32Array(63, 83, 64), PackedInt32Array(64, 75, 65), PackedInt32Array(65, 70, 66), PackedInt32Array(66, 77, 16), PackedInt32Array(16, 77, 60), PackedInt32Array(60, 68, 59), PackedInt32Array(59, 78, 58), PackedInt32Array(58, 69, 57), PackedInt32Array(57, 69, 13), PackedInt32Array(13, 73, 56), PackedInt32Array(56, 73, 55), PackedInt32Array(55, 88, 54), PackedInt32Array(54, 85, 53), PackedInt32Array(53, 85, 52), PackedInt32Array(52, 83, 51), PackedInt32Array(51, 84, 50), PackedInt32Array(50, 62, 49), PackedInt32Array(49, 61, 8), PackedInt32Array(50, 84, 63), PackedInt32Array(83, 79, 64), PackedInt32Array(63, 84, 83), PackedInt32Array(75, 70, 65), PackedInt32Array(64, 79, 75), PackedInt32Array(70, 71, 66), PackedInt32Array(66, 71, 77), PackedInt32Array(77, 68, 60), PackedInt32Array(68, 78, 59), PackedInt32Array(78, 76, 58), PackedInt32Array(58, 76, 69), PackedInt32Array(69, 73, 13), PackedInt32Array(73, 87, 55), PackedInt32Array(88, 80, 54), PackedInt32Array(55, 87, 88), PackedInt32Array(54, 81, 85), PackedInt32Array(85, 79, 52), PackedInt32Array(83, 84, 51), PackedInt32Array(52, 79, 83), PackedInt32Array(75, 74, 70), PackedInt32Array(79, 74, 75), PackedInt32Array(70, 82, 71), PackedInt32Array(71, 68, 77), PackedInt32Array(68, 67, 78), PackedInt32Array(78, 67, 76), PackedInt32Array(76, 73, 69), PackedInt32Array(73, 76, 87), PackedInt32Array(80, 81, 54), PackedInt32Array(88, 86, 80), PackedInt32Array(87, 86, 88), PackedInt32Array(81, 74, 85), PackedInt32Array(85, 74, 79), PackedInt32Array(74, 82, 70), PackedInt32Array(82, 72, 71), PackedInt32Array(71, 67, 68), PackedInt32Array(67, 87, 76), PackedInt32Array(80, 72, 81), PackedInt32Array(86, 72, 80), PackedInt32Array(87, 67, 86), PackedInt32Array(81, 82, 74), PackedInt32Array(72, 67, 71), PackedInt32Array(82, 81, 72), PackedInt32Array(86, 67, 72), PackedInt32Array(89, 103, 90), PackedInt32Array(90, 103, 91), PackedInt32Array(91, 103, 92), PackedInt32Array(92, 103, 102), PackedInt32Array(92, 102, 101), PackedInt32Array(92, 101, 93), PackedInt32Array(93, 101, 100), PackedInt32Array(93, 100, 94), PackedInt32Array(94, 100, 95), PackedInt32Array(95, 100, 99), PackedInt32Array(95, 99, 98), PackedInt32Array(95, 98, 96), PackedInt32Array(96, 98, 97), PackedInt32Array(96, 97, 5), PackedInt32Array(24, 104, 38), PackedInt32Array(38, 104, 90), PackedInt32Array(38, 90, 37), PackedInt32Array(37, 90, 91), PackedInt32Array(37, 91, 36), PackedInt32Array(36, 91, 92), PackedInt32Array(36, 92, 93), PackedInt32Array(36, 93, 35), PackedInt32Array(35, 93, 94), PackedInt32Array(35, 94, 95), PackedInt32Array(35, 95, 34), PackedInt32Array(34, 95, 96), PackedInt32Array(34, 96, 33), PackedInt32Array(33, 96, 5), PackedInt32Array(124, 109, 108), PackedInt32Array(109, 124, 110), PackedInt32Array(110, 123, 111), PackedInt32Array(111, 122, 112), PackedInt32Array(112, 121, 113), PackedInt32Array(113, 120, 114), PackedInt32Array(114, 119, 115), PackedInt32Array(115, 118, 116), PackedInt32Array(116, 125, 105), PackedInt32Array(105, 125, 117), PackedInt32Array(117, 125, 106), PackedInt32Array(106, 125, 107), PackedInt32Array(107, 125, 118), PackedInt32Array(118, 115, 119), PackedInt32Array(119, 114, 120), PackedInt32Array(120, 113, 121), PackedInt32Array(121, 112, 122), PackedInt32Array(122, 111, 123), PackedInt32Array(123, 110, 124), PackedInt32Array(118, 125, 116), PackedInt32Array(128, 143, 108), PackedInt32Array(108, 143, 124), PackedInt32Array(124, 141, 123), PackedInt32Array(123, 146, 122), PackedInt32Array(122, 148, 121), PackedInt32Array(121, 148, 120), PackedInt32Array(120, 149, 119), PackedInt32Array(119, 147, 118), PackedInt32Array(118, 140, 107), PackedInt32Array(107, 140, 126), PackedInt32Array(126, 140, 127), PackedInt32Array(127, 140, 129), PackedInt32Array(129, 137, 130), PackedInt32Array(130, 139, 131), PackedInt32Array(131, 144, 132), PackedInt32Array(132, 138, 133), PackedInt32Array(133, 145, 134), PackedInt32Array(134, 142, 135), PackedInt32Array(135, 141, 136), PackedInt32Array(136, 143, 128), PackedInt32Array(143, 141, 124), PackedInt32Array(141, 142, 123), PackedInt32Array(146, 145, 122), PackedInt32Array(123, 142, 146), PackedInt32Array(122, 145, 148), PackedInt32Array(148, 149, 120), PackedInt32Array(149, 139, 119), PackedInt32Array(147, 140, 118), PackedInt32Array(119, 137, 147), PackedInt32Array(140, 147, 129), PackedInt32Array(137, 139, 130), PackedInt32Array(129, 147, 137), PackedInt32Array(139, 144, 131), PackedInt32Array(144, 138, 132), PackedInt32Array(138, 145, 133), PackedInt32Array(145, 146, 134), PackedInt32Array(142, 141, 135), PackedInt32Array(134, 146, 142), PackedInt32Array(141, 143, 136), PackedInt32Array(145, 138, 148), PackedInt32Array(148, 144, 149), PackedInt32Array(139, 137, 119), PackedInt32Array(149, 144, 139), PackedInt32Array(144, 148, 138), PackedInt32Array(127, 129, 150), PackedInt32Array(150, 129, 151), PackedInt32Array(151, 129, 130), PackedInt32Array(151, 130, 152), PackedInt32Array(152, 130, 131), PackedInt32Array(152, 131, 153), PackedInt32Array(153, 131, 132), PackedInt32Array(153, 132, 133), PackedInt32Array(153, 133, 154), PackedInt32Array(154, 133, 134), PackedInt32Array(154, 134, 135), PackedInt32Array(154, 135, 155), PackedInt32Array(155, 135, 136), PackedInt32Array(155, 136, 156), PackedInt32Array(156, 136, 128), PackedInt32Array(89, 158, 157), PackedInt32Array(161, 160, 159), PackedInt32Array(163, 162, 164), PackedInt32Array(164, 162, 167), PackedInt32Array(167, 162, 166), PackedInt32Array(167, 166, 165), PackedInt32Array(170, 169, 168), PackedInt32Array(161, 172, 171), PackedInt32Array(173, 175, 174), PackedInt32Array(175, 177, 176), PackedInt32Array(178, 172, 179), PackedInt32Array(182, 181, 180), PackedInt32Array(184, 183, 182), PackedInt32Array(168, 185, 184), PackedInt32Array(159, 186, 170), PackedInt32Array(188, 187, 189), PackedInt32Array(189, 187, 195), PackedInt32Array(195, 187, 194), PackedInt32Array(195, 194, 193), PackedInt32Array(195, 193, 196), PackedInt32Array(196, 193, 192), PackedInt32Array(196, 192, 197), PackedInt32Array(197, 192, 191), PackedInt32Array(197, 191, 198), PackedInt32Array(198, 191, 190), PackedInt32Array(198, 190, 165), PackedInt32Array(199, 203, 200), PackedInt32Array(200, 203, 201), PackedInt32Array(201, 203, 202), PackedInt32Array(206, 205, 207), PackedInt32Array(207, 205, 204), PackedInt32Array(157, 209, 208), PackedInt32Array(210, 218, 211), PackedInt32Array(211, 218, 219), PackedInt32Array(219, 218, 217), PackedInt32Array(219, 217, 216), PackedInt32Array(219, 216, 212), PackedInt32Array(212, 216, 215), PackedInt32Array(212, 215, 213), PackedInt32Array(213, 215, 214), PackedInt32Array(224, 235, 225), PackedInt32Array(225, 237, 226), PackedInt32Array(226, 236, 227), PackedInt32Array(227, 232, 228), PackedInt32Array(228, 238, 229), PackedInt32Array(229, 231, 230), PackedInt32Array(230, 231, 220), PackedInt32Array(220, 222, 221), PackedInt32Array(222, 220, 231), PackedInt32Array(231, 229, 232), PackedInt32Array(232, 227, 233), PackedInt32Array(233, 236, 234), PackedInt32Array(234, 237, 235), PackedInt32Array(235, 224, 223), PackedInt32Array(235, 237, 225), PackedInt32Array(237, 234, 226), PackedInt32Array(236, 233, 227), PackedInt32Array(226, 234, 236), PackedInt32Array(232, 238, 228), PackedInt32Array(238, 232, 229), PackedInt32Array(241, 240, 239), PackedInt32Array(180, 242, 243), PackedInt32Array(243, 242, 241), PackedInt32Array(204, 244, 214), PackedInt32Array(157, 208, 89), PackedInt32Array(89, 208, 103), PackedInt32Array(103, 208, 102), PackedInt32Array(102, 208, 101), PackedInt32Array(101, 208, 248), PackedInt32Array(101, 248, 100), PackedInt32Array(100, 248, 247), PackedInt32Array(100, 247, 99), PackedInt32Array(99, 247, 246), PackedInt32Array(99, 246, 98), PackedInt32Array(98, 246, 245), PackedInt32Array(98, 245, 97), PackedInt32Array(97, 245, 5), PackedInt32Array(161, 159, 170), PackedInt32Array(170, 168, 184), PackedInt32Array(249, 212, 250), PackedInt32Array(250, 212, 213), PackedInt32Array(257, 230, 220), PackedInt32Array(230, 256, 229), PackedInt32Array(229, 255, 228), PackedInt32Array(228, 255, 227), PackedInt32Array(227, 255, 226), PackedInt32Array(226, 259, 225), PackedInt32Array(225, 252, 251), PackedInt32Array(252, 259, 253), PackedInt32Array(253, 258, 254), PackedInt32Array(254, 226, 255), PackedInt32Array(255, 229, 256), PackedInt32Array(256, 230, 257), PackedInt32Array(259, 252, 225), PackedInt32Array(226, 258, 259), PackedInt32Array(259, 258, 253), PackedInt32Array(258, 226, 254), PackedInt32Array(165, 257, 220), PackedInt32Array(257, 190, 256), PackedInt32Array(256, 192, 255), PackedInt32Array(255, 261, 254), PackedInt32Array(254, 194, 253), PackedInt32Array(253, 260, 252), PackedInt32Array(260, 253, 187), PackedInt32Array(187, 253, 194), PackedInt32Array(194, 261, 193), PackedInt32Array(193, 255, 192), PackedInt32Array(192, 256, 191), PackedInt32Array(191, 256, 190), PackedInt32Array(190, 257, 165), PackedInt32Array(261, 194, 254), PackedInt32Array(255, 193, 261), PackedInt32Array(164, 167, 262), PackedInt32Array(262, 167, 263), PackedInt32Array(263, 167, 165), PackedInt32Array(265, 266, 173), PackedInt32Array(173, 266, 264), PackedInt32Array(173, 264, 179), PackedInt32Array(172, 161, 170), PackedInt32Array(165, 271, 267), PackedInt32Array(267, 271, 270), PackedInt32Array(267, 270, 268), PackedInt32Array(268, 270, 173), PackedInt32Array(268, 173, 179), PackedInt32Array(268, 179, 269), PackedInt32Array(269, 179, 170), PackedInt32Array(245, 304, 5), PackedInt32Array(5, 304, 272), PackedInt32Array(272, 315, 273), PackedInt32Array(273, 328, 274), PackedInt32Array(274, 299, 275), PackedInt32Array(275, 293, 276), PackedInt32Array(276, 298, 277), PackedInt32Array(277, 298, 278), PackedInt32Array(278, 329, 170), PackedInt32Array(170, 330, 269), PackedInt32Array(269, 313, 268), PackedInt32Array(268, 310, 267), PackedInt32Array(267, 311, 165), PackedInt32Array(165, 311, 279), PackedInt32Array(279, 325, 280), PackedInt32Array(280, 322, 281), PackedInt32Array(281, 307, 282), PackedInt32Array(282, 305, 283), PackedInt32Array(283, 306, 210), PackedInt32Array(210, 306, 218), PackedInt32Array(218, 306, 217), PackedInt32Array(217, 321, 216), PackedInt32Array(216, 296, 215), PackedInt32Array(215, 302, 214), PackedInt32Array(214, 302, 284), PackedInt32Array(284, 317, 285), PackedInt32Array(285, 301, 208), PackedInt32Array(208, 297, 248), PackedInt32Array(248, 324, 247), PackedInt32Array(247, 308, 246), PackedInt32Array(246, 308, 245), PackedInt32Array(245, 295, 304), PackedInt32Array(304, 315, 272), PackedInt32Array(315, 303, 273), PackedInt32Array(328, 331, 274), PackedInt32Array(273, 303, 328), PackedInt32Array(299, 318, 275), PackedInt32Array(274, 331, 299), PackedInt32Array(293, 298, 276), PackedInt32Array(275, 318, 293), PackedInt32Array(298, 329, 278), PackedInt32Array(329, 330, 170), PackedInt32Array(330, 290, 269), PackedInt32Array(313, 292, 268), PackedInt32Array(269, 290, 313), PackedInt32Array(310, 311, 267), PackedInt32Array(268, 320, 310), PackedInt32Array(311, 325, 279), PackedInt32Array(325, 322, 280), PackedInt32Array(322, 294, 281), PackedInt32Array(307, 305, 282), PackedInt32Array(281, 294, 307), PackedInt32Array(305, 326, 283), PackedInt32Array(283, 326, 306), PackedInt32Array(306, 321, 217), PackedInt32Array(321, 323, 216), PackedInt32Array(296, 300, 215), PackedInt32Array(216, 323, 296), PackedInt32Array(215, 300, 302), PackedInt32Array(302, 317, 284), PackedInt32Array(317, 301, 285), PackedInt32Array(301, 297, 208), PackedInt32Array(297, 324, 248), PackedInt32Array(324, 308, 247), PackedInt32Array(308, 295, 245), PackedInt32Array(295, 315, 304), PackedInt32Array(315, 316, 303), PackedInt32Array(328, 332, 331), PackedInt32Array(303, 332, 328), PackedInt32Array(299, 331, 318), PackedInt32Array(293, 287, 298), PackedInt32Array(318, 297, 293), PackedInt32Array(298, 290, 329), PackedInt32Array(329, 290, 330), PackedInt32Array(292, 320, 268), PackedInt32Array(313, 312, 292), PackedInt32Array(290, 312, 313), PackedInt32Array(310, 289, 311), PackedInt32Array(320, 314, 310), PackedInt32Array(311, 289, 325), PackedInt32Array(325, 289, 322), PackedInt32Array(322, 327, 294), PackedInt32Array(307, 291, 305), PackedInt32Array(294, 291, 307), PackedInt32Array(305, 291, 326), PackedInt32Array(326, 288, 306), PackedInt32Array(306, 288, 321), PackedInt32Array(321, 288, 323), PackedInt32Array(296, 297, 300), PackedInt32Array(323, 297, 296), PackedInt32Array(300, 297, 302), PackedInt32Array(302, 301, 317), PackedInt32Array(301, 302, 297), PackedInt32Array(297, 318, 324), PackedInt32Array(324, 286, 308), PackedInt32Array(308, 316, 295), PackedInt32Array(295, 316, 315), PackedInt32Array(316, 286, 303), PackedInt32Array(332, 318, 331), PackedInt32Array(303, 286, 332), PackedInt32Array(287, 312, 298), PackedInt32Array(293, 297, 287), PackedInt32Array(298, 312, 290), PackedInt32Array(292, 319, 320), PackedInt32Array(312, 319, 292), PackedInt32Array(310, 314, 289), PackedInt32Array(320, 319, 314), PackedInt32Array(289, 327, 322), PackedInt32Array(327, 333, 294), PackedInt32Array(294, 333, 291), PackedInt32Array(291, 333, 326), PackedInt32Array(326, 297, 288), PackedInt32Array(288, 297, 323), PackedInt32Array(318, 332, 324), PackedInt32Array(286, 316, 308), PackedInt32Array(324, 332, 286), PackedInt32Array(287, 319, 312), PackedInt32Array(297, 333, 287), PackedInt32Array(314, 309, 289), PackedInt32Array(319, 309, 314), PackedInt32Array(289, 309, 327), PackedInt32Array(327, 309, 333), PackedInt32Array(333, 297, 326), PackedInt32Array(287, 309, 319), PackedInt32Array(333, 309, 287), PackedInt32Array(180, 243, 182), PackedInt32Array(182, 243, 241), PackedInt32Array(337, 285, 208), PackedInt32Array(285, 339, 284), PackedInt32Array(284, 338, 214), PackedInt32Array(214, 338, 204), PackedInt32Array(204, 338, 207), PackedInt32Array(207, 338, 334), PackedInt32Array(334, 339, 335), PackedInt32Array(335, 285, 336), PackedInt32Array(336, 285, 337), PackedInt32Array(339, 334, 284), PackedInt32Array(285, 335, 339), PackedInt32Array(284, 334, 338), PackedInt32Array(182, 340, 184), PackedInt32Array(184, 340, 170), PackedInt32Array(249, 341, 212), PackedInt32Array(342, 250, 343), PackedInt32Array(343, 250, 213), PackedInt32Array(179, 172, 170), PackedInt32Array(344, 283, 210), PackedInt32Array(283, 346, 282), PackedInt32Array(282, 345, 281), PackedInt32Array(281, 197, 280), PackedInt32Array(280, 198, 279), PackedInt32Array(279, 198, 165), PackedInt32Array(198, 280, 197), PackedInt32Array(197, 281, 196), PackedInt32Array(196, 345, 195), PackedInt32Array(195, 347, 189), PackedInt32Array(189, 347, 344), PackedInt32Array(344, 347, 283), PackedInt32Array(346, 345, 282), PackedInt32Array(283, 347, 346), PackedInt32Array(345, 196, 281), PackedInt32Array(345, 346, 195), PackedInt32Array(195, 346, 347), PackedInt32Array(239, 349, 350), PackedInt32Array(350, 349, 351), PackedInt32Array(350, 351, 348), PackedInt32Array(352, 201, 353), PackedInt32Array(353, 201, 202), PackedInt32Array(177, 354, 162), PackedInt32Array(162, 354, 166), PackedInt32Array(166, 354, 165), PackedInt32Array(249, 250, 355), PackedInt32Array(170, 340, 278), PackedInt32Array(278, 340, 182), PackedInt32Array(278, 182, 277), PackedInt32Array(277, 182, 276), PackedInt32Array(276, 182, 241), PackedInt32Array(276, 241, 239), PackedInt32Array(276, 239, 350), PackedInt32Array(276, 350, 275), PackedInt32Array(275, 350, 348), PackedInt32Array(275, 348, 274), PackedInt32Array(274, 348, 273), PackedInt32Array(273, 348, 357), PackedInt32Array(273, 357, 272), PackedInt32Array(272, 357, 356), PackedInt32Array(272, 356, 5), PackedInt32Array(5, 356, 359), PackedInt32Array(359, 356, 357), PackedInt32Array(359, 357, 358), PackedInt32Array(358, 357, 348), PackedInt32Array(177, 175, 354), PackedInt32Array(354, 175, 360), PackedInt32Array(354, 360, 165), PackedInt32Array(362, 363, 212), PackedInt32Array(212, 363, 219), PackedInt32Array(219, 199, 211), PackedInt32Array(199, 219, 203), PackedInt32Array(203, 361, 202), PackedInt32Array(361, 363, 362), PackedInt32Array(363, 203, 219), PackedInt32Array(203, 363, 361), PackedInt32Array(165, 360, 271), PackedInt32Array(271, 360, 270), PackedInt32Array(270, 360, 175), PackedInt32Array(270, 175, 173), PackedInt32Array(366, 365, 364), PackedInt32Array(367, 370, 368), PackedInt32Array(368, 370, 369), PackedInt32Array(371, 369, 374), PackedInt32Array(374, 369, 373), PackedInt32Array(374, 373, 372), PackedInt32Array(372, 373, 364), PackedInt32Array(369, 370, 373), PackedInt32Array(373, 370, 367), PackedInt32Array(373, 367, 376), PackedInt32Array(373, 376, 375), PackedInt32Array(373, 375, 364), PackedInt32Array(364, 375, 366), PackedInt32Array(380, 382, 381), PackedInt32Array(381, 382, 377), PackedInt32Array(377, 202, 378), PackedInt32Array(202, 382, 379), PackedInt32Array(379, 382, 380), PackedInt32Array(382, 202, 377), PackedInt32Array(384, 383, 377), PackedInt32Array(377, 383, 381), PackedInt32Array(352, 353, 379), PackedInt32Array(379, 353, 202), PackedInt32Array(389, 390, 383), PackedInt32Array(383, 390, 385), PackedInt32Array(385, 387, 386), PackedInt32Array(387, 390, 388), PackedInt32Array(388, 390, 389), PackedInt32Array(390, 387, 385), PackedInt32Array(391, 387, 392), PackedInt32Array(392, 387, 388), PackedInt32Array(392, 388, 394), PackedInt32Array(392, 394, 393), PackedInt32Array(393, 395, 392), PackedInt32Array(385, 381, 383), PackedInt32Array(398, 397, 396), PackedInt32Array(401, 402, 399), PackedInt32Array(399, 402, 400), PackedInt32Array(400, 402, 396), PackedInt32Array(396, 402, 398)] cell_height = 0.1 agent_height = 1.7 agent_radius = 0.4 diff --git a/world/jajce/JajceWatercourse.gd b/world/jajce/JajceWatercourse.gd new file mode 100644 index 0000000..c57a955 --- /dev/null +++ b/world/jajce/JajceWatercourse.gd @@ -0,0 +1,49 @@ +class_name JajceWatercourse +extends RefCounted + +const WATERFALL_CENTER := Vector2(25.0, -24.0) +const SHELF_TOP_HEIGHT := 12.4 +const UPPER_STREAM_START_Z := -58.0 +const UPPER_STREAM_END_Z := -25.0 +const PLUNGE_POOL_CENTER := Vector2(25.0, -19.5) +const PLUNGE_POOL_BED_HEIGHT := -0.65 +const DOWNSTREAM_START_Z := -20.0 +const DOWNSTREAM_END_Z := 42.0 +const WATER_SURFACE_OFFSET := 0.32 + + +static func downstream_progress(world_z: float) -> float: + return clampf(inverse_lerp(DOWNSTREAM_START_Z, DOWNSTREAM_END_Z, world_z), 0.0, 1.0) + + +static func downstream_center_x(world_z: float) -> float: + var progress := downstream_progress(world_z) + var downstream_curve := smoothstep(0.58, 1.0, progress) * 12.0 + return WATERFALL_CENTER.x + sin(progress * TAU) * 1.4 + downstream_curve + + +static func downstream_half_width(world_z: float) -> float: + var progress := downstream_progress(world_z) + var base_width := lerpf(4.8, 3.8, smoothstep(0.0, 0.62, progress)) + return base_width + smoothstep(0.78, 1.0, progress) * 0.8 + + +static func downstream_bed_height(world_z: float) -> float: + return lerpf(-0.55, -1.3, downstream_progress(world_z)) + + +static func upper_stream_progress(world_z: float) -> float: + return clampf(inverse_lerp(UPPER_STREAM_START_Z, UPPER_STREAM_END_Z, world_z), 0.0, 1.0) + + +static func upper_stream_center_x(world_z: float) -> float: + var progress := upper_stream_progress(world_z) + return WATERFALL_CENTER.x + sin(progress * PI * 1.6) * 0.9 + + +static func upper_stream_half_width(world_z: float) -> float: + return lerpf(2.8, 4.4, smoothstep(0.55, 1.0, upper_stream_progress(world_z))) + + +static func upper_stream_bed_height(world_z: float) -> float: + return lerpf(11.55, 11.15, upper_stream_progress(world_z)) diff --git a/world/jajce/JajceWatercourse.gd.uid b/world/jajce/JajceWatercourse.gd.uid new file mode 100644 index 0000000..93a56f2 --- /dev/null +++ b/world/jajce/JajceWatercourse.gd.uid @@ -0,0 +1 @@ +uid://dl3523bi00bto diff --git a/world/jajce/TerrainRiverRibbon.gd b/world/jajce/TerrainRiverRibbon.gd index 9a63ad9..54ed4ba 100644 --- a/world/jajce/TerrainRiverRibbon.gd +++ b/world/jajce/TerrainRiverRibbon.gd @@ -1,15 +1,16 @@ extends Node3D +const Watercourse := preload("res://world/jajce/JajceWatercourse.gd") + @export var terrain_path := NodePath("../../TerrainRoot/Terrain3D") @export var river_material: Material -@export_range(6.0, 20.0, 0.5) var river_width := 8.0 @export_range(2, 12, 1) var width_segments := 6 @export_range(8, 96, 1) var length_segments := 36 -@export var local_start_z := -25.0 -@export var local_end_z := 40.0 -@export_range(0.05, 0.5, 0.01) var water_offset := 0.18 +@export_range(8, 64, 1) var upper_length_segments := 18 +@export_range(0.05, 0.5, 0.01) var water_offset := Watercourse.WATER_SURFACE_OFFSET @onready var river_ribbon: MeshInstance3D = $RiverRibbon +@onready var upper_river_ribbon: MeshInstance3D = $UpperRiverRibbon func _ready() -> void: @@ -22,22 +23,48 @@ func _build_terrain_ribbon() -> void: push_warning("TerrainRiverRibbon: terrain or material is unavailable") return + river_ribbon.mesh = _build_ribbon( + terrain, + Watercourse.DOWNSTREAM_START_Z, + Watercourse.DOWNSTREAM_END_Z, + length_segments, + false + ) + upper_river_ribbon.mesh = _build_ribbon( + terrain, + Watercourse.UPPER_STREAM_START_Z, + Watercourse.UPPER_STREAM_END_Z, + upper_length_segments, + true + ) + _align_pool_to_terrain(terrain) + + +func _build_ribbon( + terrain: Terrain3D, start_z: float, end_z: float, segment_count: int, is_upper: bool +) -> ArrayMesh: var vertices := PackedVector3Array() var normals := PackedVector3Array() var uvs := PackedVector2Array() var indices := PackedInt32Array() var row_size := width_segments + 1 - for z_index in length_segments + 1: - var progress := float(z_index) / float(length_segments) - var local_z := lerpf(local_start_z, local_end_z, progress) - var downstream_curve := smoothstep(0.58, 1.0, progress) * 12.0 - var center_offset := sin(progress * TAU) * 1.4 + downstream_curve - var downstream_taper := lerpf(1.0, 0.45, smoothstep(0.65, 1.0, progress)) - var half_width := river_width * lerpf(0.52, 0.45, progress) * downstream_taper + for z_index in segment_count + 1: + var progress := float(z_index) / float(segment_count) + var world_z := lerpf(start_z, end_z, progress) + var center_x := ( + Watercourse.upper_stream_center_x(world_z) + if is_upper + else Watercourse.downstream_center_x(world_z) + ) + var half_width := ( + Watercourse.upper_stream_half_width(world_z) + if is_upper + else Watercourse.downstream_half_width(world_z) + ) for x_index in width_segments + 1: var across := float(x_index) / float(width_segments) - var local_x := center_offset + lerpf(-half_width, half_width, across) - var world_sample := to_global(Vector3(local_x, 0.0, local_z)) + var world_x := center_x + lerpf(-half_width, half_width, across) + var world_sample := Vector3(world_x, 0.0, world_z) var terrain_height := terrain.data.get_height(world_sample) if is_nan(terrain_height): terrain_height = global_position.y @@ -47,7 +74,7 @@ func _build_terrain_ribbon() -> void: normals.append(Vector3.UP) uvs.append(Vector2(across, progress)) - for z_index in length_segments: + for z_index in segment_count: for x_index in width_segments: var top_left := z_index * row_size + x_index var top_right := top_left + 1 @@ -66,17 +93,20 @@ func _build_terrain_ribbon() -> void: var mesh := ArrayMesh.new() mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) mesh.surface_set_material(0, river_material) - river_ribbon.mesh = mesh - _align_pool_to_terrain(terrain) + return mesh func _align_pool_to_terrain(terrain: Terrain3D) -> void: var pool := $PlungePool as MeshInstance3D - var pool_sample := to_global(Vector3(pool.position.x, 0.0, pool.position.z)) + var pool_sample := Vector3( + Watercourse.PLUNGE_POOL_CENTER.x, 0.0, Watercourse.PLUNGE_POOL_CENTER.y + ) var pool_height := terrain.data.get_height(pool_sample) if is_nan(pool_height): return var local_surface := to_local(Vector3(pool_sample.x, pool_height + water_offset, pool_sample.z)) - for node_name in [&"PlungePool", &"FoamRing", &"FoamAtFall"]: - var surface := get_node(NodePath(node_name)) as MeshInstance3D - surface.position.y = local_surface.y + pool.position = local_surface + var foam_ring := $FoamRing as MeshInstance3D + foam_ring.position = local_surface + Vector3(0.0, 0.1, 0.0) + var foam_at_fall := $FoamAtFall as MeshInstance3D + foam_at_fall.position = local_surface + Vector3(0.0, 0.13, -2.7) diff --git a/world/jajce/WaterBody.tscn b/world/jajce/WaterBody.tscn index 362b4db..9087864 100644 --- a/world/jajce/WaterBody.tscn +++ b/world/jajce/WaterBody.tscn @@ -17,22 +17,22 @@ rings = 2 [sub_resource type="StandardMaterial3D" id="Material_foam"] transparency = 1 shading_mode = 0 -albedo_color = Color(0.8, 0.93, 0.86, 0.46) +albedo_color = Color(0.8, 0.93, 0.86, 0.22) emission_enabled = true emission = Color(0.34, 0.56, 0.48, 1) -emission_energy_multiplier = 0.18 +emission_energy_multiplier = 0.06 roughness = 0.74 [sub_resource type="TorusMesh" id="Mesh_foam_ring"] material = SubResource("Material_foam") -inner_radius = 4.8 -outer_radius = 5.65 +inner_radius = 5.15 +outer_radius = 5.5 rings = 28 ring_segments = 10 [sub_resource type="PlaneMesh" id="Mesh_foam_patch"] material = SubResource("Material_foam") -size = Vector2(10.5, 2.2) +size = Vector2(6, 1.5) subdivide_width = 8 subdivide_depth = 2 @@ -44,18 +44,18 @@ river_material = SubResource("ShaderMaterial_water") [node name="RiverRibbon" type="MeshInstance3D" parent="."] cast_shadow = 0 +[node name="UpperRiverRibbon" type="MeshInstance3D" parent="."] +cast_shadow = 0 + [node name="PlungePool" type="MeshInstance3D" parent="."] -position = Vector3(0, -0.02, -25) scale = Vector3(1.25, 1, 0.82) mesh = SubResource("Mesh_plunge_pool") [node name="FoamRing" type="MeshInstance3D" parent="."] -position = Vector3(0, 0.09, -25) scale = Vector3(1.25, 0.12, 0.82) cast_shadow = 0 mesh = SubResource("Mesh_foam_ring") [node name="FoamAtFall" type="MeshInstance3D" parent="."] -position = Vector3(0, 0.12, -25.8) cast_shadow = 0 mesh = SubResource("Mesh_foam_patch") diff --git a/world/jajce/WaterfallBody.tscn b/world/jajce/WaterfallBody.tscn index 840fc9d..7b5d65d 100644 --- a/world/jajce/WaterfallBody.tscn +++ b/world/jajce/WaterfallBody.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3] +[gd_scene load_steps=12 format=3] [ext_resource type="Shader" path="res://world/jajce/materials/waterfall.gdshader" id="1_waterfall_shader"] @@ -7,7 +7,7 @@ shader = ExtResource("1_waterfall_shader") [sub_resource type="QuadMesh" id="Mesh_waterfall_body"] material = SubResource("ShaderMaterial_waterfall") -size = Vector2(10.8, 14) +size = Vector2(9.6, 11.4) subdivide_width = 18 subdivide_depth = 28 @@ -32,50 +32,74 @@ size = Vector3(4.8, 5.5, 3.4) [sub_resource type="BoxMesh" id="Mesh_lip"] material = SubResource("Material_rock_moss") -size = Vector3(11.6, 0.7, 3.2) +size = Vector3(10.4, 0.65, 3.0) + +[sub_resource type="StandardMaterial3D" id="Material_lip_foam"] +transparency = 1 +shading_mode = 0 +albedo_color = Color(0.82, 0.95, 0.87, 0.72) +emission_enabled = true +emission = Color(0.46, 0.72, 0.62, 1) +emission_energy_multiplier = 0.22 +roughness = 0.62 + +[sub_resource type="PlaneMesh" id="Mesh_lip_foam"] +material = SubResource("Material_lip_foam") +size = Vector2(9.2, 1.45) +subdivide_width = 8 +subdivide_depth = 2 [node name="WaterfallBody" type="Node3D"] -position = Vector3(25, 8.9, -24) +position = Vector3(25, 5.8, -24) [node name="RockFrame" type="Node3D" parent="."] [node name="WestCliff" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(-7.2, -0.45, -1) +position = Vector3(-6.1, -0.15, -0.9) rotation_degrees = Vector3(0, 8, -3) +scale = Vector3(0.72, 0.86, 0.8) mesh = SubResource("Mesh_cliff_side") [node name="EastCliff" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(7.2, -0.25, -1.2) +position = Vector3(6.2, 0.05, -1.1) rotation_degrees = Vector3(0, -7, 4) +scale = Vector3(0.68, 0.88, 0.76) mesh = SubResource("Mesh_cliff_side") [node name="WestCrownRock" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(-5.0, 7.45, -1.25) +position = Vector3(-4.9, 5.8, -1.2) rotation_degrees = Vector3(8, -14, -11) -scale = Vector3(0.85, 0.62, 0.9) +scale = Vector3(0.82, 0.58, 0.88) mesh = SubResource("Mesh_rock_lobe") [node name="EastCrownRock" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(5.1, 7.55, -1.4) +position = Vector3(4.8, 5.9, -1.35) rotation_degrees = Vector3(-6, 12, 9) -scale = Vector3(0.82, 0.6, 0.86) +scale = Vector3(0.78, 0.58, 0.84) mesh = SubResource("Mesh_rock_lobe") [node name="WestLowerRock" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(-5.9, -4.8, 0.1) +position = Vector3(-5.35, -5.0, 0.15) rotation_degrees = Vector3(7, 14, 12) +scale = Vector3(0.88, 0.72, 0.9) mesh = SubResource("Mesh_rock_lobe") [node name="EastLowerRock" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(6.0, -4.4, 0) +position = Vector3(5.45, -4.75, 0) rotation_degrees = Vector3(-4, -12, -9) +scale = Vector3(0.9, 0.74, 0.88) mesh = SubResource("Mesh_rock_lobe") [node name="RiverLip" type="MeshInstance3D" parent="RockFrame"] -position = Vector3(0, 7.05, 0.2) +position = Vector3(0, 5.42, -0.2) mesh = SubResource("Mesh_lip") +[node name="LipFoam" type="MeshInstance3D" parent="RockFrame"] +position = Vector3(0, 5.74, -0.85) +cast_shadow = 0 +mesh = SubResource("Mesh_lip_foam") + [node name="FallingWater" type="MeshInstance3D" parent="."] -position = Vector3(0, 0, 1.05) +position = Vector3(0, 0, 1.1) cast_shadow = 0 mesh = SubResource("Mesh_waterfall_body") diff --git a/world/jajce/WaterfallMist.tscn b/world/jajce/WaterfallMist.tscn index 6c0abc3..bf3c063 100644 --- a/world/jajce/WaterfallMist.tscn +++ b/world/jajce/WaterfallMist.tscn @@ -1,4 +1,6 @@ -[gd_scene load_steps=4 format=3] +[gd_scene load_steps=5 format=3] + +[ext_resource type="Texture2D" path="res://world/jajce/materials/mist_soft.svg" id="1_mist_texture"] [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_mist"] lifetime_randomness = 0.35 @@ -7,26 +9,27 @@ gravity = Vector3(0, -0.35, 0) initial_velocity_min = 0.25 initial_velocity_max = 1.2 scale_min = 0.08 -scale_max = 2.0 -color = Color(0.82, 0.94, 0.96, 0.35) +scale_max = 1.35 +color = Color(0.82, 0.94, 0.96, 0.22) emission_shape = 1 emission_box_extents = Vector3(5.8, 1.5, 1.35) [sub_resource type="StandardMaterial3D" id="Material_mist"] -albedo_color = Color(0.82, 0.94, 0.96, 0.28) +albedo_color = Color(0.82, 0.94, 0.96, 0.3) transparency = 1 shading_mode = 0 +albedo_texture = ExtResource("1_mist_texture") billboard_mode = 1 cull_mode = 0 [sub_resource type="QuadMesh" id="Mesh_mist"] material = SubResource("Material_mist") -size = Vector2(1.8, 1.8) +size = Vector2(1.45, 1.45) [node name="WaterfallMist" type="GPUParticles3D"] -position = Vector3(25, 2.05, -24) +position = Vector3(25, 0.65, -21.5) emitting = true -amount = 96 +amount = 56 lifetime = 3.0 one_shot = false preprocess = 1.5 diff --git a/world/jajce/materials/mist_soft.svg b/world/jajce/materials/mist_soft.svg new file mode 100644 index 0000000..c351df2 --- /dev/null +++ b/world/jajce/materials/mist_soft.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/world/jajce/materials/mist_soft.svg.import b/world/jajce/materials/mist_soft.svg.import new file mode 100644 index 0000000..e733e52 --- /dev/null +++ b/world/jajce/materials/mist_soft.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0ie27xnkmfd8" +path="res://.godot/imported/mist_soft.svg-8d0454048e96ea4cac3f1157714c34e4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://world/jajce/materials/mist_soft.svg" +dest_files=["res://.godot/imported/mist_soft.svg-8d0454048e96ea4cac3f1157714c34e4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false