Added flapping flag

This commit is contained in:
Rob Kelly 2024-11-08 18:28:56 -07:00
parent dc19c851ec
commit a50e51fdac
11 changed files with 2860 additions and 1 deletions

BIN
asset_dev/flag/flag.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
asset_dev/flag/flag.blend1 Normal file

Binary file not shown.

BIN
asset_dev/flag/flag.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
asset_dev/flag/flag.xcf Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,952 @@
{
"asset":{
"generator":"Khronos glTF Blender I/O v4.2.60",
"version":"2.0"
},
"scene":0,
"scenes":[
{
"name":"Scene",
"nodes":[
0,
7
]
}
],
"nodes":[
{
"mesh":0,
"name":"Pole"
},
{
"name":"Bone.004",
"translation":[
8.696646088137512e-19,
0.2499999850988388,
3.278353943869661e-08
]
},
{
"children":[
1
],
"name":"Bone.003",
"translation":[
8.696513739239503e-19,
0.25,
2.1855694143368964e-08
]
},
{
"children":[
2
],
"name":"Bone.002",
"translation":[
8.696447564790499e-19,
0.25,
1.0927847071684482e-08
]
},
{
"children":[
3
],
"name":"Bone",
"translation":[
8.696381390341495e-19,
0,
0
]
},
{
"name":"neutral_bone",
"rotation":[
-0.7071067690849304,
0,
0,
0.7071067690849304
]
},
{
"mesh":1,
"name":"Flag",
"skin":0
},
{
"children":[
6,
4,
5
],
"name":"Armature",
"rotation":[
-0.7071068286895752,
0,
0,
0.7071068286895752
],
"translation":[
0,
3.691416025161743,
0
]
}
],
"animations":[
{
"channels":[
{
"sampler":0,
"target":{
"node":4,
"path":"translation"
}
},
{
"sampler":1,
"target":{
"node":4,
"path":"rotation"
}
},
{
"sampler":2,
"target":{
"node":4,
"path":"scale"
}
},
{
"sampler":3,
"target":{
"node":3,
"path":"translation"
}
},
{
"sampler":4,
"target":{
"node":3,
"path":"rotation"
}
},
{
"sampler":5,
"target":{
"node":3,
"path":"scale"
}
},
{
"sampler":6,
"target":{
"node":2,
"path":"translation"
}
},
{
"sampler":7,
"target":{
"node":2,
"path":"rotation"
}
},
{
"sampler":8,
"target":{
"node":2,
"path":"scale"
}
},
{
"sampler":9,
"target":{
"node":1,
"path":"translation"
}
},
{
"sampler":10,
"target":{
"node":1,
"path":"rotation"
}
},
{
"sampler":11,
"target":{
"node":1,
"path":"scale"
}
}
],
"name":"flap",
"samplers":[
{
"input":11,
"interpolation":"STEP",
"output":12
},
{
"input":13,
"interpolation":"LINEAR",
"output":14
},
{
"input":11,
"interpolation":"LINEAR",
"output":15
},
{
"input":11,
"interpolation":"LINEAR",
"output":16
},
{
"input":13,
"interpolation":"LINEAR",
"output":17
},
{
"input":11,
"interpolation":"LINEAR",
"output":18
},
{
"input":11,
"interpolation":"LINEAR",
"output":19
},
{
"input":13,
"interpolation":"LINEAR",
"output":20
},
{
"input":11,
"interpolation":"LINEAR",
"output":21
},
{
"input":11,
"interpolation":"LINEAR",
"output":22
},
{
"input":13,
"interpolation":"LINEAR",
"output":23
},
{
"input":11,
"interpolation":"LINEAR",
"output":24
}
]
},
{
"channels":[
{
"sampler":0,
"target":{
"node":4,
"path":"translation"
}
},
{
"sampler":1,
"target":{
"node":4,
"path":"rotation"
}
},
{
"sampler":2,
"target":{
"node":4,
"path":"scale"
}
},
{
"sampler":3,
"target":{
"node":3,
"path":"translation"
}
},
{
"sampler":4,
"target":{
"node":3,
"path":"rotation"
}
},
{
"sampler":5,
"target":{
"node":3,
"path":"scale"
}
},
{
"sampler":6,
"target":{
"node":2,
"path":"translation"
}
},
{
"sampler":7,
"target":{
"node":2,
"path":"rotation"
}
},
{
"sampler":8,
"target":{
"node":2,
"path":"scale"
}
},
{
"sampler":9,
"target":{
"node":1,
"path":"translation"
}
},
{
"sampler":10,
"target":{
"node":1,
"path":"rotation"
}
},
{
"sampler":11,
"target":{
"node":1,
"path":"scale"
}
}
],
"name":"RESET",
"samplers":[
{
"input":25,
"interpolation":"LINEAR",
"output":26
},
{
"input":25,
"interpolation":"LINEAR",
"output":27
},
{
"input":25,
"interpolation":"LINEAR",
"output":28
},
{
"input":25,
"interpolation":"LINEAR",
"output":29
},
{
"input":25,
"interpolation":"LINEAR",
"output":30
},
{
"input":25,
"interpolation":"LINEAR",
"output":31
},
{
"input":25,
"interpolation":"LINEAR",
"output":32
},
{
"input":25,
"interpolation":"LINEAR",
"output":33
},
{
"input":25,
"interpolation":"LINEAR",
"output":34
},
{
"input":25,
"interpolation":"LINEAR",
"output":35
},
{
"input":25,
"interpolation":"LINEAR",
"output":36
},
{
"input":25,
"interpolation":"LINEAR",
"output":37
}
]
}
],
"materials":[
{
"doubleSided":true,
"name":"Flagpole",
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
},
"metallicFactor":0
}
}
],
"meshes":[
{
"name":"Cylinder",
"primitives":[
{
"attributes":{
"POSITION":0,
"NORMAL":1,
"TEXCOORD_0":2
},
"indices":3,
"material":0
}
]
},
{
"name":"Plane",
"primitives":[
{
"attributes":{
"POSITION":4,
"NORMAL":5,
"TEXCOORD_0":6,
"JOINTS_0":7,
"WEIGHTS_0":8
},
"indices":9,
"material":0
}
]
}
],
"textures":[
{
"sampler":0,
"source":0
}
],
"images":[
{
"mimeType":"image/png",
"name":"flag",
"uri":"flag.png"
}
],
"skins":[
{
"inverseBindMatrices":10,
"joints":[
4,
3,
2,
1,
5
],
"name":"Armature"
}
],
"accessors":[
{
"bufferView":0,
"componentType":5126,
"count":36,
"max":[
0.021650634706020355,
4,
0.02500000037252903
],
"min":[
-0.021650634706020355,
0,
-0.02500000037252903
],
"type":"VEC3"
},
{
"bufferView":1,
"componentType":5126,
"count":36,
"type":"VEC3"
},
{
"bufferView":2,
"componentType":5126,
"count":36,
"type":"VEC2"
},
{
"bufferView":3,
"componentType":5123,
"count":60,
"type":"SCALAR"
},
{
"bufferView":4,
"componentType":5126,
"count":12,
"max":[
7.546751845666222e-08,
3.9779999256134033,
0
],
"min":[
-3.0382807381101884e-11,
3.359999895095825,
-1
],
"type":"VEC3"
},
{
"bufferView":5,
"componentType":5126,
"count":12,
"type":"VEC3"
},
{
"bufferView":6,
"componentType":5126,
"count":12,
"type":"VEC2"
},
{
"bufferView":7,
"componentType":5121,
"count":12,
"type":"VEC4"
},
{
"bufferView":8,
"componentType":5126,
"count":12,
"type":"VEC4"
},
{
"bufferView":9,
"componentType":5123,
"count":30,
"type":"SCALAR"
},
{
"bufferView":10,
"componentType":5126,
"count":5,
"type":"MAT4"
},
{
"bufferView":11,
"componentType":5126,
"count":2,
"max":[
3.9583333333333335
],
"min":[
0.041666666666666664
],
"type":"SCALAR"
},
{
"bufferView":12,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":13,
"componentType":5126,
"count":95,
"max":[
3.9583333333333335
],
"min":[
0.041666666666666664
],
"type":"SCALAR"
},
{
"bufferView":14,
"componentType":5126,
"count":95,
"type":"VEC4"
},
{
"bufferView":15,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":16,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":17,
"componentType":5126,
"count":95,
"type":"VEC4"
},
{
"bufferView":18,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":19,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":20,
"componentType":5126,
"count":95,
"type":"VEC4"
},
{
"bufferView":21,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":22,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":23,
"componentType":5126,
"count":95,
"type":"VEC4"
},
{
"bufferView":24,
"componentType":5126,
"count":2,
"type":"VEC3"
},
{
"bufferView":25,
"componentType":5126,
"count":1,
"max":[
0
],
"min":[
0
],
"type":"SCALAR"
},
{
"bufferView":26,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":27,
"componentType":5126,
"count":1,
"type":"VEC4"
},
{
"bufferView":28,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":29,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":30,
"componentType":5126,
"count":1,
"type":"VEC4"
},
{
"bufferView":31,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":32,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":33,
"componentType":5126,
"count":1,
"type":"VEC4"
},
{
"bufferView":34,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":35,
"componentType":5126,
"count":1,
"type":"VEC3"
},
{
"bufferView":36,
"componentType":5126,
"count":1,
"type":"VEC4"
},
{
"bufferView":37,
"componentType":5126,
"count":1,
"type":"VEC3"
}
],
"bufferViews":[
{
"buffer":0,
"byteLength":432,
"byteOffset":0,
"target":34962
},
{
"buffer":0,
"byteLength":432,
"byteOffset":432,
"target":34962
},
{
"buffer":0,
"byteLength":288,
"byteOffset":864,
"target":34962
},
{
"buffer":0,
"byteLength":120,
"byteOffset":1152,
"target":34963
},
{
"buffer":0,
"byteLength":144,
"byteOffset":1272,
"target":34962
},
{
"buffer":0,
"byteLength":144,
"byteOffset":1416,
"target":34962
},
{
"buffer":0,
"byteLength":96,
"byteOffset":1560,
"target":34962
},
{
"buffer":0,
"byteLength":48,
"byteOffset":1656,
"target":34962
},
{
"buffer":0,
"byteLength":192,
"byteOffset":1704,
"target":34962
},
{
"buffer":0,
"byteLength":60,
"byteOffset":1896,
"target":34963
},
{
"buffer":0,
"byteLength":320,
"byteOffset":1956
},
{
"buffer":0,
"byteLength":8,
"byteOffset":2276
},
{
"buffer":0,
"byteLength":24,
"byteOffset":2284
},
{
"buffer":0,
"byteLength":380,
"byteOffset":2308
},
{
"buffer":0,
"byteLength":1520,
"byteOffset":2688
},
{
"buffer":0,
"byteLength":24,
"byteOffset":4208
},
{
"buffer":0,
"byteLength":24,
"byteOffset":4232
},
{
"buffer":0,
"byteLength":1520,
"byteOffset":4256
},
{
"buffer":0,
"byteLength":24,
"byteOffset":5776
},
{
"buffer":0,
"byteLength":24,
"byteOffset":5800
},
{
"buffer":0,
"byteLength":1520,
"byteOffset":5824
},
{
"buffer":0,
"byteLength":24,
"byteOffset":7344
},
{
"buffer":0,
"byteLength":24,
"byteOffset":7368
},
{
"buffer":0,
"byteLength":1520,
"byteOffset":7392
},
{
"buffer":0,
"byteLength":24,
"byteOffset":8912
},
{
"buffer":0,
"byteLength":4,
"byteOffset":8936
},
{
"buffer":0,
"byteLength":12,
"byteOffset":8940
},
{
"buffer":0,
"byteLength":16,
"byteOffset":8952
},
{
"buffer":0,
"byteLength":12,
"byteOffset":8968
},
{
"buffer":0,
"byteLength":12,
"byteOffset":8980
},
{
"buffer":0,
"byteLength":16,
"byteOffset":8992
},
{
"buffer":0,
"byteLength":12,
"byteOffset":9008
},
{
"buffer":0,
"byteLength":12,
"byteOffset":9020
},
{
"buffer":0,
"byteLength":16,
"byteOffset":9032
},
{
"buffer":0,
"byteLength":12,
"byteOffset":9048
},
{
"buffer":0,
"byteLength":12,
"byteOffset":9060
},
{
"buffer":0,
"byteLength":16,
"byteOffset":9072
},
{
"buffer":0,
"byteLength":12,
"byteOffset":9088
}
],
"samplers":[
{
"magFilter":9728,
"minFilter":9984
}
],
"buffers":[
{
"byteLength":9100,
"uri":"flag.bin"
}
]
}

File diff suppressed because it is too large Load Diff

BIN
assets/models/course/flag/flag.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b158xyq6xqfpu"
path="res://.godot/imported/flag.png-2071337fc652dd3d188d49b84758c867.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/models/course/flag/flag.png"
dest_files=["res://.godot/imported/flag.png-2071337fc652dd3d188d49b84758c867.ctex"]
[params]
compress/mode=0
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

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=29 format=3 uid="uid://bm2o3mex10v11"]
[gd_scene load_steps=30 format=3 uid="uid://bm2o3mex10v11"]
[ext_resource type="Terrain3DStorage" uid="uid://bu1gewgsgc5hm" path="res://levels/debug_level/terrain_3d_storage.res" id="1_nlsu2"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_fairway/grass_fairway_albedo.dds" id="2_e4m27"]
@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://dagh38vap4t1d" path="res://src/scenery/city/concrete_building_1.tscn" id="10_lf15j"]
[ext_resource type="PackedScene" uid="uid://cjubxs7peir5k" path="res://src/scenery/city/kana_signboard.tscn" id="11_evxup"]
[ext_resource type="PackedScene" uid="uid://di7aql54lksn7" path="res://src/scenery/trees/palm_tree/palm_tree.tscn" id="12_sswxf"]
[ext_resource type="PackedScene" uid="uid://c7l58wuuahn7w" path="res://src/props/flag.tscn" id="13_6jtao"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rpgb7"]
noise_type = 0
@ -160,3 +161,6 @@ transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0,
[node name="PalmTree" parent="." instance=ExtResource("12_sswxf")]
transform = Transform3D(-0.69799, 0, -0.716107, 0, 1, 0, 0.716107, 0, -0.69799, 140.872, -9.53674e-07, 296.932)
[node name="Flag" parent="." instance=ExtResource("13_6jtao")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 540, 4, 452)

22
src/props/flag.tscn Normal file
View File

@ -0,0 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://c7l58wuuahn7w"]
[ext_resource type="PackedScene" uid="uid://dqj60gh364mn5" path="res://assets/models/course/flag/flag.gltf" id="1_ona6u"]
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_8ynho"]
data = PackedVector3Array(0, 0, -0.025, 0.0217, 4, -0.0125, 0, 4, -0.025, 0, 0, -0.025, 0.0217, 0, -0.0125, 0.0217, 4, -0.0125, 0.0217, 0, -0.0125, 0.0217, 4, 0.0125, 0.0217, 4, -0.0125, 0.0217, 0, -0.0125, 0.0217, 0, 0.0125, 0.0217, 4, 0.0125, 0.0217, 0, 0.0125, 0, 4, 0.025, 0.0217, 4, 0.0125, 0.0217, 0, 0.0125, 0, 0, 0.025, 0, 4, 0.025, 0, 0, 0.025, -0.0217, 4, 0.0125, 0, 4, 0.025, 0, 0, 0.025, -0.0217, 0, 0.0125, -0.0217, 4, 0.0125, 0.0217, 4, 0.0125, 0, 4, -0.025, 0.0217, 4, -0.0125, 0, 4, -0.025, -0.0217, 4, 0.0125, -0.0217, 4, -0.0125, -0.0217, 4, 0.0125, 0.0217, 4, 0.0125, 0, 4, 0.025, 0, 4, -0.025, 0.0217, 4, 0.0125, -0.0217, 4, 0.0125, -0.0217, 0, 0.0125, -0.0217, 4, -0.0125, -0.0217, 4, 0.0125, -0.0217, 0, 0.0125, -0.0217, 0, -0.0125, -0.0217, 4, -0.0125, -0.0217, 0, -0.0125, 0, 4, -0.025, -0.0217, 4, -0.0125, -0.0217, 0, -0.0125, 0, 0, -0.025, 0, 4, -0.025, -0.0217, 0, -0.0125, 0.0217, 0, -0.0125, 0, 0, -0.025, 0.0217, 0, -0.0125, 0, 0, 0.025, 0.0217, 0, 0.0125, 0, 0, 0.025, -0.0217, 0, -0.0125, -0.0217, 0, 0.0125, 0.0217, 0, -0.0125, -0.0217, 0, -0.0125, 0, 0, 0.025)
[node name="Flag" instance=ExtResource("1_ona6u")]
[node name="Skeleton3D" parent="Armature" index="0"]
bones/0/rotation = Quaternion(-0.0471389, 2.3332e-10, 0.0444053, 0.997901)
bones/1/rotation = Quaternion(0.0386832, 1.17539e-09, -0.132427, 0.990438)
bones/2/rotation = Quaternion(0.0115124, 5.9748e-10, -0.225305, 0.97422)
bones/3/rotation = Quaternion(0.0192265, 9.31804e-10, 0.0257598, 0.999483)
[node name="AnimationPlayer" parent="." index="2"]
autoplay = "flap"
[node name="StaticBody3D" type="StaticBody3D" parent="." index="3"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_8ynho")