Compare commits

...

5 Commits

Author SHA1 Message Date
jonathan fb87ccf301 added Dither effect
2 months ago
jonathan 0d2830d2f2 Added coffin rumble
2 months ago
jonathan 81ee19796d Phone
2 months ago
jonathan 96e53b9bbe burnage
2 months ago
jonathan a6dd6b646d Face the hammering
2 months ago

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 B

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c4cpduyayg7m"
path="res://.godot/imported/Hammer.glb-56c5f617d7ebd1afee9d21db3ca71ad2.scn"
[deps]
source_file="res://models/Hammer.glb"
dest_files=["res://.godot/imported/Hammer.glb-56c5f617d7ebd1afee9d21db3ca71ad2.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=0.009999999999999998
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

@ -0,0 +1,44 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://5rjxc4yetqx2"
path.s3tc="res://.godot/imported/Hammer_T_Hammer.png-3e85039454e8f001d18736fd1fee7638.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "6244feb1775a88dcea51d7b35f8ab233"
}
[deps]
source_file="res://models/Hammer_T_Hammer.png"
dest_files=["res://.godot/imported/Hammer_T_Hammer.png-3e85039454e8f001d18736fd1fee7638.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cqgmd4n3v8vpo"
path.s3tc="res://.godot/imported/T_Fire.png-a65ff52704eddd060d64040259ba2228.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://models/T_Fire.png"
dest_files=["res://.godot/imported/T_Fire.png-a65ff52704eddd060d64040259ba2228.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

@ -0,0 +1,16 @@
extends Node3D
@onready var hammer_in_viewport: Node3D = $"../Character/Head/Hammer In Viewport"
@onready var hammer_shelf_vis: Node3D = $Hammer
var isHammerInViewport:bool = false
func _input(event: InputEvent) -> void:
if event.is_action_pressed("hammer_toggle"):
isHammerInViewport = !isHammerInViewport
if isHammerInViewport:
hammer_in_viewport.visible = true
hammer_shelf_vis.visible = false
else:
hammer_in_viewport.visible = false
hammer_shelf_vis.visible = true

@ -0,0 +1 @@
uid://dcym4t8d3muis

@ -0,0 +1,7 @@
extends Sprite3D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _ready() -> void:
animation_player.seek(randf_range(0.,.4))
animation_player.speed_scale = randf_range(0.7,1.3)

@ -0,0 +1 @@
uid://btmcmchyhipdy

@ -0,0 +1,21 @@
shader_type spatial;
render_mode cull_disabled;
uniform sampler2D tex : source_color, filter_nearest;
uniform float intensity = 1;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 color = texture(tex,UV);
ALBEDO = vec3(0,0,0);
EMISSION = color.rgb * intensity;
ALPHA = color.a;
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

@ -0,0 +1 @@
uid://bw1w2dsdolhw

@ -0,0 +1,66 @@
[gd_scene load_steps=8 format=3 uid="uid://dwd7bdnc82anm"]
[ext_resource type="Texture2D" uid="uid://cqgmd4n3v8vpo" path="res://models/T_Fire.png" id="1_qjpos"]
[ext_resource type="Shader" uid="uid://bw1w2dsdolhw" path="res://prefabs/firesprite.gdshader" id="1_xelca"]
[ext_resource type="Script" uid="uid://btmcmchyhipdy" path="res://prefabs/firesprite.gd" id="2_ftlo4"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_5fcrl"]
render_priority = 0
shader = ExtResource("1_xelca")
shader_parameter/tex = ExtResource("1_qjpos")
shader_parameter/intensity = 1.98
[sub_resource type="Animation" id="Animation_xelca"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_ftlo4"]
resource_name = "fire"
length = 0.4015
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.20165114, 0.29820445),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5fcrl"]
_data = {
&"RESET": SubResource("Animation_xelca"),
&"fire": SubResource("Animation_ftlo4")
}
[node name="Firesprite" type="Sprite3D"]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
material_override = SubResource("ShaderMaterial_5fcrl")
cast_shadow = 0
texture_filter = 0
texture = ExtResource("1_qjpos")
hframes = 4
region_enabled = true
region_rect = Rect2(0, 0, 128, 20.214777)
script = ExtResource("2_ftlo4")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_5fcrl")
}
autoplay = "fire"

@ -109,6 +109,21 @@ blend={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":66,"key_label":0,"unicode":98,"location":0,"echo":false,"script":null)
]
}
hammer_toggle={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null)
]
}
hammering={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":121,"location":0,"echo":false,"script":null)
]
}
fire={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
]
}
[physics]

@ -0,0 +1,8 @@
extends Node3D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _input(event: InputEvent) -> void:
if event.is_action_pressed("fire"):
animation_player.play("full_fire")
if event.is_action_pressed("ui_left"):
animation_player.play("RESET")

@ -0,0 +1 @@
uid://c5yte0olwvl6g

@ -0,0 +1,26 @@
extends Node3D
@onready var body_animaiton: AnimationPlayer = $"../../../CoffinSwitcher/CoffinOpenable/AnimatedBody/AnimationPlayer"
@onready var hammer_animation: AnimationPlayer = $AnimationPlayer
@onready var face: MeshInstance3D = $"../../../CoffinSwitcher/CoffinOpenable/AnimatedBody/Armature/Skeleton3D/BoneAttachment3D/Body_002"
var uv_base:Vector3 = Vector3(0.,.25,0.)
var uv_after_hit: Vector3 = Vector3(.5,0.,0.)
func _input(event: InputEvent) -> void:
if event.is_action_pressed("hammering"):
var tween = get_tree().create_tween()
hammer_animation.play("swing")
tween.tween_interval(0.3)
tween.tween_callback(body_animaiton.play.bind("Face Hit"))
tween.tween_callback(setuv.bind(uv_after_hit))
if event.is_action_pressed("ui_left"):
setuv(uv_base)
func setuv(value:Vector3):
var faceMat:BaseMaterial3D = face.get_active_material(0)
faceMat.uv1_offset = value

@ -0,0 +1 @@
uid://gy52d2t3moyx

@ -5,7 +5,9 @@ uniform int sample_count:hint_range(1, 20) = 1;
uniform float color_steps:hint_range(1.0, 255.0, 1.0);
uniform sampler2D color_curve;
uniform bool dither = false;
const mat4 bayer = (mat4(vec4(0,8,2,10),vec4(12,4,14,6),vec4(3,11,1,9),vec4(15,7,13,5)) -8.) / 16.;
void vertex() {
// Called for every vertex the material is visible on.
@ -41,12 +43,20 @@ void fragment() {
texture(color_curve,vec2(fullColor.g,0)).g,
texture(color_curve,vec2(fullColor.b,0)).b);
vec3 scaledColor = strechedColor * color_steps;
if(dither){
ivec2 bayerIndex = ivec2(int(mod(float(intUv.x),4.)),int(mod(float(intUv.y),4.)));
float bayerValue = bayer[bayerIndex.x][bayerIndex.y];
scaledColor+=bayerValue;
}
vec3 roundColor = round(scaledColor);
vec3 backScaledColor = roundColor / color_steps;
COLOR = vec4(backScaledColor,1);
//COLOR = vec4(flooredUv,0,1);
//COLOR = vec4(vec3(float(textureQueryLevels(TEXTURE)/1)),1);
//COLOR = vec4(1,0,0,1);
//COLOR = vec4(bayerValue,0,0,1);
}
//void light() {

@ -17,6 +17,7 @@ shader_parameter/target_tex_size = Vector2(427, 240)
shader_parameter/sample_count = 1
shader_parameter/color_steps = 16.0
shader_parameter/color_curve = SubResource("CurveTexture_5747v")
shader_parameter/dither = false
[sub_resource type="ViewportTexture" id="ViewportTexture_2d5yc"]
viewport_path = NodePath("SubViewportContainer/SubViewport")
@ -44,7 +45,7 @@ script = ExtResource("1_xa3mo")
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
handle_input_locally = false
gui_snap_controls_to_pixels = false
size = Vector2i(1152, 648)
size = Vector2i(1920, 1080)
render_target_update_mode = 4
[node name="BlockoutRoom" parent="SubViewportContainer/SubViewport" instance=ExtResource("2_w1ssw")]

File diff suppressed because it is too large Load Diff

@ -0,0 +1,12 @@
extends MeshInstance3D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
var isPickedUp:bool = false
func _on_interactable_on_hit() -> void:
isPickedUp = !isPickedUp
print("hit")
if isPickedUp:
animation_player.play("phone_pickzup")
else:
animation_player.play("Hangup")

@ -0,0 +1 @@
uid://4301hu7hhhoq
Loading…
Cancel
Save