From aad319ddb5be108e9ca81d407bd90c843bae502d Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Wed, 14 Sep 2022 23:59:22 -0400 Subject: GUNBRIG HULL PROTOTYPE --- godot/particles/WaterSplash.tscn | 173 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 godot/particles/WaterSplash.tscn (limited to 'godot/particles/WaterSplash.tscn') diff --git a/godot/particles/WaterSplash.tscn b/godot/particles/WaterSplash.tscn new file mode 100644 index 0000000..cdc0a56 --- /dev/null +++ b/godot/particles/WaterSplash.tscn @@ -0,0 +1,173 @@ +[gd_scene load_steps=12 format=2] + +[ext_resource path="res://textures/ripples.png" type="Texture" id=1] + +[sub_resource type="QuadMesh" id=1] + +[sub_resource type="SpatialMaterial" id=2] +flags_transparent = true +flags_unshaded = true +flags_disable_ambient_light = true +vertex_color_use_as_albedo = true +params_blend_mode = 1 +params_cull_mode = 2 +albedo_color = Color( 0.768627, 0.839216, 0.996078, 1 ) +albedo_texture = ExtResource( 1 ) + +[sub_resource type="GDScript" id=4] +resource_name = "ripple_mesh_transparency" +script/source = "extends MeshInstance + +onready var mat : Material = get_active_material(0) +export var alpha = 1.0 + +func _process(_delta): + mat.albedo_color.a = alpha + +func reset_alpha(): + alpha = 1.0 +" + +[sub_resource type="Animation" id=3] +resource_name = "splash" +tracks/0/type = "value" +tracks/0/path = NodePath("ripple_mesh:scale") +tracks/0/interp = 2 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.2, 1 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ Vector3( 0.1, 0.1, 0.1 ), Vector3( 1, 1, 1 ), Vector3( 2, 2, 2 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("ripple_mesh:rotation_degrees") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Vector3( -90, 0, 0 ), Vector3( -90, 10, 0 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("ripple_mesh:alpha") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.7, 1 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ 1.0, 1.0, 0.0 ] +} +tracks/3/type = "method" +tracks/3/path = NodePath(".") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 1 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} +tracks/4/type = "method" +tracks/4/path = NodePath("Particles") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "restart" +} ] +} +tracks/5/type = "method" +tracks/5/path = NodePath("Audio") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ 0.0 ], +"method": "play" +} ] +} + +[sub_resource type="GDScript" id=5] +resource_name = "ripple_mesh_anim" +script/source = "extends AnimationPlayer + +func _ready(): + play(\"splash\")" + +[sub_resource type="Curve" id=9] +_data = [ Vector2( 0, 0.181818 ), 0.0, 0.0, 0, 0, Vector2( 0.212435, 0.209091 ), 0.0, 0.0, 0, 0, Vector2( 0.668394, 0 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="CurveTexture" id=10] +curve = SubResource( 9 ) + +[sub_resource type="ParticlesMaterial" id=6] +emission_shape = 5 +emission_ring_radius = 0.8 +emission_ring_inner_radius = 0.76 +emission_ring_height = 0.0 +emission_ring_axis = Vector3( 0, 1, 0 ) +direction = Vector3( 0, 1, 0 ) +gravity = Vector3( 0, -15, 0 ) +initial_velocity = 5.0 +initial_velocity_random = 0.18 +scale = 0.5 +scale_random = 0.14 +scale_curve = SubResource( 10 ) + +[sub_resource type="SpatialMaterial" id=7] +flags_transparent = true +flags_unshaded = true +params_billboard_mode = 3 +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false +albedo_color = Color( 0.8, 1, 1, 0.780392 ) + +[sub_resource type="QuadMesh" id=8] +material = SubResource( 7 ) + +[node name="WaterSplash" type="Spatial"] + +[node name="ripple_mesh" type="MeshInstance" parent="."] +transform = Transform( 1.96962, -0.347296, -1.51808e-08, 0, -8.74228e-08, 2, -0.347296, -1.96962, -8.60946e-08, 0, 0, 0 ) +mesh = SubResource( 1 ) +material/0 = SubResource( 2 ) +script = SubResource( 4 ) +alpha = 0.0 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/splash = SubResource( 3 ) +script = SubResource( 5 ) + +[node name="Particles" type="Particles" parent="."] +transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 ) +emitting = false +amount = 40 +one_shot = true +explosiveness = 0.96 +process_material = SubResource( 6 ) +draw_pass_1 = SubResource( 8 ) + +[node name="Audio" type="AudioStreamPlayer3D" parent="."] -- cgit v1.2.3