extends Node ## Captures the actual runtime scene and actual in-game model inspector. var main: Node3D var directory := "res://docs/screenshots/phase10" func _ready() -> void: call_deferred("run") func capture(label: String) -> void: for frame: int in range(12): await get_tree().process_frame await RenderingServer.frame_post_draw var result: Error = get_viewport().get_texture().get_image().save_png(directory + "/" + label + ".png") assert(result == OK) print("ART_CAPTURE: ", label) func run() -> void: DirAccess.make_dir_recursive_absolute(directory) get_window().size = Vector2i(1920,1080) GameState.factions = ["wurzelbund","glutpakt"] GameState.timed_build = false main = preload("res://scenes/main.tscn").instantiate() add_child(main) Soundscape.enabled = false WaveManager.set_physics_process(false) await capture("menu") main._start_match() main._starter() await capture("build") main._show_base() await capture("base") main._show_base() # Studio uses only the same GLBs and shaders that the match uses. for id: String in ["w04","w08","w10","g02","g04"]: main.hud.model_inspector.show_model(id) main.hud.model_inspector._rotate = false main.hud.model_inspector._turntable.rotation.y = -.2 await capture("model-" + id) main.hud.model_inspector.hide_model() main.hud.hide() main._manual_camera = true main.camera.size = 49 main.camera.position = Vector3(35,56,52) main.camera.look_at(Vector3(0,0,1)) await capture("map-overview") await Soundscape.quit_game()