Files
tactical-shooter/client/assets/scenes/modular/kit_demo.tscn
T
shawn d631ff784a build: baked lighting pass on kit_demo test map
- Restructured kit_demo.tscn from linear demo to enclosed 5.12x5.12 room
  with walls, floor tiles, pillar, beam, doorway, window
- Added WorldEnvironment with ProceduralSky for ambient lighting
- Added DirectionalLight3D (sun key light, 45° angle, shadows enabled)
- Added OmniLight3D (warm interior fill light)
- Added ReflectionProbe for interior specular reflections
  (box projection, room-sized extents)
- Added LightmapGI with balanced quality settings
  (bounces=3, texel_scale=1.0, max_texture_size=2048, denoiser=true)
- Added tool script (kit_demo.gd) that prints bake status in editor
- Added bake_lighting.gd CLI bake script (requires GPU-enabled instance)
- Updated project.godot with reflection atlas and shadow map quality settings

Headless baking note: Godot's standard editor build requires a GPU/display
for LightmapGI.bake(). Open the scene in the Godot editor and click 'Bake
Lightmap' on the LightmapGI node to generate the baked lightmap data.
2026-07-01 00:10:19 -04:00

189 lines
7.3 KiB
Plaintext

[gd_scene load_steps=23 format=3]
; === External Resources (modular kit pieces) ===
[ext_resource type="PackedScene" path="res://assets/scenes/modular/wall_straight_01.tscn" id="1"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/wall_corner_01.tscn" id="3"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/wall_doorway_01.tscn" id="4"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/wall_window_01.tscn" id="5"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/wall_endcap_01.tscn" id="6"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/floor_tile_01.tscn" id="7"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/floor_tile_ceramic_01.tscn" id="9"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/pillar_01.tscn" id="11"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/beam_01.tscn" id="13"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/accent_blue_panel.tscn" id="15"]
[ext_resource type="PackedScene" path="res://assets/scenes/modular/accent_red_panel.tscn" id="17"]
; === External Resources (materials) ===
[ext_resource type="Material" path="res://assets/materials/wall_concrete_01.tres" id="2"]
[ext_resource type="Material" path="res://assets/materials/floor_concrete_01.tres" id="8"]
[ext_resource type="Material" path="res://assets/materials/floor_tile_01.tres" id="10"]
[ext_resource type="Material" path="res://assets/materials/wall_concrete_02.tres" id="12"]
[ext_resource type="Material" path="res://assets/materials/metal_structural_01.tres" id="14"]
[ext_resource type="Material" path="res://assets/materials/accent_team_blue.tres" id="16"]
[ext_resource type="Material" path="res://assets/materials/accent_team_red.tres" id="18"]
; === Script ===
[ext_resource type="Script" path="res://assets/scenes/modular/kit_demo.gd" id="19"]
; === Subresources (Sky, Environment for WorldEnvironment) ===
[sub_resource type="ProceduralSkyMaterial" id="SkyMat"]
sky_top_color = Color(0.45, 0.55, 0.75)
sky_horizon_color = Color(0.65, 0.6, 0.8)
sky_bottom_color = Color(0.35, 0.35, 0.4)
ground_bottom_color = Color(0.15, 0.15, 0.15)
sky_energy_multiplier = 0.5
sky_exposure = 1.0
[sub_resource type="Sky" id="Sky"]
sky_material = SubResource("SkyMat")
[sub_resource type="Environment" id="Env"]
background_mode = 2
background_sky = SubResource("Sky")
background_sky_custom_fov = 0.0
tonemap_mode = 0
glow_enabled = false
ambient_light_color = Color(0.25, 0.25, 0.3)
ambient_light_energy = 0.4
ambient_light_sky_contribution = 0.5
; === Scene Root ===
[node name="KitDemo" type="Node3D"]
script = ExtResource("19")
; ============ FLOOR ============
; 2x2 grid of floor tiles (5.12 x 5.12)
[node name="FloorNW" type="Node3D" parent="."]
instance = ExtResource("7")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.28, 0, -1.28)
[node name="FloorNE" type="Node3D" parent="."]
instance = ExtResource("7")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.28, 0, -1.28)
[node name="FloorSW" type="Node3D" parent="."]
instance = ExtResource("9")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.28, 0, 1.28)
[node name="FloorSE" type="Node3D" parent="."]
instance = ExtResource("7")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.28, 0, 1.28)
; ============ WALLS ============
; --- South Wall (Z=2.56, along X from -2.56 to +2.56) ---
; Straight segment left of doorway
[node name="SouthWall" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.28, 0, 2.56)
; Doorway segment right
[node name="SouthDoorway" type="Node3D" parent="."]
instance = ExtResource("4")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.28, 0, 2.56)
; --- North Wall (Z=-2.56, along X from -2.56 to +2.56) ---
; Window segment left
[node name="NorthWindow" type="Node3D" parent="."]
instance = ExtResource("5")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.28, 0, -2.56)
; Straight segment right
[node name="NorthWall" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.28, 0, -2.56)
; --- West Wall (X=-2.56, along Z from -2.56 to +2.56) ---
; Rotated 90° Y so width runs along Z instead of X
; Basis: local X → global -Z, local Z → global X
[node name="WestLower" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(0, 0, -1, 0, 1, 0, 1, 0, 0, -2.56, 0, -1.28)
[node name="WestUpper" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(0, 0, -1, 0, 1, 0, 1, 0, 0, -2.56, 0, 1.28)
; --- East Wall (X=2.56, along Z from -2.56 to +2.56) ---
; Rotated 90° Y so width runs along Z, thickness along -X
[node name="EastLower" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 2.56, 0, -1.28)
[node name="EastUpper" type="Node3D" parent="."]
instance = ExtResource("1")
transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 2.56, 0, 1.28)
; ============ INTERIOR ============
; Pillar at room center
[node name="Pillar" type="Node3D" parent="."]
instance = ExtResource("11")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
; Beam overhead spanning the room
[node name="Beam" type="Node3D" parent="."]
instance = ExtResource("13")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.40, 0)
; Accent red panel on south wall straight segment
[node name="AccentRed" type="Node3D" parent="."]
instance = ExtResource("17")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.28, 1.28, 2.52)
; Accent blue panel on east wall upper segment
[node name="AccentBlue" type="Node3D" parent="."]
instance = ExtResource("15")
transform = Transform3D(0, 0, 1, 0, 1, 0, -1, 0, 0, 2.52, 1.28, 0)
; ============ LIGHTING ============
; --- WorldEnvironment: skybox + ambient ---
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Env")
; --- DirectionalLight: sun/moon key light from high angle ---
; Tilted ~45° down, rotated ~30° Y for directional angle
[node name="SunLight" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.866, 0, -0.5, -0.354, 0.707, -0.612, 0.354, 0.707, 0.612, 0, 5, 0)
light_energy = 1.2
light_indirect_energy = 0.8
light_color = Color(1.0, 0.95, 0.9)
shadow_enabled = true
light_bake_mode = 2
directional_shadow_max_distance = 30.0
directional_shadow_split_1 = 0.1
directional_shadow_split_2 = 0.3
directional_shadow_split_3 = 0.6
directional_shadow_blend_splits = true
; --- OmniLight: warm interior fill ---
[node name="FillLight" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 2.4, 1.5)
light_energy = 0.4
light_indirect_energy = 0.5
light_color = Color(1.0, 0.85, 0.7)
light_bake_mode = 2
omni_range = 6.0
omni_attenuation = 0.8
shadow_enabled = false
; --- ReflectionProbe for interior specular reflections ---
[node name="ReflectionProbe" type="ReflectionProbe" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.28, 0)
box_projection = true
interior = true
extents = Vector3(2.8, 1.4, 2.8)
intensity = 1.0
max_distance = 10.0
; --- LightmapGI: baked global illumination ---
[node name="LightmapGI" type="LightmapGI" parent="."]
bounces = 3
bounce_indirect_energy = 1.0
texel_scale = 1.0
texel_subdiv = 4
max_texture_size = 2048
use_denoiser = true
denoiser_strength = 0.0
interior = true