Terrain setup

This commit is contained in:
2022-10-25 19:27:49 +03:00
parent 118e3df72f
commit e9ccbf5ce5
8 changed files with 96 additions and 5 deletions

View File

@@ -0,0 +1,65 @@
[gd_scene load_steps=6 format=2]
[sub_resource type="VoxelStreamSQLite" id=1]
[sub_resource type="OpenSimplexNoise" id=8]
lacunarity = 3.0
[sub_resource type="VoxelGeneratorGraph" id=9]
graph_data = {
"connections": [ [ 10, 0, 8, 1 ], [ 8, 0, 4, 0 ], [ 7, 0, 10, 1 ], [ 6, 0, 10, 0 ], [ 3, 0, 6, 1 ], [ 2, 0, 8, 0 ], [ 1, 0, 6, 0 ] ],
"nodes": {
"1": {
"gui_position": Vector2( 440, 50 ),
"type": "InputX"
},
"10": {
"gui_position": Vector2( 860, 240 ),
"type": "Multiply"
},
"2": {
"gui_position": Vector2( 440, 150 ),
"type": "InputY"
},
"3": {
"gui_position": Vector2( 440, 250 ),
"type": "InputZ"
},
"4": {
"gui_position": Vector2( 1160, 120 ),
"type": "OutputSDF"
},
"6": {
"gui_position": Vector2( 700, 220 ),
"noise": SubResource( 8 ),
"type": "Noise2D"
},
"7": {
"gui_position": Vector2( 540, 360 ),
"type": "Constant",
"value": 64.0
},
"8": {
"gui_position": Vector2( 1020, 140 ),
"type": "Subtract"
}
}
}
[sub_resource type="VoxelMesherTransvoxel" id=4]
texturing_mode = 1
mesh_optimization_enabled = true
[sub_resource type="SpatialMaterial" id=7]
[node name="main_data" type="Spatial"]
[node name="VoxelLodTerrain" type="VoxelLodTerrain" parent="."]
stream = SubResource( 1 )
generator = SubResource( 9 )
mesher = SubResource( 4 )
material = SubResource( 7 )
full_load_mode_enabled = true
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 300, 0 )