5 Commits

27 changed files with 985 additions and 488 deletions
Split View
  1. BIN
     
  2. +640
    -446
      assets/models/ship/prototype ship.escn
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. BIN
     
  7. BIN
     
  8. BIN
     
  9. BIN
     
  10. BIN
     
  11. BIN
     
  12. BIN
     
  13. BIN
     
  14. BIN
     
  15. BIN
     
  16. BIN
     
  17. BIN
     
  18. BIN
     
  19. BIN
     
  20. BIN
     
  21. +6
    -1
      scenes/MainMenu.tscn
  22. +26
    -26
      scenes/sub_scenes/OxygenBubble.tscn
  23. +28
    -8
      scenes/sub_scenes/Seagull.tscn
  24. +2
    -3
      scenes/sub_scenes/player.tscn
  25. +10
    -0
      scenes/sub_scenes/ship.gd
  26. +161
    -4
      scenes/sub_scenes/ship.tscn
  27. +112
    -0
      src/shader/sail.shader

BIN
View File


+ 640
- 446
assets/models/ship/prototype ship.escn
File diff suppressed because it is too large
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


BIN
View File


+ 6
- 1
scenes/MainMenu.tscn View File

@@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=7 format=2]

[ext_resource path="res://scenes/Ship.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/font/booter_big.tres" type="DynamicFont" id=2]
[ext_resource path="res://assets/font/booter_mid.tres" type="DynamicFont" id=3]
[ext_resource path="res://assets/sound/Music_Menu.ogg" type="AudioStream" id=4]

[sub_resource type="GDScript" id=1]
script/source = "extends Button
@@ -93,5 +94,9 @@ margin_right = 417.0
margin_bottom = 202.0
text = "Exit"
script = SubResource( 2 )

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 4 )
autoplay = true
[connection signal="pressed" from="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Start" to="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Start" method="_on_pressed"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Exit" to="MarginContainer/VBoxContainer/MarginContainer/VBoxContainer/Exit" method="_on_pressed"]

+ 26
- 26
scenes/sub_scenes/OxygenBubble.tscn View File

@@ -18,38 +18,38 @@ constant = Vector3( 7, 0, 0 )
[sub_resource type="VisualShaderNodeScalarOp" id=6]
operator = 2

[sub_resource type="OpenSimplexNoise" id=8]
[sub_resource type="OpenSimplexNoise" id=7]

[sub_resource type="NoiseTexture" id=9]
noise = SubResource( 8 )
[sub_resource type="NoiseTexture" id=8]
noise = SubResource( 7 )

[sub_resource type="VisualShaderNodeTexture" id=10]
[sub_resource type="VisualShaderNodeTexture" id=9]
output_port_for_preview = 0
texture = SubResource( 9 )
texture = SubResource( 8 )
texture_type = 1

[sub_resource type="VisualShaderNodeColorUniform" id=11]
[sub_resource type="VisualShaderNodeColorUniform" id=10]
uniform_name = "Color"

[sub_resource type="VisualShaderNodeFresnel" id=12]
[sub_resource type="VisualShaderNodeFresnel" id=11]
default_input_values = [ 2, false, 3, 5.0 ]

[sub_resource type="VisualShaderNodeInput" id=13]
[sub_resource type="VisualShaderNodeInput" id=12]
input_name = "uv"

[sub_resource type="VisualShaderNodeScalarOp" id=14]
[sub_resource type="VisualShaderNodeScalarOp" id=13]

[sub_resource type="VisualShaderNodeVec3Constant" id=15]
[sub_resource type="VisualShaderNodeVec3Constant" id=14]
constant = Vector3( 0.5, 0, 0 )

[sub_resource type="VisualShaderNodeScalarOp" id=16]
[sub_resource type="VisualShaderNodeScalarOp" id=15]
operator = 2

[sub_resource type="VisualShaderNodeVectorOp" id=19]
[sub_resource type="VisualShaderNodeVectorOp" id=16]

[sub_resource type="VisualShaderNodeVec3Constant" id=20]
[sub_resource type="VisualShaderNodeVec3Constant" id=17]

[sub_resource type="VisualShader" id=17]
[sub_resource type="VisualShader" id=18]
code = "shader_type spatial;
render_mode depth_draw_alpha_prepass, cull_disabled, specular_schlick_ggx;

@@ -123,7 +123,7 @@ graph_offset = Vector2( -1283.76, -92.3458 )
modes/cull = 2
modes/depth_draw = 3
nodes/fragment/0/position = Vector2( 420, 40 )
nodes/fragment/2/node = SubResource( 12 )
nodes/fragment/2/node = SubResource( 11 )
nodes/fragment/2/position = Vector2( -160, 220 )
nodes/fragment/10/node = SubResource( 2 )
nodes/fragment/10/position = Vector2( -600, 140 )
@@ -135,30 +135,30 @@ nodes/fragment/14/node = SubResource( 5 )
nodes/fragment/14/position = Vector2( -1280, 140 )
nodes/fragment/15/node = SubResource( 6 )
nodes/fragment/15/position = Vector2( -800, 0 )
nodes/fragment/18/node = SubResource( 10 )
nodes/fragment/18/node = SubResource( 9 )
nodes/fragment/18/position = Vector2( -460, -400 )
nodes/fragment/19/node = SubResource( 11 )
nodes/fragment/19/node = SubResource( 10 )
nodes/fragment/19/position = Vector2( -360, 0 )
nodes/fragment/20/node = SubResource( 13 )
nodes/fragment/20/node = SubResource( 12 )
nodes/fragment/20/position = Vector2( -1180, -420 )
nodes/fragment/21/node = SubResource( 14 )
nodes/fragment/21/node = SubResource( 13 )
nodes/fragment/21/position = Vector2( -860, -360 )
nodes/fragment/22/node = SubResource( 15 )
nodes/fragment/22/node = SubResource( 14 )
nodes/fragment/22/position = Vector2( -1460, -220 )
nodes/fragment/23/node = SubResource( 16 )
nodes/fragment/23/node = SubResource( 15 )
nodes/fragment/23/position = Vector2( -1060, -200 )
nodes/fragment/24/node = SubResource( 19 )
nodes/fragment/24/node = SubResource( 16 )
nodes/fragment/24/position = Vector2( 76.1768, -58 )
nodes/fragment/25/node = SubResource( 20 )
nodes/fragment/25/node = SubResource( 17 )
nodes/fragment/25/position = Vector2( -2103.03, 140.154 )
nodes/fragment/connections = PoolIntArray( 10, 0, 11, 0, 11, 0, 2, 3, 15, 0, 10, 0, 20, 0, 21, 0, 21, 0, 18, 0, 12, 0, 15, 0, 14, 0, 15, 1, 12, 0, 23, 0, 22, 0, 23, 1, 23, 0, 21, 1, 2, 0, 0, 1, 18, 0, 24, 0, 19, 0, 24, 1, 24, 0, 0, 0 )

[sub_resource type="ShaderMaterial" id=18]
shader = SubResource( 17 )
[sub_resource type="ShaderMaterial" id=19]
shader = SubResource( 18 )
shader_param/Color = Color( 0.4, 0.827451, 1, 1 )

[node name="Spatial" type="Spatial"]

[node name="MeshInstance" type="MeshInstance" parent="."]
mesh = SubResource( 1 )
material/0 = SubResource( 18 )
material/0 = SubResource( 19 )

+ 28
- 8
scenes/sub_scenes/Seagull.tscn View File

@@ -1,14 +1,23 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=8 format=2]

[ext_resource path="res://assets/sound/gulls 02.wav" type="AudioStream" id=1]
[ext_resource path="res://assets/sound/Gulls/Seagulls_04_mono.ogg" type="AudioStream" id=1]
[ext_resource path="res://assets/sound/Gulls/Seagulls_01_mono.ogg" type="AudioStream" id=2]
[ext_resource path="res://assets/sound/Gulls/Seagulls_02_mono.ogg" type="AudioStream" id=3]
[ext_resource path="res://assets/sound/Gulls/Seagulls_03_mono.ogg" type="AudioStream" id=4]
[ext_resource path="res://addons/randomAudioStreamPlayer/random_audio_stream_player_3D.gd" type="Script" id=5]

[sub_resource type="CapsuleMesh" id=1]

[sub_resource type="GDScript" id=2]
script/source = "extends MeshInstance

func _ready():
pass

onready var audio = get_node(\"RandomAudioStreamPlayer3D\")
onready var timer = get_node(\"Timer\")

func _on_Timer_timeout():
audio.play()
timer.start()
"

[node name="Gull Dummy" type="MeshInstance"]
@@ -17,7 +26,18 @@ mesh = SubResource( 1 )
material/0 = null
script = SubResource( 2 )

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource( 1 )
autoplay = true
doppler_tracking = 2
[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
autostart = true

[node name="RandomAudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
script = ExtResource( 5 )
streams = [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 1 ) ]
random_strategy = 0
randomize_volume = false
volume_min = 0.0
volume_max = 0.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]

+ 2
- 3
scenes/sub_scenes/player.tscn View File

@@ -149,8 +149,8 @@ script = ExtResource( 1 )
streams = [ ExtResource( 3 ), ExtResource( 2 ), ExtResource( 4 ) ]
random_strategy = 2
randomize_volume = false
volume_min = 0.0
volume_max = 0.0
volume_min = -5.0
volume_max = -5.0
randomize_pitch = false
pitch_min = 1.0
pitch_max = 1.0
@@ -165,7 +165,6 @@ anims/rotate = SubResource( 4 )

[node name="WaterLogo" parent="." instance=ExtResource( 6 )]
transform = Transform( 0.901675, 0, -0.432413, 0, 1, 0, 0.432413, 0, 0.901675, 0, 3, 0 )
visible = false

[node name="AnimationPlayer2" type="AnimationPlayer" parent="WaterLogo"]
autoplay = "rotate"


+ 10
- 0
scenes/sub_scenes/ship.gd View File

@@ -0,0 +1,10 @@
extends Spatial

onready var creakAudio = get_node("RandomAudioStreamPlayer3D")
onready var timer = get_node("Timer")

func _on_Timer_timeout():
creakAudio.play()
timer.set_wait_time(5.0)

+ 161
- 4
scenes/sub_scenes/ship.tscn
File diff suppressed because it is too large
View File


+ 112
- 0
src/shader/sail.shader View File

@@ -0,0 +1,112 @@
shader_type spatial;
render_mode blend_mix, depth_draw_always, cull_back, diffuse_burley, specular_schlick_ggx;


uniform sampler2D noise1;
uniform sampler2D noise2;


void node_bsdf_principled(vec4 color, float subsurface, vec4 subsurface_color,
float metallic, float specular, float roughness, float clearcoat,
float clearcoat_roughness, float anisotropy, float transmission,
float IOR, out vec3 albedo, out float sss_strength_out,
out float metallic_out, out float specular_out,
out float roughness_out, out float clearcoat_out,
out float clearcoat_gloss_out, out float anisotropy_out,
out float transmission_out, out float ior) {
metallic = clamp(metallic, 0.0, 1.0);
transmission = clamp(transmission, 0.0, 1.0);

subsurface = subsurface * (1.0 - metallic);

albedo = mix(color.rgb, subsurface_color.rgb, subsurface);
sss_strength_out = subsurface;
metallic_out = metallic;
specular_out = pow((IOR - 1.0)/(IOR + 1.0), 2)/0.08;
roughness_out = roughness;
clearcoat_out = clearcoat * (1.0 - transmission);
clearcoat_gloss_out = 1.0 - clearcoat_roughness;
anisotropy_out = clamp(anisotropy, 0.0, 1.0);
transmission_out = (1.0 - transmission) * (1.0 - metallic);
ior = IOR;
}

void vertex () {
}

void fragment () {
// node: 'Principled BSDF'
// type: 'ShaderNodeBsdfPrincipled'
// input sockets handling
vec4 node0_in0_basecolor = vec4(0.09167075157165527, 0.46101850271224976, 1.0,
1.0);
float node0_in1_subsurface = float(0.0);
vec3 node0_in2_subsurfaceradius = vec3(1.0, 0.20000000298023224,
0.10000000149011612);
vec4 node0_in3_subsurfacecolor = vec4(0.8000000715255737, 0.7206057906150818,
0.7986864447593689, 1.0);
float node0_in4_metallic = float(0.0);
float node0_in5_specular = float(0.5681818127632141);
float node0_in6_speculartint = float(0.4636363685131073);
float node0_in7_roughness = float(0.25);
float node0_in8_anisotropic = float(0.0);
float node0_in9_anisotropicrotation = float(0.17272727191448212);
float node0_in10_sheen = float(0.16363635659217834);
float node0_in11_sheentint = float(0.5);
float node0_in12_clearcoat = float(0.0);
float node0_in13_clearcoatroughness = float(0.029999999329447746);
float node0_in14_ior = float(1.100000023841858);
float node0_in15_transmission = float(1.0);
float node0_in16_transmissionroughness = float(0.0);
vec4 node0_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
float node0_in18_alpha = float(1.0);
vec3 node0_in19_normal = NORMAL;
vec3 node0_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
vec3 node0_in21_tangent = TANGENT;
// output sockets definitions
vec3 node0_bsdf_out0_albedo;
float node0_bsdf_out1_sss_strength;
float node0_bsdf_out3_specular;
float node0_bsdf_out2_metallic;
float node0_bsdf_out4_roughness;
float node0_bsdf_out5_clearcoat;
float node0_bsdf_out6_clearcoat_gloss;
float node0_bsdf_out7_anisotropy;
float node0_bsdf_out8_transmission;
float node0_bsdf_out9_ior;
node_bsdf_principled(node0_in0_basecolor, node0_in1_subsurface,
node0_in3_subsurfacecolor, node0_in4_metallic, node0_in5_specular,
node0_in7_roughness, node0_in12_clearcoat, node0_in13_clearcoatroughness,
node0_in8_anisotropic, node0_in15_transmission, node0_in14_ior,
node0_bsdf_out0_albedo, node0_bsdf_out1_sss_strength, node0_bsdf_out2_metallic,
node0_bsdf_out3_specular, node0_bsdf_out4_roughness, node0_bsdf_out5_clearcoat,
node0_bsdf_out6_clearcoat_gloss, node0_bsdf_out7_anisotropy,
node0_bsdf_out8_transmission, node0_bsdf_out9_ior);
float t = TIME * 0.3;

ALPHA = mix(
smoothstep(0.3, 0.7, texture(noise1, UV + vec2(0.5, 1) * TIME * 0.16).r),
smoothstep(0.3, 0.7, texture(noise2, UV + vec2(0., 1.3) * TIME * 0.1).r),
mix(fract(t), 1. - fract(t), step(fract(t), 0.5))
) * 0.5;

ALBEDO = node0_bsdf_out0_albedo;
EMISSION = node0_bsdf_out0_albedo * 1.4;
SSS_STRENGTH = node0_bsdf_out1_sss_strength;
SPECULAR = node0_bsdf_out3_specular;
METALLIC = node0_bsdf_out2_metallic;
ROUGHNESS = node0_bsdf_out4_roughness;
CLEARCOAT = node0_bsdf_out5_clearcoat;
CLEARCOAT_GLOSS = node0_bsdf_out6_clearcoat_gloss;
NORMAL = node0_in19_normal;
// uncomment it when you need it
// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node0_bsdf_out8_transmission;
// uncomment it when you are modifing TANGENT
// TANGENT = normalize(cross(cross(node0_in21_tangent, NORMAL), NORMAL));
// BINORMAL = cross(TANGENT, NORMAL);
// uncomment it when you have tangent(UV) set
// ANISOTROPY = node0_bsdf_out7_anisotropy;
}

Loading…
Cancel
Save