Adds bushes and flowers to ground tiles

Implements bush and flower spawning on ground tiles based on vegetation density.
Adds new assets for bushes and flowers, and introduces multi-mesh rendering for optimized performance.
Introduces seasonal color variations for vegetation using a shader for bushes and materials for flowers and grass.
Refactors material application into a MaterialManager to handle material assignments over multiple frames.
Moves ground tile scripts into a subfolder.
Adds floating particles to test scene.
This commit is contained in:
Dan Baker 2025-06-29 10:58:18 +01:00
parent ea5006e8a2
commit 3959333534
46 changed files with 559 additions and 77 deletions

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c8kl0a1nstbuc"
path="res://.godot/imported/flower_purpleB.glb-69a5b0606a51601fdd91762f296ce88b.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/flower_purpleB.glb"
dest_files=["res://.godot/imported/flower_purpleB.glb-69a5b0606a51601fdd91762f296ce88b.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c3objh5he4fv7"
path="res://.godot/imported/plant_bush.glb-e9806d63c67fa60c2bf9125a46d34412.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bush.glb"
dest_files=["res://.godot/imported/plant_bush.glb-e9806d63c67fa60c2bf9125a46d34412.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cefyfwcx88gn8"
path="res://.godot/imported/plant_bushDetailed.glb-b49c41eb141c3e76fb272adf14466b5a.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bushDetailed.glb"
dest_files=["res://.godot/imported/plant_bushDetailed.glb-b49c41eb141c3e76fb272adf14466b5a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bqh742nyfy67t"
path="res://.godot/imported/plant_bushLarge.glb-444f7e2fefa42d9967360c2460aba973.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bushLarge.glb"
dest_files=["res://.godot/imported/plant_bushLarge.glb-444f7e2fefa42d9967360c2460aba973.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://xj45kysvl047"
path="res://.godot/imported/plant_bushLargeTriangle.glb-9e831461ae4497bcbdb95549623cbaf6.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bushLargeTriangle.glb"
dest_files=["res://.godot/imported/plant_bushLargeTriangle.glb-9e831461ae4497bcbdb95549623cbaf6.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cjoyr61xdo3hx"
path="res://.godot/imported/plant_bushSmall.glb-636059e56114bd2f2c7902ac6a574e3a.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bushSmall.glb"
dest_files=["res://.godot/imported/plant_bushSmall.glb-636059e56114bd2f2c7902ac6a574e3a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -1,37 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dsch27pqxgud5"
path="res://.godot/imported/plant_bushTriangle.glb-68d6459f20861ebce284d042b5ea0419.scn"
[deps]
source_file="res://Entities/Tree/assets/temp/plant_bushTriangle.glb"
dest_files=["res://.godot/imported/plant_bushTriangle.glb-68d6459f20861ebce284d042b5ea0419.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
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=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View file

@ -104,5 +104,5 @@ func update_material_in_mesh_instance(mesh_instance: MeshInstance3D, material_na
func apply_material_with_queue(mesh_instance: MeshInstance3D, index: int, material: StandardMaterial3D):
ColorData.queue_material_application(mesh_instance, index, material)
MaterialManager.queue_material_application(mesh_instance, index, material)
return

View file

@ -33,7 +33,7 @@ func spawn_model():
# Instantiate the model from the TreeDataResource
model_instance = tree_data.model.instantiate()
tree_data.apply_seasonal_colors(model_instance, "spring")
tree_data.apply_seasonal_colors(model_instance, Season.current)
add_child(model_instance)