feat(cockpit): replace procedural cockpit with twelve scripted models
Quality Gate / Quality Gate (pull_request) Successful in 9m4s

Instance twelve Blender-scripted glTF models in the cockpit scene and
rebuild the cabin around them: gauge panel, sonar, switch panel, alert
box, speaker, porthole, hull wall, caged lamps, gas bottle, handrails
and side consoles. Presentation only; no domain, application or world
rule changes beyond enabling glow in the test environment.

- Needles, alert lamps and sonar screen are driven by the existing
  snapshots; the alert box now carries SYS/ATTN/ALRM.
- Depth dial reads percent of certified depth.
- Sonar display restyled as a turquoise holographic relief with a
  shader grid and height scale; SubViewport matches the glass (960x604).
- Cabin lighting retuned: warm pooled lamp light, cool porthole rim,
  lamp shadows, dial backlight.
- Procedural stand-ins removed (bulkhead, tanks, consoles, levers,
  indicator columns, placeholder pipe run, dial face PNGs).
- Tests adapted where nodes disappeared; one assertion removed
  (pipe_segment_count) until the pipe kit is placed.
- Model .glb files are committed without LFS; textures Godot extracts
  next to them at import are ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
OlivierandClaude Opus 5.5 committed 2026-10-06 21:36:57 +02:00
1 parent 912123087f
commit 2f9b7c0894
45 files changed
+1353 -1603

No files matched your search

@@ -9,7 +9,6 @@ const CockpitMeshFactory = preload(
)
var _materials: CockpitMaterialPalette
var _tank_count := 0
var _junction_box_count := 0
var _control_count := 0
@@ -17,14 +16,7 @@ var _control_count := 0
func _init(materials: CockpitMaterialPalette) -> void:
_materials = materials
name = "SideEquipment"
_build_left_life_support_bank()
_build_right_electrical_bank()
_build_cable_looms()
_build_control_rails()
func tank_count() -> int:
return _tank_count
func junction_box_count() -> int:
@@ -35,87 +27,11 @@ func control_count() -> int:
return _control_count
func _build_left_life_support_bank() -> void:
var root := Node3D.new()
root.name = "LifeSupportBank"
add_child(root)
for tank_data: Vector3 in [
Vector3(-0.78, 0.55, -1.17),
Vector3(-0.68, 0.47, -1.19),
]:
_add_tank(root, tank_data)
_add_service_box(root, Vector3(-0.61, 0.42, -1.14), "O₂", -10.0)
_add_indicator_column(root, Vector3(-0.55, 0.39, -1.055))
_add_valve_wheel(root, Vector3(-0.66, 0.12, -1.08))
CockpitMeshFactory.add_cylinder_between(
"ManifoldPipe",
root,
Vector3(-0.78, 0.24, -1.13),
Vector3(-0.67, 0.09, -1.11),
0.018,
_materials.copper
)
CockpitMeshFactory.add_cylinder_between(
"ManifoldReturn",
root,
Vector3(-0.68, 0.25, -1.15),
Vector3(-0.59, 0.02, -1.10),
0.014,
_materials.brass
)
func _add_tank(root: Node3D, tank_position: Vector3) -> void:
CockpitMeshFactory.add_cylinder(
"OxygenTank",
root,
tank_position,
0.055,
0.43,
_materials.safety_yellow
)
CockpitMeshFactory.add_sphere(
"TankTop",
root,
tank_position + Vector3(0.0, 0.215, 0.0),
0.055,
_materials.safety_yellow
)
CockpitMeshFactory.add_sphere(
"TankBottom",
root,
tank_position - Vector3(0.0, 0.215, 0.0),
0.055,
_materials.safety_yellow
)
for offset_y: float in [-0.13, 0.13]:
var strap := MeshInstance3D.new()
strap.name = "TankStrap"
var torus := TorusMesh.new()
torus.inner_radius = 0.054
torus.outer_radius = 0.066
torus.rings = 20
torus.ring_segments = 6
strap.mesh = torus
strap.material_override = _materials.dark_steel
strap.position = tank_position + Vector3(0.0, offset_y, 0.0)
root.add_child(strap)
CockpitMeshFactory.add_cylinder(
"TankValve",
root,
tank_position + Vector3(0.0, 0.29, 0.0),
0.017,
0.075,
_materials.brass
)
_tank_count += 1
func _build_right_electrical_bank() -> void:
var root := Node3D.new()
root.name = "ElectricalBank"
# Seated on the flat end cap of the pressure hull, behind the sonar.
root.position = Vector3(0.14, -0.18, -0.055)
add_child(root)
_add_service_box(root, Vector3(0.72, 0.65, -1.17), "ELEC", 11.0)
_add_service_box(root, Vector3(0.73, 0.36, -1.16), "POMPES", 8.0)
@@ -123,17 +39,6 @@ func _build_right_electrical_bank() -> void:
_add_vent(root, Vector3(0.715, 0.40, -1.085))
_add_knob(root, Vector3(0.66, 0.55, -1.08))
_add_knob(root, Vector3(0.68, 0.25, -1.07))
_add_indicator_column(root, Vector3(0.795, 0.49, -1.075))
for pipe_x: float in [0.64, 0.82]:
CockpitMeshFactory.add_cylinder(
"ElectricalConduit",
root,
Vector3(pipe_x, 0.70, -1.20),
0.017,
0.58,
_materials.copper
)
func _add_service_box(
@@ -198,123 +103,3 @@ func _add_knob(root: Node3D, knob_position: Vector3) -> void:
Vector3(90.0, 0.0, 0.0)
)
_control_count += 1
func _add_indicator_column(root: Node3D, center: Vector3) -> void:
var indicator_materials: Array[StandardMaterial3D] = [
_materials.indicator_green,
_materials.indicator_amber,
_materials.indicator_red,
]
for index in 3:
CockpitMeshFactory.add_box(
"PilotLightBezel",
root,
center + Vector3(0.0, (1 - index) * 0.055, -0.004),
Vector3(0.038, 0.038, 0.018),
_materials.dark_steel
)
CockpitMeshFactory.add_sphere(
"PilotLight",
root,
center + Vector3(0.0, (1 - index) * 0.055, 0.010),
0.013,
indicator_materials[index]
)
_control_count += 1
func _add_valve_wheel(root: Node3D, wheel_position: Vector3) -> void:
var wheel := MeshInstance3D.new()
wheel.name = "ValveWheel"
var torus := TorusMesh.new()
torus.inner_radius = 0.034
torus.outer_radius = 0.046
torus.rings = 20
torus.ring_segments = 7
wheel.mesh = torus
wheel.material_override = _materials.signal_red
wheel.position = wheel_position
wheel.rotation_degrees.x = 90.0
root.add_child(wheel)
for angle_degrees: float in [0.0, 45.0, 90.0, 135.0]:
CockpitMeshFactory.add_box(
"ValveSpoke",
root,
wheel_position + Vector3(0.0, 0.0, 0.002),
Vector3(0.075, 0.007, 0.008),
_materials.signal_red,
Vector3(0.0, 0.0, angle_degrees)
)
_control_count += 1
func _build_cable_looms() -> void:
var root := Node3D.new()
root.name = "CableLooms"
add_child(root)
var left_points: Array[Vector3] = [
Vector3(-0.82, 0.93, -1.15),
Vector3(-0.72, 0.87, -1.16),
Vector3(-0.64, 0.73, -1.14),
Vector3(-0.61, 0.58, -1.12),
]
var right_points: Array[Vector3] = [
Vector3(0.84, 0.91, -1.15),
Vector3(0.75, 0.86, -1.16),
Vector3(0.68, 0.73, -1.14),
Vector3(0.65, 0.59, -1.12),
]
_add_cable_path(root, left_points)
_add_cable_path(root, right_points)
func _add_cable_path(root: Node3D, points: Array[Vector3]) -> void:
for point_index in points.size() - 1:
CockpitMeshFactory.add_cylinder_between(
"ArmouredCable",
root,
points[point_index],
points[point_index + 1],
0.012,
_materials.rubber
)
func _build_control_rails() -> void:
var root := Node3D.new()
root.name = "ControlRails"
add_child(root)
CockpitMeshFactory.add_cylinder_between(
"LowerSteelRail",
root,
Vector3(-0.82, -0.34, -1.12),
Vector3(0.82, -0.34, -1.12),
0.026,
_materials.brushed_steel
)
CockpitMeshFactory.add_cylinder_between(
"LeftGrip",
root,
Vector3(-0.58, -0.34, -1.11),
Vector3(-0.18, -0.34, -1.11),
0.034,
_materials.rubber
)
CockpitMeshFactory.add_cylinder_between(
"RightGrip",
root,
Vector3(0.18, -0.34, -1.11),
Vector3(0.58, -0.34, -1.11),
0.034,
_materials.rubber
)
for x: float in [-0.82, 0.82]:
CockpitMeshFactory.add_cylinder_between(
"RailSupport",
root,
Vector3(x, -0.34, -1.12),
Vector3(x, -0.20, -1.08),
0.022,
_materials.brushed_steel
)