feat: lazy loading of terrain chunk LODs

This commit is contained in:
Sara Gerretsen 2025-12-08 19:46:29 +01:00
parent 90c46e30d2
commit 2a3eeef522
4 changed files with 48 additions and 28 deletions

View file

@ -4,5 +4,5 @@
[node name="TerrainChunk" type="TerrainChunk" unique_id=1453572398]
material_override = ExtResource("1_6vjd7")
size = 50.0
lod0_detail = 100
size = 40.0
lod0_detail = 80

View file

@ -31,6 +31,7 @@ noise = SubResource("FastNoiseLite_b1cmn")
noise_amplitude = 5.0
[sub_resource type="FastNoiseLite" id="FastNoiseLite_ba0ut"]
frequency = 0.0163
fractal_type = 2
fractal_gain = 1.0
fractal_weighted_strength = 0.58
@ -132,7 +133,7 @@ load_path = "res://.godot/imported/point.svg-e68fd7c1e788d2c48d769cc58eba6e98.ct
primitives = [SubResource("PointPrimitive_5tm2q"), SubResource("NoisePrimitive_ba0ut"), SubResource("NoisePrimitive_pxqd5"), SubResource("NoisePrimitive_q68jb"), SubResource("PlanePrimitive_ba0ut")]
vertex_color_gradient = SubResource("Gradient_b1cmn")
color_gradient_end_height = 100.0
chunk_count = 4
chunk_count = 8
chunk_scene = ExtResource("1_pxqd5")
point_primitive_object = ExtResource("1_b1cmn")
@ -176,17 +177,6 @@ current_tab = 0
layout_mode = 2
metadata/_tab_index = 0
[node name="Tree" type="PrimitiveLayerList" parent="LeftPanel/VBoxContainer/Layers/Layers" unique_id=797700186 node_paths=PackedStringArray("terrain")]
layout_mode = 2
size_flags_vertical = 3
scroll_horizontal_enabled = false
terrain = NodePath("../../../../../TerrainMeshEditor")
icons = {
&"NoisePrimitive": ExtResource("5_eqbpn"),
&"PlanePrimitive": ExtResource("4_xg7d5"),
&"PointPrimitive": ExtResource("4_5lcyj")
}
[node name="HBoxContainer" type="HBoxContainer" parent="LeftPanel/VBoxContainer/Layers/Layers" unique_id=702489990]
layout_mode = 2
size_flags_vertical = 8
@ -222,6 +212,17 @@ expand_icon = true
primitive_blueprint = SubResource("NoisePrimitive_5lcyj")
terrain = NodePath("../../../../../../TerrainMeshEditor")
[node name="Tree" type="PrimitiveLayerList" parent="LeftPanel/VBoxContainer/Layers/Layers" unique_id=797700186 node_paths=PackedStringArray("terrain")]
layout_mode = 2
size_flags_vertical = 3
scroll_horizontal_enabled = false
terrain = NodePath("../../../../../TerrainMeshEditor")
icons = {
&"NoisePrimitive": ExtResource("5_eqbpn"),
&"PlanePrimitive": ExtResource("4_xg7d5"),
&"PointPrimitive": ExtResource("4_5lcyj")
}
[node name="Inspector" type="TabContainer" parent="LeftPanel/VBoxContainer" unique_id=240272030]
layout_mode = 2
size_flags_vertical = 3