Added Muzzle Flash to Weapon

pull/50/head
unfa 2021-06-18 01:44:08 +02:00
parent df17620149
commit 1e1c5afed2
4 changed files with 449 additions and 5 deletions

View File

@ -0,0 +1,353 @@
{
"connections": [
{
"from": "perlin",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "blend",
"from_port": 0,
"to": "warp",
"to_port": 0
},
{
"from": "perlin_2",
"from_port": 0,
"to": "warp",
"to_port": 1
},
{
"from": "warp",
"from_port": 0,
"to": "tones",
"to_port": 0
},
{
"from": "shape",
"from_port": 0,
"to": "tiler",
"to_port": 0
},
{
"from": "tiler",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "tones",
"from_port": 0,
"to": "blend_2",
"to_port": 1
},
{
"from": "perlin_3",
"from_port": 0,
"to": "warp_2",
"to_port": 1
},
{
"from": "perlin_4",
"from_port": 0,
"to": "warp_2",
"to_port": 0
},
{
"from": "warp_2",
"from_port": 0,
"to": "blend_2",
"to_port": 0
},
{
"from": "blend_2",
"from_port": 0,
"to": "tones_2",
"to_port": 0
},
{
"from": "tones_2",
"from_port": 0,
"to": "Material",
"to_port": 0
}
],
"label": "Graph",
"longdesc": "",
"name": "@@268",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"export_paths": {
},
"name": "Material",
"node_position": {
"x": 567.764099,
"y": -109.414322
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao": 1,
"depth_scale": 0.5,
"emission_energy": 1,
"flags_transparent": false,
"metallic": 1,
"normal": 1,
"roughness": 1,
"size": 11,
"sss": 0
},
"type": "material"
},
{
"name": "shape",
"node_position": {
"x": -1432,
"y": 104.5
},
"parameters": {
"edge": 1,
"radius": 1,
"shape": 0,
"sides": 2
},
"type": "shape"
},
{
"name": "perlin",
"node_position": {
"x": -1142,
"y": -197.5
},
"parameters": {
"iterations": 7,
"persistence": 0.5,
"scale_x": 4,
"scale_y": 4
},
"seed_value": 54413,
"type": "perlin"
},
{
"name": "blend",
"node_position": {
"x": -804,
"y": -17.5
},
"parameters": {
"amount": 1,
"blend_type": 2
},
"type": "blend"
},
{
"name": "warp",
"node_position": {
"x": -475,
"y": -18.5
},
"parameters": {
"amount": 0.1,
"eps": 0.1,
"mode": 0
},
"type": "warp"
},
{
"name": "perlin_2",
"node_position": {
"x": -1139.5,
"y": 357.5
},
"parameters": {
"iterations": 3,
"persistence": 0.55,
"scale_x": 8,
"scale_y": 8
},
"seed_value": -30602,
"type": "perlin"
},
{
"name": "tones",
"node_position": {
"x": -237,
"y": -20.5
},
"parameters": {
"in_max": {
"a": 1,
"b": 0.397933,
"g": 0.397933,
"r": 0.397933,
"type": "Color"
},
"in_mid": {
"a": 0.5,
"b": 0.15,
"g": 0.15,
"r": 0.15,
"type": "Color"
},
"in_min": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
},
"out_max": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"out_min": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
}
},
"type": "tones"
},
{
"name": "tiler",
"node_position": {
"x": -1169,
"y": -9.5
},
"parameters": {
"fixed_offset": 0,
"offset": 0,
"overlap": 2,
"rotate": 0,
"scale": 0,
"scale_x": 0.5,
"scale_y": 0.5,
"select_inputs": 0,
"tx": 2,
"ty": 2,
"value": 0
},
"type": "tiler"
},
{
"name": "perlin_3",
"node_position": {
"x": -574,
"y": -321.5
},
"parameters": {
"iterations": 6,
"persistence": 0.35,
"scale_x": 32,
"scale_y": 32
},
"type": "perlin"
},
{
"name": "blend_2",
"node_position": {
"x": 58,
"y": -98.5
},
"parameters": {
"amount": 0.62,
"blend_type": 2
},
"type": "blend"
},
{
"name": "perlin_4",
"node_position": {
"x": -575.5,
"y": -459.5
},
"parameters": {
"iterations": 6,
"persistence": 0.35,
"scale_x": 16,
"scale_y": 16
},
"type": "perlin"
},
{
"name": "warp_2",
"node_position": {
"x": -199,
"y": -341.5
},
"parameters": {
"amount": 0.045,
"eps": 0.1,
"mode": 0
},
"seed_value": 53979,
"type": "warp"
},
{
"name": "tones_2",
"node_position": {
"x": 316,
"y": -108.5
},
"parameters": {
"in_max": {
"a": 1,
"b": 0.785433,
"g": 0.785433,
"r": 0.785433,
"type": "Color"
},
"in_mid": {
"a": 0.5,
"b": 0.36875,
"g": 0.36875,
"r": 0.36875,
"type": "Color"
},
"in_min": {
"a": 0,
"b": 0.225,
"g": 0.225,
"r": 0.225,
"type": "Color"
},
"out_max": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"out_min": {
"a": 0,
"b": 0,
"g": 0,
"r": 0,
"type": "Color"
}
},
"type": "tones"
}
],
"parameters": {
},
"shortdesc": "",
"type": "graph"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="StreamTexture2D"
path.s3tc="res://.godot/imported/Flash.png-bc217ae12b8c092e2603510deb56714d.s3tc.stex"
path.etc2="res://.godot/imported/Flash.png-bc217ae12b8c092e2603510deb56714d.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}
[deps]
source_file="res://Assets/Weapons/VFX/Flash.png"
dest_files=[ "res://.godot/imported/Flash.png-bc217ae12b8c092e2603510deb56714d.s3tc.stex", "res://.godot/imported/Flash.png-bc217ae12b8c092e2603510deb56714d.etc2.stex" ]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
compress/streamed=false
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/HDR_as_SRGB=false
process/size_limit=0
detect_3d/compress_to=0
svg/scale=1.0

View File

@ -1,13 +1,68 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=11 format=2]
[ext_resource path="res://Assets/Weapons/Handgun/Handgun.gltf" type="PackedScene" id=1]
[ext_resource path="res://Assets/Weapons/Weapon.gd" type="Script" id=2]
[ext_resource path="res://Assets/Weapons/VFX/Flash.png" type="Texture2D" id=3]
[sub_resource type="Gradient" id=4]
offsets = PackedFloat32Array( 0, 0.148551, 0.438406, 0.757246, 1 )
colors = PackedColorArray( 1, 1, 1, 1, 1, 0.936768, 0.421875, 1, 0.90625, 0.568287, 0.240723, 1, 0.242188, 0.127472, 0.0652771, 1, 0, 0, 0, 1 )
[sub_resource type="GradientTexture" id=5]
gradient = SubResource( 4 )
[sub_resource type="Curve" id=6]
_data = [ Vector2( 0, 0 ), 0.0, 12.0808, 0, 0, Vector2( 0.200669, 0.954545 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), -1.63091, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=7]
curve = SubResource( 6 )
[sub_resource type="ParticlesMaterial" id=1]
spread = 15.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 5.0
initial_velocity_random = 0.75
damping = 4.0
scale = 0.3
scale_curve = SubResource( 7 )
color_ramp = SubResource( 5 )
anim_offset = 1.0
anim_offset_random = 1.0
attractor_interaction_enabled = false
[sub_resource type="StandardMaterial3D" id=3]
blend_mode = 1
shading_mode = 0
albedo_color = Color( 1, 0.898039, 0.439216, 1 )
albedo_texture = ExtResource( 3 )
texture_repeat = false
disable_receive_shadows = true
billboard_mode = 3
particles_anim_h_frames = 2
particles_anim_v_frames = 2
particles_anim_loop = false
[sub_resource type="QuadMesh" id=2]
material = SubResource( 3 )
[node name="Weapon" type="Node3D"]
script = null
script = ExtResource( 2 )
[node name="Handgun" parent="." instance=ExtResource( 1 )]
[node name="Model" parent="." instance=ExtResource( 1 )]
[node name="AnimationPlayer" parent="Handgun" index="4"]
[node name="AnimationPlayer" parent="Model" index="4"]
blend_times = [ ]
[editable path="Handgun"]
[node name="Flash" type="Node3D" parent="."]
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.353838, 0.125179, 0 )
script = null
[node name="FlashParticles" type="GPUParticles3D" parent="Flash"]
transform = Transform3D( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
lifetime = 0.1
explosiveness = 1.0
process_material = SubResource( 1 )
draw_pass_1 = SubResource( 2 )
script = null
[editable path="Model"]