Noise-driven fire light rig with bounce, core, embers and glow
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
extends SceneTree
|
||||
## Cattura il bidone acceso a fasi diverse di flicker e di scarto, per confrontare
|
||||
## ombre, rimbalzo, nucleo, braci e glow. Lo spawn delle ondate viene bloccato e gli
|
||||
## zombie congelati, altrimenti finiscono davanti all'obiettivo e falsano l'immagine.
|
||||
func _initialize() -> void:
|
||||
call_deferred("run_test")
|
||||
|
||||
func run_test() -> void:
|
||||
var world = load("res://scenes/main.tscn").instantiate()
|
||||
root.add_child(world)
|
||||
world.spawning = true # impedisce l'avvio di nuove ondate durante le riprese
|
||||
world.player.set_physics_process(false)
|
||||
world.player.hp = 100000
|
||||
var office = world.get_node("OfficeAtmosphere")
|
||||
var rig = office.fire_rig
|
||||
var shots := [
|
||||
["basso", -1.0, 0.0, Vector3(-4, 0.35, 4)],
|
||||
["alto", 1.0, 0.0, Vector3(-4, 0.35, 4)],
|
||||
["alto-scarto", 1.0, 0.45, Vector3(-4, 0.35, 4)],
|
||||
["insieme", 0.0, 0.2, Vector3(-4, 1.0, 4)],
|
||||
]
|
||||
for shot in shots:
|
||||
for zombie in get_nodes_in_group("live_zombies"):
|
||||
zombie.set_physics_process(false)
|
||||
rig._pulse = shot[1]
|
||||
rig._time = shot[2]
|
||||
rig._apply()
|
||||
world.player.position = Vector3(-1.6, 0.1, 2.9) if shot[0] != "insieme" else Vector3(0, 0.1, -0.5)
|
||||
world.player.look_at(shot[3])
|
||||
await create_timer(0.35).timeout
|
||||
await RenderingServer.frame_post_draw
|
||||
root.get_texture().get_image().save_png("/tmp/zombie-fire-%s.png" % shot[0])
|
||||
print("SHOT: 4 immagini in /tmp/zombie-fire-*.png")
|
||||
world.queue_free()
|
||||
await process_frame
|
||||
quit()
|
||||
Reference in New Issue
Block a user