From 29187d4f4d18f77a859b23cb0b05215518401a1f Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Sun, 3 Nov 2024 10:07:21 -0700 Subject: [PATCH] Golf ball materials --- asset_dev/gfolfball.xcf | Bin 0 -> 27728 bytes assets/textures/gfolfball/gfolfball.png | 3 + .../textures/gfolfball/gfolfball.png.import | 35 ++++++++++ .../textures/gfolfball/gfolfball_normal.png | 3 + .../gfolfball/gfolfball_normal.png.import | 35 ++++++++++ src/player/physics_ball/physics_ball.tscn | 63 +++++------------- 6 files changed, 91 insertions(+), 48 deletions(-) create mode 100644 asset_dev/gfolfball.xcf create mode 100644 assets/textures/gfolfball/gfolfball.png create mode 100644 assets/textures/gfolfball/gfolfball.png.import create mode 100644 assets/textures/gfolfball/gfolfball_normal.png create mode 100644 assets/textures/gfolfball/gfolfball_normal.png.import diff --git a/asset_dev/gfolfball.xcf b/asset_dev/gfolfball.xcf new file mode 100644 index 0000000000000000000000000000000000000000..b60881860f8fa1d7f3630dec6f8cd057b279dc80 GIT binary patch literal 27728 zcmeHQ&2Jk;6ko3`(n12v=ZWg#FeAtIPRwY!gfjvhaheo zxN_%+#6Q7(|Bd|%xWzQf@6CRAz0KM)Ytl5;Z=ARDW@mPH=C^O&ycxfV+g^9zJZT;| zkGHnBEd)0v;eQ9c393|ZxC^>*AE$&6-U8J??}FZmc`5fc=pWFnHg3Jy?037Z-WX|1 zGVk0Uwi@Hsq4R?`e&~Gl^*7&2&YCLfbsO#0W_#!z$~h_h*ZOGuw9|4%{f>9Iv9f;D zZuUFbhX{y2%{h;QDczUQE%j101*;jQg#f8haxddDar86tA@E2ij2A8}g zUtumy*9WZTPw>no;8IY_OG@9f88_2rvrCm^QqIgf=nUqRGc6rQIisBEsHd5}rE@_J zR?1lp5RGwV26O5&>azlKBBcdYb85Iv3<%rJUse(deo(m}{E|>5aK)s8+bmfV(1N z!49}MZN9$G#cA`eLnvpIvxQ%}@yoV=lkBM>p}}3zxXDSj>37>3*O=y(TC|%^*M9&<0fEoINsWF5`X*&4ojHMhmjo?xS z2jy&PcjBcH}y502VjzoRm1Sy3Skc$bCb}5Pdhx@aSQ$UCZ1KlfL1OzC*`91 zm#pHMsv_=U-a2)~nFXhPv-U}Ss|9VThZU<*mblN5@Np00*PhM)Y2=d z4q?wM8e&q2^oJ3uS@cSdnH)3cTQ)R+=HoNXeK7`5RW^aTG07&?yV3sE(f22fVat)- zzG|OqvcFY|NBdiU1~=W`D*ScX-+gM9 z;Llm=95D?g{-u_1YH(_BLwUYd8l3V?`KEm9&T#VOIOE}rC$B&9>C3eTX@Nh#R(`pN zbHseH5>C8{H!YOB<)NFVg+dD@uRro>j+ch|g)3I{iAeoUlm#9_%M?--ZtLQ@UPKkR zz=uoFGv$;%!BJc)%f#aHFYe~$2wn_@Z5Lc%!OhJlKE!8U|DpWMmk;7YeCFwH>gW06 z8u3{UpM7!1bz>4Y<{I3X5v9M&^D6i)SEWJIa4f&+lLQxxQ0%vS{3ZA#xL|}3j=zgy z*+f_icC8A0lPkea{9`XW=|3UavFbQmM~PZ+di%#qEe#Lq@E&Z_UD%&^CMa=&-;J%o zdnj>w`zNWo8`;F$K_OO4_JCx)i7j+Sf>*AtrOM|ANvo_^Z2x4*Qd~!h^PIVq6 L=TFzHFrohdZ2qH{ literal 0 HcmV?d00001 diff --git a/assets/textures/gfolfball/gfolfball.png b/assets/textures/gfolfball/gfolfball.png new file mode 100644 index 0000000..04d2248 --- /dev/null +++ b/assets/textures/gfolfball/gfolfball.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:969429ccb984a7c4d967e6e1a35b55fcf88dc07b4a225e9c518cdf8117bca1f3 +size 772 diff --git a/assets/textures/gfolfball/gfolfball.png.import b/assets/textures/gfolfball/gfolfball.png.import new file mode 100644 index 0000000..8845c9a --- /dev/null +++ b/assets/textures/gfolfball/gfolfball.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckhiq6rfjv63u" +path.s3tc="res://.godot/imported/gfolfball.png-4fde775993c78b86828199273dc9e4be.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://assets/textures/gfolfball/gfolfball.png" +dest_files=["res://.godot/imported/gfolfball.png-4fde775993c78b86828199273dc9e4be.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/textures/gfolfball/gfolfball_normal.png b/assets/textures/gfolfball/gfolfball_normal.png new file mode 100644 index 0000000..c8d0386 --- /dev/null +++ b/assets/textures/gfolfball/gfolfball_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b3da2ca839574242f76db87ab649ed3355ada8e293c601bf0a2a0ab4a512e2a +size 18833 diff --git a/assets/textures/gfolfball/gfolfball_normal.png.import b/assets/textures/gfolfball/gfolfball_normal.png.import new file mode 100644 index 0000000..c8c9bdd --- /dev/null +++ b/assets/textures/gfolfball/gfolfball_normal.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btntjs7mbdigu" +path.s3tc="res://.godot/imported/gfolfball_normal.png-d9cc0e700a9a63c2e2cea72beebc6133.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://assets/textures/gfolfball/gfolfball_normal.png" +dest_files=["res://.godot/imported/gfolfball_normal.png-d9cc0e700a9a63c2e2cea72beebc6133.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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://assets/textures/gfolfball/gfolfball_normal.png" +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/src/player/physics_ball/physics_ball.tscn b/src/player/physics_ball/physics_ball.tscn index 75b3ef7..c7c01b4 100644 --- a/src/player/physics_ball/physics_ball.tscn +++ b/src/player/physics_ball/physics_ball.tscn @@ -1,58 +1,25 @@ -[gd_scene load_steps=12 format=3 uid="uid://dfttci386ohip"] +[gd_scene load_steps=7 format=3 uid="uid://dfttci386ohip"] + +[ext_resource type="Texture2D" uid="uid://ckhiq6rfjv63u" path="res://assets/textures/gfolfball/gfolfball.png" id="1_y3q5j"] +[ext_resource type="Texture2D" uid="uid://btntjs7mbdigu" path="res://assets/textures/gfolfball/gfolfball_normal.png" id="2_mx7l6"] [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_2gatw"] bounce = 0.5 -[sub_resource type="Gradient" id="Gradient_66vtd"] -offsets = PackedFloat32Array(0, 0.213823) - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_p7iuu"] -noise_type = 2 -frequency = 0.06 - -[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_wcxf4"] -width = 1024 -seamless = true -color_ramp = SubResource("Gradient_66vtd") -noise = SubResource("FastNoiseLite_p7iuu") - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_lplu7"] -noise_type = 2 -frequency = 0.06 -fractal_type = 2 -fractal_lacunarity = 1.0 -fractal_weighted_strength = 1.0 - -[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_rvc1j"] -width = 1024 -seamless = true -as_normal_map = true -noise = SubResource("FastNoiseLite_lplu7") - -[sub_resource type="FastNoiseLite" id="FastNoiseLite_3hdir"] -noise_type = 2 -frequency = 0.06 -fractal_type = 2 -fractal_lacunarity = 1.0 -fractal_weighted_strength = 1.0 - -[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_lb1l7"] -width = 1024 -invert = true -seamless = true -noise = SubResource("FastNoiseLite_3hdir") - -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bhmcr"] -albedo_texture = SubResource("NoiseTexture2D_wcxf4") +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xqofq"] +albedo_texture = ExtResource("1_y3q5j") +albedo_texture_force_srgb = true metallic = 0.27 -roughness = 0.4 -roughness_texture = SubResource("NoiseTexture2D_lb1l7") +roughness = 0.67 normal_enabled = true -normal_texture = SubResource("NoiseTexture2D_rvc1j") +normal_scale = 0.2 +normal_texture = ExtResource("2_mx7l6") clearcoat_roughness = 0.0 +uv1_scale = Vector3(3, 1.5, 3) +texture_filter = 4 -[sub_resource type="SphereMesh" id="SphereMesh_l3o3t"] -material = SubResource("StandardMaterial3D_bhmcr") +[sub_resource type="SphereMesh" id="SphereMesh_y0d13"] +material = SubResource("StandardMaterial3D_xqofq") radius = 0.05 height = 0.1 radial_segments = 6 @@ -69,7 +36,7 @@ continuous_cd = true linear_damp_mode = 1 [node name="BallMesh" type="MeshInstance3D" parent="."] -mesh = SubResource("SphereMesh_l3o3t") +mesh = SubResource("SphereMesh_y0d13") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] shape = SubResource("SphereShape3D_0hvq6")