Add wall struggler
This commit is contained in:
parent
b121134119
commit
32ec76562b
Binary file not shown.
BIN
blends/npcs.blend (Stored with Git LFS)
BIN
blends/npcs.blend (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="9121cc04ab6505c6b1f152437357b312"
|
||||||
|
dest_md5="50f4d47f615e1e0f733ae23f1e46a512"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="cab45ed17af799bb4db9ddee75570fb5"
|
||||||
|
dest_md5="e088efbcfed5f56a137e6ade8450ca72"
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="e15c3a0da6e2495e2aa81008927bee2b"
|
||||||
|
dest_md5="2c47ec49ccfccab7e5acc023138cd3fe"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="39c5ffe78ef4f9b2280f781954bf0533"
|
||||||
|
dest_md5="afc3234298b06b79b0a56b951080f07d"
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="37b953c1268fe3634db79dedea99771b"
|
||||||
|
dest_md5="300a38119e9325765b202f61ea20de60"
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
source_md5="2d0d44d0a256e4419255f77738ae6d33"
|
||||||
|
dest_md5="50ad43bee6e2ae86cd4cacb4f18e3d17"
|
||||||
|
|
BIN
godot/effects/npc/wall_struggler/MeatStrugglePanel_001.material (Stored with Git LFS)
Normal file
BIN
godot/effects/npc/wall_struggler/MeatStrugglePanel_001.material (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path.s3tc="res://.import/MeatWallStruggle.png-d36c808281a2fe0627f68eaedc8148c1.s3tc.stex"
|
||||||
|
path.etc2="res://.import/MeatWallStruggle.png-d36c808281a2fe0627f68eaedc8148c1.etc2.stex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": [ "s3tc", "etc2" ],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://effects/npc/wall_struggler/MeatWallStruggle.png"
|
||||||
|
dest_files=[ "res://.import/MeatWallStruggle.png-d36c808281a2fe0627f68eaedc8148c1.s3tc.stex", "res://.import/MeatWallStruggle.png-d36c808281a2fe0627f68eaedc8148c1.etc2.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=true
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=true
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=1
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
Binary file not shown.
|
@ -0,0 +1,9 @@
|
||||||
|
extends MeshInstance
|
||||||
|
|
||||||
|
|
||||||
|
var has_played_animation = false
|
||||||
|
|
||||||
|
func _on_Area_body_entered(body: Node):
|
||||||
|
if body.name == "OnFootPhysics" and not has_played_animation:
|
||||||
|
has_played_animation = true
|
||||||
|
get_active_material(0).set_shader_param("start_time", Time.get_ticks_msec() / 1000.0)
|
|
@ -0,0 +1,138 @@
|
||||||
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/offsets.exr" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/normals.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/Struggle_mesh069.mesh" type="ArrayMesh" id=3]
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/MeatWallStruggle.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/WallStruggler.gd" type="Script" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="Shader" id=1]
|
||||||
|
code = "// NOTE: Shader automatically converted from Godot Engine 3.5.1.stable.mono's SpatialMaterial.
|
||||||
|
|
||||||
|
shader_type spatial;
|
||||||
|
render_mode async_visible,blend_mix,depth_draw_opaque,cull_disabled,diffuse_burley,specular_schlick_ggx;
|
||||||
|
uniform vec4 albedo : hint_color;
|
||||||
|
uniform sampler2D texture_albedo : hint_albedo;
|
||||||
|
uniform float specular;
|
||||||
|
uniform float metallic;
|
||||||
|
uniform float roughness : hint_range(0,1);
|
||||||
|
uniform float point_size : hint_range(0,128);
|
||||||
|
uniform vec3 uv1_scale;
|
||||||
|
uniform vec3 uv1_offset;
|
||||||
|
uniform vec3 uv2_scale;
|
||||||
|
uniform vec3 uv2_offset;
|
||||||
|
|
||||||
|
uniform sampler2D offset_map;
|
||||||
|
uniform sampler2D normal_map;
|
||||||
|
|
||||||
|
uniform float start_frame = 0;
|
||||||
|
uniform float end_frame = 70.0;
|
||||||
|
uniform float time_scale = 0.5;
|
||||||
|
uniform float start_time = -1000.0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void vertex(){
|
||||||
|
|
||||||
|
UV=UV*uv1_scale.xy+uv1_offset.xy;
|
||||||
|
|
||||||
|
float time_int = 1.0;
|
||||||
|
//float time = modf(TIME * time_scale, time_int);
|
||||||
|
float time = (TIME-start_time) * time_scale;
|
||||||
|
float num_frames = end_frame - start_frame;
|
||||||
|
float frame_offset = num_frames * INSTANCE_CUSTOM.a;
|
||||||
|
float current_frame = start_frame + mod((time * num_frames) + frame_offset, num_frames);
|
||||||
|
|
||||||
|
if (time < 0.0 || time > 1.0) {
|
||||||
|
current_frame = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ivec2 tex_size = textureSize(offset_map, 0);
|
||||||
|
float pixel_size = 1.0 / float(tex_size.y);
|
||||||
|
float frame_floor = clamp(floor(current_frame), start_frame, end_frame);
|
||||||
|
float frame_ceil = clamp(ceil(current_frame), start_frame, end_frame);
|
||||||
|
|
||||||
|
vec2 frame_floor_uv_offset = vec2(0.0, -((frame_floor + 0.5) * pixel_size));
|
||||||
|
vec2 frame_ceil_uv_offset = vec2(0.0, -((frame_ceil + 0.5) * pixel_size));
|
||||||
|
|
||||||
|
float lerp_factor = current_frame - frame_floor;
|
||||||
|
|
||||||
|
vec3 offset_floor = texture(offset_map, UV2 + frame_floor_uv_offset).xyz;
|
||||||
|
vec3 offset_ceil = texture(offset_map, UV2 + frame_ceil_uv_offset).xyz;
|
||||||
|
vec3 offset_lerp = mix(offset_floor, offset_ceil, lerp_factor);
|
||||||
|
vec3 new_offset = vec3(offset_lerp.x, offset_lerp.z, offset_lerp.y);
|
||||||
|
|
||||||
|
VERTEX += new_offset;
|
||||||
|
|
||||||
|
vec3 normal_floor = texture(normal_map, UV2 + frame_floor_uv_offset).xyz;
|
||||||
|
vec3 normal_ceil = texture(normal_map, UV2 + frame_ceil_uv_offset).xyz;
|
||||||
|
vec3 normal_lerp = mix(normal_floor, normal_ceil, lerp_factor);
|
||||||
|
vec3 new_normal = vec3((normal_lerp.x * 2.0) - 1.0, (normal_lerp.z * 2.0) - 1.0, (normal_lerp.y * 2.0) - 1.0);
|
||||||
|
|
||||||
|
NORMAL = new_normal;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec2 base_uv = UV;
|
||||||
|
vec4 albedo_tex = texture(texture_albedo,base_uv);
|
||||||
|
albedo_tex *= COLOR;
|
||||||
|
ALBEDO = albedo.rgb * albedo_tex.rgb;
|
||||||
|
METALLIC = metallic;
|
||||||
|
ROUGHNESS = roughness;
|
||||||
|
SPECULAR = specular;
|
||||||
|
}
|
||||||
|
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=2]
|
||||||
|
resource_name = "MeatWallStruggle"
|
||||||
|
shader = SubResource( 1 )
|
||||||
|
shader_param/albedo = Color( 1, 1, 1, 1 )
|
||||||
|
shader_param/specular = 0.1
|
||||||
|
shader_param/metallic = 0.0
|
||||||
|
shader_param/roughness = 0.775
|
||||||
|
shader_param/point_size = 1.0
|
||||||
|
shader_param/uv1_scale = Vector3( 1, 1, 1 )
|
||||||
|
shader_param/uv1_offset = Vector3( 0, 0, 0 )
|
||||||
|
shader_param/uv2_scale = Vector3( 1, 1, 1 )
|
||||||
|
shader_param/uv2_offset = Vector3( 0, 0, 0 )
|
||||||
|
shader_param/start_frame = 0.0
|
||||||
|
shader_param/end_frame = 70.0
|
||||||
|
shader_param/time_scale = 0.5
|
||||||
|
shader_param/start_time = -1000.0
|
||||||
|
shader_param/texture_albedo = ExtResource( 4 )
|
||||||
|
shader_param/offset_map = ExtResource( 1 )
|
||||||
|
shader_param/normal_map = ExtResource( 2 )
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape" id=3]
|
||||||
|
extents = Vector3( 1.72965, 1.52498, 0.0716956 )
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape" id=4]
|
||||||
|
extents = Vector3( 1, 1, 1.66041 )
|
||||||
|
|
||||||
|
[node name="WallStruggler" type="MeshInstance"]
|
||||||
|
transform = Transform( 0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0 )
|
||||||
|
material_override = SubResource( 2 )
|
||||||
|
mesh = ExtResource( 3 )
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="StaticBody" type="StaticBody" parent="."]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.215516 )
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="StaticBody"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.0202021 )
|
||||||
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
|
[node name="Area" type="Area" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape" parent="Area"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1.52395, 0, 0, 1.72382 )
|
||||||
|
shape = SubResource( 4 )
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered"]
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/normals.png-78fbe49586ba5635c975bb7f9075bb31.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://effects/npc/wall_struggler/normals.png"
|
||||||
|
dest_files=[ "res://.import/normals.png-78fbe49586ba5635c975bb7f9075bb31.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
Binary file not shown.
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path.s3tc="res://.import/offsets.exr-6499b52ec59c37576218bd69644969ca.s3tc.stex"
|
||||||
|
path.etc2="res://.import/offsets.exr-6499b52ec59c37576218bd69644969ca.etc2.stex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": [ "s3tc", "etc2" ],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://effects/npc/wall_struggler/offsets.exr"
|
||||||
|
dest_files=[ "res://.import/offsets.exr-6499b52ec59c37576218bd69644969ca.s3tc.stex", "res://.import/offsets.exr-6499b52ec59c37576218bd69644969ca.etc2.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=true
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=true
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,22 @@
|
||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/WallStruggler.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://player/player.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://effects/npc/wall_struggler/containing_tube.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[node name="test_wall_struggler" type="Spatial"]
|
||||||
|
|
||||||
|
[node name="WallStruggler" parent="." instance=ExtResource( 1 )]
|
||||||
|
transform = Transform( 0.749922, 0, 0, 0, 0.749922, 0, 0, 0, 0.749922, 0, 0, 0 )
|
||||||
|
|
||||||
|
[node name="containing_tube" parent="." instance=ExtResource( 3 )]
|
||||||
|
transform = Transform( 0.9, 0, 0, 0, 0.75, 0, 0, 0, 1, 0, 0, 0 )
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.249605, 3.63602 )
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" parent="." instance=ExtResource( 5 )]
|
||||||
|
|
||||||
|
[node name="shader" parent="." instance=ExtResource( 4 )]
|
Binary file not shown.
Loading…
Reference in New Issue