diff --git a/imports/Wood_BoatV1.fbx b/imports/Wood_BoatV1.fbx new file mode 100644 index 0000000..da2cb34 Binary files /dev/null and b/imports/Wood_BoatV1.fbx differ diff --git a/imports/Wood_BoatV1.fbx.import b/imports/Wood_BoatV1.fbx.import new file mode 100644 index 0000000..7850490 --- /dev/null +++ b/imports/Wood_BoatV1.fbx.import @@ -0,0 +1,56 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dy274wdlyixpa" +path="res://.godot/imported/Wood_BoatV1.fbx-2fda95b8565db1a0efbacae9809d1f8e.scn" + +[deps] + +source_file="res://imports/Wood_BoatV1.fbx" +dest_files=["res://.godot/imported/Wood_BoatV1.fbx-2fda95b8565db1a0efbacae9809d1f8e.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=1.0 +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=true +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={ +"meshes": { +"Cube_001": { +"generate/lightmap_uv": 0, +"generate/lods": 0, +"generate/shadow_meshes": 0, +"lods/normal_merge_angle": 20.0, +"save_to_file/enabled": true, +"save_to_file/fallback_path": "res://meshes/wood_boat_1_mesh.res", +"save_to_file/path": "uid://s5gdi1kev24q" +} +} +} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +fbx/naming_version=2 diff --git a/materials/main.tscn b/materials/main.tscn new file mode 100644 index 0000000..7aea95f --- /dev/null +++ b/materials/main.tscn @@ -0,0 +1,91 @@ +[gd_scene format=3 uid="uid://dulmby3b28roh"] + +[ext_resource type="Shader" uid="uid://lp8tc5s3ym5p" path="res://materials/water-realistic.gdshader" id="1_60t4w"] +[ext_resource type="PackedScene" uid="uid://dkhr67bht14o4" path="res://wooden_boat.tscn" id="1_s44l8"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_xits5"] + +[sub_resource type="Sky" id="Sky_4gnqm"] +sky_material = SubResource("ProceduralSkyMaterial_xits5") + +[sub_resource type="Environment" id="Environment_dyu2e"] +background_mode = 2 +sky = SubResource("Sky_4gnqm") +fog_enabled = true +fog_light_color = Color(0.54109967, 0.57618666, 0.6307644, 1) +fog_light_energy = 0.48 +fog_density = 0.108 +fog_aerial_perspective = 0.024 + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_60t4w"] + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_xits5"] +noise = SubResource("FastNoiseLite_60t4w") +seamless = true +as_normal_map = true + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_4gnqm"] + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_dyu2e"] +noise = SubResource("FastNoiseLite_4gnqm") +seamless = true +as_normal_map = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_jkinx"] +render_priority = 0 +shader = ExtResource("1_60t4w") +shader_parameter/color_shallow = Color(0.01, 0.2, 0.3, 1) +shader_parameter/color_deep = Color(0.3, 0.5, 0.6, 1) +shader_parameter/transparency = 0.6 +shader_parameter/metallic = 0.0 +shader_parameter/roughness = 0.25 +shader_parameter/max_visible_depth = 20.0 +shader_parameter/wave_move_direction_a = Vector2(-1, 0) +shader_parameter/wave_move_direction_b = Vector2(0, 1) +shader_parameter/wave_noise_scale_a = 15.0 +shader_parameter/wave_noise_scale_b = 15.0 +shader_parameter/wave_time_scale_a = 0.15 +shader_parameter/wave_time_scale_b = 0.15 +shader_parameter/wave_height_scale = 1.0 +shader_parameter/wave_normal_flatness = 50.0 +shader_parameter/surface_normals_a = SubResource("NoiseTexture2D_xits5") +shader_parameter/surface_normals_b = SubResource("NoiseTexture2D_dyu2e") +shader_parameter/surface_normals_move_direction_a = Vector2(-1, 0.2) +shader_parameter/surface_normals_move_direction_b = Vector2(0.2, 1) +shader_parameter/surface_texture_roughness = 0.15 +shader_parameter/surface_texture_scale = 0.1 +shader_parameter/surface_texture_time_scale = 0.06 +shader_parameter/ssr_resolution = 1.0 +shader_parameter/ssr_max_travel = 30.0 +shader_parameter/ssr_max_diff = 4.0 +shader_parameter/ssr_mix_strength = 0.7 +shader_parameter/ssr_screen_border_fadeout = 0.3 +shader_parameter/refraction_intensity = 0.4 +shader_parameter/border_color = Color(1, 1, 1, 1) +shader_parameter/border_scale = 0.41999999061216 +shader_parameter/border_near = 0.5 +shader_parameter/border_far = 300.0 +shader_parameter/cut_out_x = 0.0 +shader_parameter/cut_out_z = 0.0 + +[sub_resource type="PlaneMesh" id="PlaneMesh_ovcrv"] +material = SubResource("ShaderMaterial_jkinx") +size = Vector2(100, 100) +subdivide_width = 50 +subdivide_depth = 50 + +[node name="Main" type="Node3D" unique_id=1643043777] + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1159733750] +transform = Transform3D(-0.72055113, -0.34879494, 0.5992897, 0, 0.8642748, 0.5030199, -0.6934018, 0.36245158, -0.62275416, 0, 0, 0) +shadow_enabled = true + +[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1071651178] +environment = SubResource("Environment_dyu2e") + +[node name="WaterMesh" type="MeshInstance3D" parent="." unique_id=1850650416] +mesh = SubResource("PlaneMesh_ovcrv") + +[node name="WoodenBoat" parent="." unique_id=1763110523 instance=ExtResource("1_s44l8")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6086314, 0) +gravity_scale = 0.0 diff --git a/materials/peeling-paint-material.tres b/materials/peeling-paint-material.tres new file mode 100644 index 0000000..881badc --- /dev/null +++ b/materials/peeling-paint-material.tres @@ -0,0 +1,23 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://bs7nf22clpnbl"] + +[ext_resource type="Texture2D" uid="uid://pofejmslm8ru" path="res://textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png" id="1_8x3we"] +[ext_resource type="Texture2D" uid="uid://d221edq52bb1c" path="res://textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png" id="2_t4cbt"] +[ext_resource type="Texture2D" uid="uid://4vqw2fepf6d7" path="res://textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png" id="3_mbiie"] +[ext_resource type="Texture2D" uid="uid://dc4ddapum6p6x" path="res://textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png" id="4_oss5d"] + +[resource] +resource_name = "PolyPack_Boats" +albedo_texture = ExtResource("1_8x3we") +metallic = 1.0 +metallic_texture = ExtResource("2_t4cbt") +metallic_texture_channel = 2 +roughness_texture = ExtResource("2_t4cbt") +roughness_texture_channel = 1 +emission_enabled = true +normal_enabled = true +normal_texture = ExtResource("4_oss5d") +ao_enabled = true +ao_texture = ExtResource("2_t4cbt") +heightmap_texture = ExtResource("3_mbiie") +uv1_scale = Vector3(0.5, 0.5, 0.5) +uv1_triplanar = true diff --git a/materials/rough-wood-material.tres b/materials/rough-wood-material.tres new file mode 100644 index 0000000..bf03688 --- /dev/null +++ b/materials/rough-wood-material.tres @@ -0,0 +1,22 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://obigbmpc4edx"] + +[ext_resource type="Texture2D" uid="uid://cs55ts48i38j0" path="res://textures/Rough Wood/rough_wood_diff_4k.png" id="1_oco6e"] +[ext_resource type="Texture2D" uid="uid://d3qeh1jkrlo6v" path="res://textures/Rough Wood/rough_wood_arm_4k.png" id="2_u1tk2"] +[ext_resource type="Texture2D" uid="uid://cstmb486legj0" path="res://textures/Rough Wood/rough_wood_disp_4k.png" id="3_fxhd6"] +[ext_resource type="Texture2D" uid="uid://bn2u5w5ljtegj" path="res://textures/Rough Wood/rough_wood_nor_gl_4k.png" id="4_rnib2"] + +[resource] +albedo_texture = ExtResource("1_oco6e") +metallic = 1.0 +metallic_texture = ExtResource("2_u1tk2") +metallic_texture_channel = 2 +roughness_texture = ExtResource("2_u1tk2") +roughness_texture_channel = 1 +normal_enabled = true +normal_texture = ExtResource("4_rnib2") +ao_enabled = true +ao_texture = ExtResource("2_u1tk2") +heightmap_enabled = true +heightmap_texture = ExtResource("3_fxhd6") +uv1_scale = Vector3(0.5, 0.5, 0.5) +uv1_triplanar = true diff --git a/materials/water-realistic.gdshader b/materials/water-realistic.gdshader new file mode 100644 index 0000000..0d8e87a --- /dev/null +++ b/materials/water-realistic.gdshader @@ -0,0 +1,229 @@ +shader_type spatial; + +render_mode depth_draw_always; + +const float EPSILON = 1e-5; + +uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_nearest; +uniform sampler2D DEPTH_TEXTURE : hint_depth_texture, filter_nearest; + +uniform vec3 color_shallow : source_color = vec3(0.01, 0.2, 0.3); +uniform vec3 color_deep : source_color = vec3(0.3, 0.5, 0.6); + +uniform float transparency : hint_range(0.0, 1.0, 0.01) = 0.6; +uniform float metallic : hint_range(0.0, 1.0, 0.01) = 0.0; +uniform float roughness : hint_range(0.0, 1.0, 0.01) = 0.25; + +uniform float max_visible_depth : hint_range(0.1, 100.0, 0.1) = 20.0; + +uniform sampler2D wave_a; +uniform sampler2D wave_b; +uniform vec2 wave_move_direction_a = vec2(-1.0, 0.0); +uniform vec2 wave_move_direction_b = vec2(0.0, 1.0); +uniform float wave_noise_scale_a = 15.0; +uniform float wave_noise_scale_b = 15.0; +uniform float wave_time_scale_a = 0.15; +uniform float wave_time_scale_b = 0.15; +uniform float wave_height_scale = 1.0; +uniform float wave_normal_flatness : hint_range(0.1, 100.0, 0.1) = 50.0; + +uniform sampler2D surface_normals_a; +uniform sampler2D surface_normals_b; +uniform vec2 surface_normals_move_direction_a = vec2(-1.0, 0.2); +uniform vec2 surface_normals_move_direction_b = vec2(0.2, 1.0); +uniform float surface_texture_roughness : hint_range(0.0, 1.0, 0.01) = 0.15; +uniform float surface_texture_scale : hint_range(0.001, 2.0, 0.001) = 0.1; +uniform float surface_texture_time_scale : hint_range(0.001, 2.0, 0.001) = 0.06; + +uniform float ssr_resolution : hint_range(0.01, 10.0, 0.1) = 1.0; +uniform float ssr_max_travel : hint_range(0.0, 200.0, 0.1) = 30.0; +uniform float ssr_max_diff : hint_range(0.1, 10.0, 0.1) = 4.0; +uniform float ssr_mix_strength : hint_range(0.0, 1.0, 0.01) = 0.7; +uniform float ssr_screen_border_fadeout: hint_range(0.0, 1.0, 0.1) = 0.3; + +uniform float refraction_intensity : hint_range(0.0, 1.0, 0.01) = 0.4; + +uniform vec3 border_color : source_color = vec3(1.0); +uniform float border_scale : hint_range(0.0, 5.0, 0.01) = 2.0; +uniform float border_near = 0.5; +uniform float border_far = 300.0; + +uniform float cut_out_x = 0.0; +uniform float cut_out_z = 0.0; + +varying vec2 vertex_uv; +varying vec3 local_position; + +float get_wave_height(vec2 uv_a, vec2 uv_b) +{ + float height1 = texture(wave_a, uv_a).y; + float height2 = texture(wave_b, uv_b).y; + return (height1 + height2) / 2.0; +} + +vec3 get_mixed_normals(vec3 color1, vec3 color2) +{ + vec3 normal1 = normalize(color1 * 2.0 - 1.0); + vec3 normal2 = normalize(color2 * 2.0 - 1.0); + vec3 up = vec3(0.0, 0.0, 1.0); + vec3 tangent = normalize(normal1 + normal2); + vec3 binormal = normalize(cross(up, tangent)); + vec3 mixedNormal = normalize(cross(tangent, binormal)); + return mixedNormal * 0.5; +} + +void vertex() +{ + local_position = VERTEX; + + vertex_uv = (MODEL_MATRIX * vec4(local_position, 1.0)).xz; + vec2 uv_a = vertex_uv / wave_noise_scale_a + (wave_move_direction_a * TIME * wave_time_scale_a); + vec2 uv_b = vertex_uv / wave_noise_scale_b + (wave_move_direction_b * TIME * wave_time_scale_b); + VERTEX.y += get_wave_height(uv_a, uv_b) * wave_height_scale; + + float normal_height_scale = wave_height_scale / wave_normal_flatness; + vec2 e = vec2(0.01, 0.0); + vec3 normal = normalize(vec3( + get_wave_height(uv_a - e, uv_b - e) * normal_height_scale - get_wave_height(uv_a + e, uv_a + e) * normal_height_scale, + 2.0 * e.x, + get_wave_height(uv_a - e.yx, uv_b - e.yx) * normal_height_scale - get_wave_height(uv_a + e.yx, uv_b + e.yx) * normal_height_scale + )); + NORMAL = normal; +} + +bool is_within_screen_boundaries(vec2 position) +{ + return position.x > 0.0 && position.x < 1.0 && position.y > 0.0 && position.y < 1.0; +} + +vec2 get_uv_from_view_position(vec3 position_view_space, mat4 proj_m) +{ + vec4 position_clip_space = proj_m * vec4(position_view_space.xyz, 1.0); + vec2 position_ndc = position_clip_space.xy / position_clip_space.w; + return position_ndc.xy * 0.5 + 0.5; +} + +vec3 get_view_position_from_uv(vec2 uv, float depth, mat4 inv_proj_m) +{ + vec4 position_ndc = vec4((uv * 2.0) - 1.0, depth, 1.0); + vec4 view_position = inv_proj_m * position_ndc; + return view_position.xyz /= view_position.w; +} + +bool is_zero(float value) +{ + return abs(value) < EPSILON; +} + +float get_screen_border_alpha(vec2 screen_position) +{ + vec2 shifted_screen_position = 4.0 * screen_position * (1.0 - screen_position); + float mask = shifted_screen_position.x * shifted_screen_position.y; // ranging from 0.0 at the edges to 1.0 in the center + + // An offset in the [0.0, 0.5] range for ssr_screen_border_fadeout values > 0.75 + // which is subtracted from the result of smoothstep. + // This ensure alpha smoothly transitions to zero when ssr_screen_border_fadeout is approaching 1.0. + float offset = mix(0.0, 0.5, (clamp(ssr_screen_border_fadeout, 0.75, 1.0)-0.75) / 0.25); + float alpha = clamp(smoothstep(0.0, 2.0 * ssr_screen_border_fadeout, mask) - offset, 0.0, 1.0); + + return is_zero(ssr_screen_border_fadeout) ? 1.0 : alpha; +} + +vec4 get_ssr_color(vec3 surface_view_position, vec3 normal_view_space, vec3 view_view_space, mat4 proj_m, mat4 inv_proj_m) +{ + if (ssr_max_travel < EPSILON) + { + return vec4(0); + } + + vec3 current_position_view_space = surface_view_position; + vec3 view_direction_view_space = view_view_space * -1.0; + vec3 reflect_vector_view_space = normalize(reflect(view_direction_view_space.xyz, normal_view_space.xyz)); + + vec2 current_screen_position = vec2(0.0); + + vec3 resulting_color = vec3(-1.0); + for(float travel=0.0; resulting_color.x < 0.0 && travel < ssr_max_travel; travel = travel + ssr_resolution) + { + current_position_view_space += reflect_vector_view_space * ssr_resolution; + current_screen_position = get_uv_from_view_position(current_position_view_space, proj_m); + + float depth_texture_probe_raw = texture(DEPTH_TEXTURE, current_screen_position).x; + vec3 depth_texture_probe_view_position = get_view_position_from_uv(current_screen_position, depth_texture_probe_raw, inv_proj_m); + + float depth_diff = depth_texture_probe_view_position.z - current_position_view_space.z; + + vec3 ssr_screen_color = texture(SCREEN_TEXTURE, current_screen_position.xy).rgb; + resulting_color = (is_within_screen_boundaries(current_screen_position) && depth_diff >= 0.0 && depth_diff < ssr_max_diff) ? ssr_screen_color : vec3(-1.0); + } + + float alpha = get_screen_border_alpha(current_screen_position); + return vec4(resulting_color,alpha); +} + +float linear_depth(float cur_depth) +{ + return border_far * border_near / (border_near + cur_depth * (border_far - border_near)); +} + +float normalize_float(float min_v, float max_v, float value) +{ + float clamped_value = clamp(value, min_v, max_v); + return (clamped_value - min_v) / (max_v - min_v); +} + +vec2 get_refracted_uv(vec2 raw_screen_uv, float screen_depth_raw, vec3 view, vec3 normal, mat4 proj_m, mat4 inv_proj_m) +{ + vec3 screen_view_position_original = get_view_position_from_uv(raw_screen_uv, screen_depth_raw, inv_proj_m); + float screen_center_distance = clamp(abs(length(raw_screen_uv - vec2(0.5, 0.5))) * 2.0, 0.0, 1.0); + float refraction_intensity_deglitched = mix(1.0 - refraction_intensity, 1.0, screen_center_distance); + vec3 refraction_position_view_space = screen_view_position_original + normalize(refract(view, -normal, refraction_intensity_deglitched)); + vec2 refraction_uv = get_uv_from_view_position(refraction_position_view_space, proj_m); + return refraction_uv; +} + +void fragment() +{ + vec3 normal = NORMAL; + + float screen_depth_raw = texture(DEPTH_TEXTURE, SCREEN_UV).x; + + vec2 refraction_uv = refraction_intensity > 0.0 ? get_refracted_uv(SCREEN_UV, screen_depth_raw, VIEW, normal, PROJECTION_MATRIX, INV_PROJECTION_MATRIX) : SCREEN_UV; + + float screen_depth = texture(DEPTH_TEXTURE, refraction_uv).x; + float surface_depth = FRAGCOORD.z; + + float border_diff = linear_depth(screen_depth_raw) - linear_depth(surface_depth); + + vec2 time_vector = (TIME * surface_normals_move_direction_a) * surface_texture_time_scale; + vec2 time_vector2 = (TIME * surface_normals_move_direction_b) * surface_texture_time_scale; + + vec3 normal_texture_blend = get_mixed_normals(texture(surface_normals_a, vertex_uv * surface_texture_scale + time_vector).xyz, texture(surface_normals_b, vertex_uv * surface_texture_scale + time_vector2).xyz); + vec3 normal_blend = mix(normal, normal_texture_blend, surface_texture_roughness); + + vec3 screen_view_position = get_view_position_from_uv(refraction_uv, screen_depth, INV_PROJECTION_MATRIX); + vec3 surface_view_position = get_view_position_from_uv(SCREEN_UV, surface_depth, INV_PROJECTION_MATRIX); + float depth_visibility = 1.0 - normalize_float(0.0, max_visible_depth, length(surface_view_position - screen_view_position)); + + vec3 screen_color = texture(SCREEN_TEXTURE, refraction_uv).rgb; + vec4 ssr_color = get_ssr_color(surface_view_position, normal, VIEW, PROJECTION_MATRIX, INV_PROJECTION_MATRIX); + vec3 surface_color_transparency = mix(color_shallow, screen_color, transparency); + vec3 surface_depth_color_mix = mix(color_deep, surface_color_transparency, depth_visibility); + vec3 surface_color_ssr_mix = (ssr_max_travel > EPSILON) ? mix(surface_depth_color_mix, ssr_color.rgb, ssr_mix_strength * ssr_color.a) : vec3(0); + vec3 water_color = (ssr_color.x >= 0.0) ? surface_color_ssr_mix : surface_depth_color_mix; + vec3 final_color = mix(border_color, water_color, step(border_scale, border_diff)); + + float cut_out_x_half = cut_out_x / 2.0; + float cut_out_z_half = cut_out_z / 2.0; + + if((local_position.x < cut_out_x_half && local_position.x > -cut_out_x_half) && + (local_position.z < cut_out_z_half && local_position.z > -cut_out_z_half)) + { + discard; + } + + ALBEDO.rgb = final_color; + METALLIC = metallic; + ROUGHNESS = roughness; + NORMAL = normal_blend; +} \ No newline at end of file diff --git a/materials/water-realistic.gdshader.uid b/materials/water-realistic.gdshader.uid new file mode 100644 index 0000000..7d26f20 --- /dev/null +++ b/materials/water-realistic.gdshader.uid @@ -0,0 +1 @@ +uid://lp8tc5s3ym5p diff --git a/materials/water-toon.gdshader b/materials/water-toon.gdshader new file mode 100644 index 0000000..9b9a38c --- /dev/null +++ b/materials/water-toon.gdshader @@ -0,0 +1,98 @@ +shader_type spatial; +render_mode unshaded, blend_mix, cull_disabled, depth_draw_opaque; + +// ===== Your existing params ===== +uniform vec2 R = vec2(0.8, 0.6); +uniform float scale = 0.5; +uniform float speed = 1.0; +uniform vec3 direction = vec3(1.0, 1.0, 0.0); +uniform float distortion = 0.5; +uniform float layers = 2.0; +uniform float shades = 3.0; +uniform int steps = 6; +uniform vec3 tint = vec3(0.459, 0.765, 1.0); + +// ===== Waves (Gerstner) ===== +uniform vec2 wave1_dir = vec2(1.0, 0.2); +uniform float wave1_amp = 0.25; +uniform float wave1_len = 8.0; +uniform float wave1_steep = 0.6; +uniform float wave1_speed = 1.0; + +uniform vec2 wave2_dir = vec2(0.3, 1.0); +uniform float wave2_amp = 0.12; +uniform float wave2_len = 3.5; +uniform float wave2_steep = 0.7; +uniform float wave2_speed = 1.6; + +uniform float time_scale = 1.0; + +// ---- noise for color ---- +float gyroid(vec3 seed) { return dot(sin(seed), cos(seed.yzx)); } + +float fbm(vec3 seed) { + float result = 0.0; + float a = 0.5; + for (int i = 0; i < steps; i++) { + seed += direction * TIME * speed * 0.01 / a; + seed.z += result * distortion; + result += gyroid(seed / a) * a; + a *= 0.5; + } + return result; +} + +// Gerstner in object space +vec3 gerstner_obj(vec2 obj_xz, vec2 dir, float amp, float lambda, float steep, float spd, float t) { + dir = normalize(dir); + float k = 2.0 * PI / max(lambda, 0.001); + float phase = dot(dir, obj_xz) * k - spd * t; + float A = amp; + float Q = clamp(steep, 0.0, 1.0); + float c = cos(phase); + float s = sin(phase); + vec2 disp_xz = dir * (Q * A * c); + float disp_y = A * s; + return vec3(disp_xz.x, disp_y, disp_xz.y); +} + +void vertex() { + float t = TIME * time_scale; + + // Use local/object-space XZ for the wave phase (no world matrix needed) + vec2 obj_xz = VERTEX.xz; + + vec3 d1 = gerstner_obj(obj_xz, wave1_dir, wave1_amp, wave1_len, wave1_steep, wave1_speed, t); + vec3 d2 = gerstner_obj(obj_xz, wave2_dir, wave2_amp, wave2_len, wave2_steep, wave2_speed, t); + vec3 disp = d1 + d2; + + VERTEX += disp; + + // Quick procedural normal (only matters if you later use lit shading) + vec2 eps = vec2(0.05, 0.0); + float h = (gerstner_obj(obj_xz, wave1_dir, wave1_amp, wave1_len, wave1_steep, wave1_speed, t).y + + gerstner_obj(obj_xz, wave2_dir, wave2_amp, wave2_len, wave2_steep, wave2_speed, t).y); + float hx = (gerstner_obj(obj_xz + vec2(eps.x,0), wave1_dir, wave1_amp, wave1_len, wave1_steep, wave1_speed, t).y + + gerstner_obj(obj_xz + vec2(eps.x,0), wave2_dir, wave2_amp, wave2_len, wave2_steep, wave2_speed, t).y); + float hz = (gerstner_obj(obj_xz + vec2(0,eps.x), wave1_dir, wave1_amp, wave1_len, wave1_steep, wave1_speed, t).y + + gerstner_obj(obj_xz + vec2(0,eps.x), wave2_dir, wave2_amp, wave2_len, wave2_steep, wave2_speed, t).y); + + vec3 dx = vec3(eps.x, hx - h, 0.0); + vec3 dz = vec3(0.0, hz - h, eps.x); + NORMAL = normalize(cross(dz, dx)); +} + +void fragment() { + // Keep your 2D-water look + vec2 p = (2.0 * UV - R) / R.y; + + float shape = fbm(vec3(p * scale, 0.0)); + float gradient = fract(shape * layers); + float shade = round(pow(gradient, 4.0) * shades) / shades; + + vec3 color = mix(tint * mix(0.6, 0.8, gradient), vec3(1.0), shade); + + ALBEDO = color; + EMISSION = color; + ALPHA = 1.0; +} diff --git a/materials/water-toon.gdshader.uid b/materials/water-toon.gdshader.uid new file mode 100644 index 0000000..9eada5a --- /dev/null +++ b/materials/water-toon.gdshader.uid @@ -0,0 +1 @@ +uid://l0xww3gjjp6s diff --git a/materials/water_stylized.gdshader b/materials/water_stylized.gdshader new file mode 100644 index 0000000..4c529e2 --- /dev/null +++ b/materials/water_stylized.gdshader @@ -0,0 +1,156 @@ +// this code working on godot 4.3 +shader_type spatial; +render_mode cull_disabled; // specular_schlick_ggx + +//Water Color +uniform vec4 color : source_color; +uniform vec4 deep_water: source_color; + +uniform float roughness : hint_range(0.0, 1.0) = 0.1; +uniform float metallic : hint_range(0.0, 1.0) = 0; + +//Water Speed +uniform float speed: hint_range(-1, 1) = 0.02; +uniform sampler2D DEPTH_TEXTURE : hint_depth_texture, filter_linear_mipmap; +uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; + + + +//depth-fade +uniform float beer_law_factor = 2.0; +uniform float _distance = 50.0; + +//Water foam +uniform vec4 edge_color: source_color; +uniform float edge_scale = 0.1; +uniform float near = 0.1; +uniform float far = 100.0; + +//Water Wave +uniform vec2 wave_direction = vec2(2.0,0.0); // Direction of wave 1 +uniform vec2 wave_direction2 = vec2(0.0,1.0); // Direction of wave 2 +uniform float time_scale : hint_range(0.0, 0.2, 0.005) = 0.025; // Rate of movement multiplied by TIME +uniform float height_scale = 0.15; +uniform float noise_scale = 10.0; + +// Water Noise +uniform sampler2D noise1; +uniform sampler2D noise2; +uniform sampler2D wave; +uniform sampler2D normalmap: hint_normal; + +// Varying variables +varying float height; +varying vec3 world_pos; + + + +float fresnel(float amount, vec3 normal, vec3 view) +{ + return pow((1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0 )), amount); +} + + + +float rim(float depth) { + depth = 2.0 * depth - 1.0; + return near * far / (far + depth * (near - far)); +} + +float calc_depth_fade(float depth, mat4 projection_matrix, + vec4 fragcoord, float beer_factor, float __distance, vec3 vertex) { + + float scene_depth = depth; + + scene_depth = scene_depth * 2.0 - 1.0; + scene_depth = projection_matrix[3][2] / (scene_depth + projection_matrix[2][2]); + scene_depth = scene_depth + vertex.z; // z is negative + + // application of beers law + scene_depth = exp(-scene_depth * beer_factor); + + float screen_depth = fragcoord.z; + + float depth_fade = (scene_depth - screen_depth) / __distance; + + depth_fade = clamp(depth_fade, 0.0, 1.0); + + return depth_fade; +} + + +void vertex() { + world_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz; + + height = texture(wave, world_pos.xz / noise_scale + TIME * time_scale).r; + + VERTEX.y += height * height_scale; +} + +void fragment() { + float time = TIME * speed; + + vec3 n1 = texture(noise1, UV + time).rgb; + + vec3 n2 = texture(noise2, UV - time * 0.2).rgb; + + vec2 uv_movement = UV * 4.0; + uv_movement += TIME * speed * 4.0; + + float sum = (n1.r + n2.r) - 1.0; + + float z_depth = rim(texture(DEPTH_TEXTURE, SCREEN_UV).x); + + float z_pos = rim(FRAGCOORD.z); + + float diff = z_depth - z_pos; + + // depth-fade + float z_depth_fade = calc_depth_fade(texture(DEPTH_TEXTURE, SCREEN_UV).x, PROJECTION_MATRIX, FRAGCOORD, beer_law_factor, _distance, VERTEX); + + float z_fade = rim(FRAGCOORD.z); + + float fade_diff = z_depth_fade - z_fade; + + vec4 gradientcolor = mix(color, deep_water, z_depth_fade); + + //If enable this line 119-120, it can caused bug for edge effect + vec2 displacement = vec2(sum * 0.01); + diff += displacement.x * 15.0; + + vec4 depth_color_adj = mix(edge_color, gradientcolor, step(edge_scale, diff)); + + vec4 alpha = texture(SCREEN_TEXTURE, SCREEN_UV + displacement); + + // Calculate Fresnel + float fresnel = fresnel(2.0, NORMAL, VIEW); + + //vec4 surface_color = mix(color, deep_water, fresnel); + + float fin = 0.0; + if (sum > 0.0 && sum < 0.4) fin = 0.1; + if (sum > 0.4 && sum < 0.8) fin = 0.0; + if (sum > 0.8) fin = 1.0; + + // konvertier fin in vec3 um + //ALBEDO = vec3(fin) + mix(alpha.rgb, (surface_color + depth_color_adj).rgb, gradientcolor.a); + + ALBEDO = vec3(fin) + mix(alpha.rgb, gradientcolor.rgb, gradientcolor.a); + + float depth = texture(DEPTH_TEXTURE, SCREEN_UV).r; + + vec4 upos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, depth, 1.0); + + vec3 pixel_position = upos.xyz / upos.w; + + // Adjust the edge foam calculation to include edge_scale + if (VERTEX.z < pixel_position.z + 0.05 + edge_scale) { + ALBEDO = vec3(edge_color.rgb); + } + + NORMAL_MAP = texture(normalmap, uv_movement).rgb; + + METALLIC = metallic; + + ROUGHNESS = roughness; +} \ No newline at end of file diff --git a/materials/water_stylized.gdshader.uid b/materials/water_stylized.gdshader.uid new file mode 100644 index 0000000..00c81b6 --- /dev/null +++ b/materials/water_stylized.gdshader.uid @@ -0,0 +1 @@ +uid://cwp75pyakeouw diff --git a/materials/worn-planks-material.tres b/materials/worn-planks-material.tres new file mode 100644 index 0000000..eeba73c --- /dev/null +++ b/materials/worn-planks-material.tres @@ -0,0 +1,19 @@ +[gd_resource type="StandardMaterial3D" format=3 uid="uid://hq6b56330vqy"] + +[ext_resource type="Texture2D" uid="uid://dnuxo3vwprene" path="res://textures/Worn Planks/worn_planks_diff_4k.png" id="1_k014f"] +[ext_resource type="Texture2D" uid="uid://bpj57fitgubfm" path="res://textures/Worn Planks/worn_planks_arm_4k.png" id="2_2t2ec"] +[ext_resource type="Texture2D" uid="uid://cftdftx764a5g" path="res://textures/Worn Planks/worn_planks_nor_gl_4k.png" id="3_q3t76"] + +[resource] +albedo_texture = ExtResource("1_k014f") +metallic = 1.0 +metallic_texture = ExtResource("2_2t2ec") +metallic_texture_channel = 2 +roughness_texture = ExtResource("2_2t2ec") +roughness_texture_channel = 1 +normal_enabled = true +normal_texture = ExtResource("3_q3t76") +ao_enabled = true +ao_texture = ExtResource("2_2t2ec") +uv1_scale = Vector3(0.5, 0.5, 0.5) +uv1_triplanar = true diff --git a/meshes/wood_boat_1_mesh.res b/meshes/wood_boat_1_mesh.res new file mode 100644 index 0000000..1152f2a Binary files /dev/null and b/meshes/wood_boat_1_mesh.res differ diff --git a/meshes/wood_boat_1_mesh.res.depren b/meshes/wood_boat_1_mesh.res.depren new file mode 100644 index 0000000..f277c59 Binary files /dev/null and b/meshes/wood_boat_1_mesh.res.depren differ diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png b/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png new file mode 100644 index 0000000..cef38e3 Binary files /dev/null and b/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png differ diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png.import b/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png.import new file mode 100644 index 0000000..41386c9 --- /dev/null +++ b/textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d221edq52bb1c" +path.s3tc="res://.godot/imported/wood_peeling_paint_weathered_arm_4k.png-acae56ee2380672ead4381e065f6c384.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Peeling Paint/wood_peeling_paint_weathered_arm_4k.png" +dest_files=["res://.godot/imported/wood_peeling_paint_weathered_arm_4k.png-acae56ee2380672ead4381e065f6c384.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 diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png b/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png new file mode 100644 index 0000000..f18b92f Binary files /dev/null and b/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png differ diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png.import b/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png.import new file mode 100644 index 0000000..4347f84 --- /dev/null +++ b/textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://pofejmslm8ru" +path.s3tc="res://.godot/imported/wood_peeling_paint_weathered_diff_4k.png-0457343cc6ad83e477b318fab880964c.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Peeling Paint/wood_peeling_paint_weathered_diff_4k.png" +dest_files=["res://.godot/imported/wood_peeling_paint_weathered_diff_4k.png-0457343cc6ad83e477b318fab880964c.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 diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png b/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png new file mode 100644 index 0000000..5bc4234 Binary files /dev/null and b/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png differ diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png.import b/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png.import new file mode 100644 index 0000000..6336594 --- /dev/null +++ b/textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://4vqw2fepf6d7" +path.s3tc="res://.godot/imported/wood_peeling_paint_weathered_disp_4k.png-52474a8725c08345b2e17dc082b36c79.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Peeling Paint/wood_peeling_paint_weathered_disp_4k.png" +dest_files=["res://.godot/imported/wood_peeling_paint_weathered_disp_4k.png-52474a8725c08345b2e17dc082b36c79.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 diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png b/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png new file mode 100644 index 0000000..ecd3a38 Binary files /dev/null and b/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png differ diff --git a/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png.import b/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png.import new file mode 100644 index 0000000..30f5764 --- /dev/null +++ b/textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dc4ddapum6p6x" +path.s3tc="res://.godot/imported/wood_peeling_paint_weathered_nor_gl_4k.png-9f6082758834b383098d306ea6559fbf.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png" +dest_files=["res://.godot/imported/wood_peeling_paint_weathered_nor_gl_4k.png-9f6082758834b383098d306ea6559fbf.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=1 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=1 +roughness/src_normal="res://textures/Peeling Paint/wood_peeling_paint_weathered_nor_gl_4k.png" +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 diff --git a/textures/Rough Wood/rough_wood_arm_4k.png b/textures/Rough Wood/rough_wood_arm_4k.png new file mode 100644 index 0000000..beef595 Binary files /dev/null and b/textures/Rough Wood/rough_wood_arm_4k.png differ diff --git a/textures/Rough Wood/rough_wood_arm_4k.png.import b/textures/Rough Wood/rough_wood_arm_4k.png.import new file mode 100644 index 0000000..102318f --- /dev/null +++ b/textures/Rough Wood/rough_wood_arm_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3qeh1jkrlo6v" +path.s3tc="res://.godot/imported/rough_wood_arm_4k.png-e87c083bc1d41e94874018a3ff072d61.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Rough Wood/rough_wood_arm_4k.png" +dest_files=["res://.godot/imported/rough_wood_arm_4k.png-e87c083bc1d41e94874018a3ff072d61.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 diff --git a/textures/Rough Wood/rough_wood_diff_4k.png b/textures/Rough Wood/rough_wood_diff_4k.png new file mode 100644 index 0000000..2ce7e95 Binary files /dev/null and b/textures/Rough Wood/rough_wood_diff_4k.png differ diff --git a/textures/Rough Wood/rough_wood_diff_4k.png.import b/textures/Rough Wood/rough_wood_diff_4k.png.import new file mode 100644 index 0000000..5c4b7cb --- /dev/null +++ b/textures/Rough Wood/rough_wood_diff_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs55ts48i38j0" +path.s3tc="res://.godot/imported/rough_wood_diff_4k.png-ba99de22bbb568c450c8e4dcb252a763.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Rough Wood/rough_wood_diff_4k.png" +dest_files=["res://.godot/imported/rough_wood_diff_4k.png-ba99de22bbb568c450c8e4dcb252a763.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 diff --git a/textures/Rough Wood/rough_wood_disp_4k.png b/textures/Rough Wood/rough_wood_disp_4k.png new file mode 100644 index 0000000..a211c71 Binary files /dev/null and b/textures/Rough Wood/rough_wood_disp_4k.png differ diff --git a/textures/Rough Wood/rough_wood_disp_4k.png.import b/textures/Rough Wood/rough_wood_disp_4k.png.import new file mode 100644 index 0000000..025c61c --- /dev/null +++ b/textures/Rough Wood/rough_wood_disp_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cstmb486legj0" +path.s3tc="res://.godot/imported/rough_wood_disp_4k.png-c32f89c06c4b67d70af5756df3ade19e.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Rough Wood/rough_wood_disp_4k.png" +dest_files=["res://.godot/imported/rough_wood_disp_4k.png-c32f89c06c4b67d70af5756df3ade19e.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 diff --git a/textures/Rough Wood/rough_wood_nor_gl_4k.png b/textures/Rough Wood/rough_wood_nor_gl_4k.png new file mode 100644 index 0000000..59d3e63 Binary files /dev/null and b/textures/Rough Wood/rough_wood_nor_gl_4k.png differ diff --git a/textures/Rough Wood/rough_wood_nor_gl_4k.png.import b/textures/Rough Wood/rough_wood_nor_gl_4k.png.import new file mode 100644 index 0000000..a1d70ea --- /dev/null +++ b/textures/Rough Wood/rough_wood_nor_gl_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bn2u5w5ljtegj" +path.s3tc="res://.godot/imported/rough_wood_nor_gl_4k.png-917519b5bf6dcd436fa4e7ab2d10cfdf.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Rough Wood/rough_wood_nor_gl_4k.png" +dest_files=["res://.godot/imported/rough_wood_nor_gl_4k.png-917519b5bf6dcd436fa4e7ab2d10cfdf.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=1 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=1 +roughness/src_normal="res://textures/Rough Wood/rough_wood_nor_gl_4k.png" +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 diff --git a/textures/Worn Planks/worn_planks_arm_4k.png b/textures/Worn Planks/worn_planks_arm_4k.png new file mode 100644 index 0000000..1eddef4 Binary files /dev/null and b/textures/Worn Planks/worn_planks_arm_4k.png differ diff --git a/textures/Worn Planks/worn_planks_arm_4k.png.import b/textures/Worn Planks/worn_planks_arm_4k.png.import new file mode 100644 index 0000000..e7a8e69 --- /dev/null +++ b/textures/Worn Planks/worn_planks_arm_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpj57fitgubfm" +path.s3tc="res://.godot/imported/worn_planks_arm_4k.png-67ae94e1392bc629b74abacf5e7247c6.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Worn Planks/worn_planks_arm_4k.png" +dest_files=["res://.godot/imported/worn_planks_arm_4k.png-67ae94e1392bc629b74abacf5e7247c6.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 diff --git a/textures/Worn Planks/worn_planks_diff_4k.png b/textures/Worn Planks/worn_planks_diff_4k.png new file mode 100644 index 0000000..62935e3 Binary files /dev/null and b/textures/Worn Planks/worn_planks_diff_4k.png differ diff --git a/textures/Worn Planks/worn_planks_diff_4k.png.import b/textures/Worn Planks/worn_planks_diff_4k.png.import new file mode 100644 index 0000000..51d6ea0 --- /dev/null +++ b/textures/Worn Planks/worn_planks_diff_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dnuxo3vwprene" +path.s3tc="res://.godot/imported/worn_planks_diff_4k.png-31fa8c5842ca36bd2b04261d213c8692.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Worn Planks/worn_planks_diff_4k.png" +dest_files=["res://.godot/imported/worn_planks_diff_4k.png-31fa8c5842ca36bd2b04261d213c8692.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 diff --git a/textures/Worn Planks/worn_planks_disp_4k.png b/textures/Worn Planks/worn_planks_disp_4k.png new file mode 100644 index 0000000..60ad2a5 Binary files /dev/null and b/textures/Worn Planks/worn_planks_disp_4k.png differ diff --git a/textures/Worn Planks/worn_planks_disp_4k.png.import b/textures/Worn Planks/worn_planks_disp_4k.png.import new file mode 100644 index 0000000..8bf1366 --- /dev/null +++ b/textures/Worn Planks/worn_planks_disp_4k.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://duaqki285lax2" +path="res://.godot/imported/worn_planks_disp_4k.png-6d96d77782a5b37d750e26765790d07d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/Worn Planks/worn_planks_disp_4k.png" +dest_files=["res://.godot/imported/worn_planks_disp_4k.png-6d96d77782a5b37d750e26765790d07d.ctex"] + +[params] + +compress/mode=0 +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=false +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=1 diff --git a/textures/Worn Planks/worn_planks_nor_gl_4k.png b/textures/Worn Planks/worn_planks_nor_gl_4k.png new file mode 100644 index 0000000..720f058 Binary files /dev/null and b/textures/Worn Planks/worn_planks_nor_gl_4k.png differ diff --git a/textures/Worn Planks/worn_planks_nor_gl_4k.png.import b/textures/Worn Planks/worn_planks_nor_gl_4k.png.import new file mode 100644 index 0000000..d57ce99 --- /dev/null +++ b/textures/Worn Planks/worn_planks_nor_gl_4k.png.import @@ -0,0 +1,41 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cftdftx764a5g" +path.s3tc="res://.godot/imported/worn_planks_nor_gl_4k.png-bd0032413d6cdb1cab8822f1063f83e2.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://textures/Worn Planks/worn_planks_nor_gl_4k.png" +dest_files=["res://.godot/imported/worn_planks_nor_gl_4k.png-bd0032413d6cdb1cab8822f1063f83e2.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=1 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=1 +roughness/src_normal="res://textures/Worn Planks/worn_planks_nor_gl_4k.png" +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 diff --git a/wooden_boat.tscn b/wooden_boat.tscn new file mode 100644 index 0000000..62a5acc --- /dev/null +++ b/wooden_boat.tscn @@ -0,0 +1,17 @@ +[gd_scene format=3 uid="uid://dkhr67bht14o4"] + +[ext_resource type="ArrayMesh" uid="uid://dm26421jvy16h" path="res://meshes/wood_boat_1_mesh.res" id="1_q2woq"] + +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_q2woq"] +points = PackedVector3Array(-0.0001938343, 0.62233, -0.7838886, -0.0001938343, 0.42090634, -0.68253547, -0.66460025, 0.42090634, -0.64481926, -0.66460025, 0.62233, -0.7402019, -0.0001938343, 0.79952884, -0.7838886, 0.6061115, 0.62233, -0.7675789, 0.6061115, 0.42090634, -0.6684101, -0.0001938343, 0.25537995, -0.49162462, -0.66460025, 0.25537995, -0.46512136, 0.6061115, 0.25537995, -0.48172233, -1.3290067, 0.25537995, -0.41284296, -1.993413, 0.25537995, -0.34338114, -1.3290067, 0.42090634, -0.5704063, -0.66460025, 0.79952884, -0.7402019, -1.3290067, 0.62233, -0.6541391, 0.6061115, 0.79952884, -0.7675789, 1.2926517, 0.62233, -0.551621, 1.2926517, 0.42090634, -0.48186794, 1.2926517, 0.25537995, -0.35080788, -0.0001938343, 0.21602198, -0.42012408, -0.66460025, 0.21602198, -0.39798948, 0.6061115, 0.21602198, -0.4118236, -1.3290067, 0.21602198, -0.35401157, 1.2926517, 0.21602198, -0.30187878, -1.9262214, 0.21602198, -0.30158752, -1.993413, 0.21602198, -0.295617, -1.993413, 0.42090634, -0.47138312, -1.9262214, 0.42090634, -0.48143107, -1.3290067, 0.79952884, -0.6541391, -1.9262214, 0.62233, -0.5511842, 1.2926517, 0.79952884, -0.551621, 1.5574656, 0.62233, -0.42056096, 1.5574656, 0.42090634, -0.3687194, 1.8076553, 0.21602198, -0.14606291, 1.5574656, 0.25537995, -0.2712981, 1.5574656, 0.21602198, -0.23503816, -0.0001938343, 0.20030226, -0.30610183, -0.66460025, 0.20030226, -0.29052025, 0.6061115, 0.20030226, -0.30027694, -1.3290067, 0.20030226, -0.25993955, -1.993413, 0.20030226, -0.21916533, 1.2926517, 0.20030226, -0.22353399, 1.8076553, 0.20030226, -0.11475414, 1.5574656, 0.20030226, -0.17678922, -1.993413, 0.62233, -0.53953433, -1.9262214, 0.79952884, -0.5511842, 1.5574656, 0.79952884, -0.42056096, 1.8076553, 0.62233, -0.24610543, 1.8076553, 0.42090634, -0.21814597, 1.8076553, 0.25537995, -0.16557628, 1.9203002, 0.25537995, -0.040632367, 1.873266, 0.21602198, -0.041214883, -1.993413, 0.20030226, 0.13629872, 1.8076553, 0.20030226, 0.03188753, -1.993413, 0.79952884, -0.53953433, 1.8076553, 0.79952884, -0.24610543, 2.044407, 0.79952884, -0.040195525, 1.9922347, 0.42090634, -0.04034114, 1.8076553, 0.25537995, 0.08416593, 1.8076553, 0.21602198, 0.06377882, -1.9262214, 0.21602198, 0.21915781, -1.993413, 0.21602198, 0.21318728, -1.3290067, 0.20030226, 0.17707294, -0.66460025, 0.21602198, 0.31555974, -1.3290067, 0.21602198, 0.27172744, 1.5574656, 0.21602198, 0.1526084, 1.4554925, 0.21602198, 0.17838353, 1.2926517, 0.21602198, 0.21944904, 1.5574656, 0.20030226, 0.093922615, -1.993413, 0.79952884, 0.45928895, 1.8076553, 0.79952884, 0.16586006, 1.8076553, 0.62233, 0.16586006, 1.8076553, 0.42090634, 0.13746369, 1.5574656, 0.42090634, 0.28803718, 1.4554925, 0.42090634, 0.3317238, 1.2926517, 0.42090634, 0.4013313, 1.5574656, 0.25537995, 0.1898877, -1.3290067, 0.25537995, 0.33143258, -1.9262214, 0.25537995, 0.26910627, -1.993413, 0.25537995, 0.26197076, -0.66460025, 0.20030226, 0.20765364, -0.0001938343, 0.21602198, 0.33783996, -0.0001938343, 0.25537995, 0.4102143, -0.66460025, 0.25537995, 0.38371098, 1.2926517, 0.25537995, 0.2693975, 0.6061115, 0.25537995, 0.40031195, 0.6061115, 0.21602198, 0.32953954, 1.2926517, 0.20030226, 0.14066738, -1.993413, 0.62233, 0.45928895, -1.9262214, 0.79952884, 0.4709388, 1.5574656, 0.79952884, 0.34031558, 1.5574656, 0.62233, 0.34031558, 1.2926517, 0.62233, 0.47137558, 0.6061115, 0.62233, 0.68733346, 0.6061115, 0.42090634, 0.58787346, -0.66460025, 0.42090634, 0.564137, -1.3290067, 0.42090634, 0.4898696, -1.9262214, 0.42090634, 0.4008944, -1.993413, 0.42090634, 0.3908465, -0.0001938343, 0.20030226, 0.22323525, 0.6061115, 0.20030226, 0.21741033, -0.0001938343, 0.42090634, 0.60185325, -1.9262214, 0.62233, 0.4709388, -1.3290067, 0.79952884, 0.57389367, 1.2926517, 0.79952884, 0.47137558, -0.0001938343, 0.62233, 0.7036432, 0.6061115, 0.79952884, 0.68733346, -0.66460025, 0.62233, 0.65995646, -1.3290067, 0.62233, 0.57389367, -0.66460025, 0.79952884, 0.65995646, -0.0001938343, 0.79952884, 0.7036432) + +[node name="WoodenBoat" type="RigidBody3D" unique_id=1763110523] + +[node name="BoatMesh" type="MeshInstance3D" parent="." unique_id=1077268435] +mesh = ExtResource("1_q2woq") + +[node name="BoatCollider" type="CollisionShape3D" parent="." unique_id=1181516012] +shape = SubResource("ConvexPolygonShape3D_q2woq") + +[node name="Camera3D" type="Camera3D" parent="." unique_id=992841282] +transform = Transform3D(-4.222196e-08, 0.25881907, -0.9659258, 1.131334e-08, 0.9659259, 0.25881907, 1, 8.881784e-16, -4.371139e-08, -4, 2, 0)