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,11 +1,15 @@
[gd_scene load_steps=13 format=3 uid="uid://bwcevwwphdvq"]
[gd_scene load_steps=17 format=3 uid="uid://bwcevwwphdvq"]
[ext_resource type="Script" uid="uid://bq7hia2dit80y" path="res://Entities/GroundTile/ground_tile.gd" id="1_uwxqs"]
[ext_resource type="Script" uid="uid://bq7hia2dit80y" path="res://Entities/GroundTile/scripts/ground_tile.gd" id="1_uwxqs"]
[ext_resource type="ArrayMesh" uid="uid://duj6747nq4qsk" path="res://Stages/Test3D/assets/stylizedGrassMeshes/grass.res" id="3_8mhad"]
[ext_resource type="Script" uid="uid://cacp8ncwuofuj" path="res://Entities/GroundTile/scripts/grass.gd" id="3_224hx"]
[ext_resource type="Material" uid="uid://b1miqvl8lus75" path="res://Stages/Test3D/GrassMaterialOverride.tres" id="3_f37ob"]
[ext_resource type="Script" uid="uid://btju6b83mvgvk" path="res://Entities/GroundTile/scripts/grass_multimesh.gd" id="4_3wpcb"]
[ext_resource type="Script" uid="uid://bt67yhdkwtqy5" path="res://Entities/GroundTile/scripts/bushes.gd" id="6_224hx"]
[ext_resource type="Script" uid="uid://cqko4m7cbxsfb" path="res://Entities/GroundTile/scripts/trees.gd" id="7_7lc7k"]
[ext_resource type="Script" uid="uid://dri5tubavplji" path="res://Entities/GroundTile/scripts/bush_multimesh.gd" id="7_jysav"]
[ext_resource type="Script" uid="uid://d3s0u7rm1y7i6" path="res://Entities/GroundTile/scripts/flower_multimesh.gd" id="8_jysav"]
[ext_resource type="Script" uid="uid://18vxtm3ua4x0" path="res://Entities/GroundTile/scripts/flowers.gd" id="8_q0r4p"]
[sub_resource type="ViewportTexture" id="ViewportTexture_h4g11"]
viewport_path = NodePath("DebugText/DebugTextViewport")
@ -67,5 +71,33 @@ script = ExtResource("4_3wpcb")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0111763, 0)
mesh = SubResource("PlaneMesh_f37ob")
[node name="Bushes" type="Node3D" parent="."]
script = ExtResource("6_224hx")
[node name="BushMultimesh" type="MultiMeshInstance3D" parent="Bushes"]
cast_shadow = 0
multimesh = SubResource("MultiMesh_3wpcb")
script = ExtResource("7_jysav")
[node name="BushTarget" type="MeshInstance3D" parent="Bushes"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0111763, 0)
mesh = SubResource("PlaneMesh_f37ob")
[node name="Flowers" type="Node3D" parent="."]
script = ExtResource("8_q0r4p")
[node name="FlowerMultimesh" type="MultiMeshInstance3D" parent="Flowers"]
cast_shadow = 0
multimesh = SubResource("MultiMesh_3wpcb")
script = ExtResource("8_jysav")
[node name="FloewerTarget" type="MeshInstance3D" parent="Flowers"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0111763, 0)
mesh = SubResource("PlaneMesh_f37ob")
[node name="Trees" type="Node3D" parent="."]
script = ExtResource("7_7lc7k")
[node name="Special" type="Node3D" parent="."]
[node name="Rocks" type="Node3D" parent="Special"]