diff --git a/project/demo/Demo.tscn b/project/demo/Demo.tscn index 0d680645..47ab7ab9 100644 --- a/project/demo/Demo.tscn +++ b/project/demo/Demo.tscn @@ -7,7 +7,7 @@ [ext_resource type="PackedScene" uid="uid://djhl3foqkj4e2" path="res://demo/components/Tunnel.tscn" id="3_kdh0b"] [ext_resource type="PackedScene" uid="uid://bb2lp50sjndus" path="res://demo/components/World.tscn" id="3_yqldq"] [ext_resource type="Terrain3DStorage" uid="uid://lalq1xnmbjdl" path="res://demo/data/terrain_storage.res" id="5_sl43a"] -[ext_resource type="Terrain3DTextureList" uid="uid://dal3jhw6241qg" path="res://demo/data/assets.tres" id="8_g2of2"] +[ext_resource type="Terrain3DAssets" uid="uid://dal3jhw6241qg" path="res://demo/data/assets.tres" id="8_g2of2"] [sub_resource type="Gradient" id="Gradient_vr1m7"] offsets = PackedFloat32Array(0.2, 1) @@ -85,7 +85,7 @@ transform = Transform3D(0.176947, 0, -0.98422, 0, 1, 0, 0.98422, 0, 0.176947, 22 [node name="Terrain3D" type="Terrain3D" parent="."] storage = ExtResource("5_sl43a") material = SubResource("Terrain3DMaterial_jrc01") -texture_list = ExtResource("8_g2of2") +assets = ExtResource("8_g2of2") render_cull_margin = 1000.0 collision_mask = 3 mesh_size = 64 diff --git a/project/demo/data/assets.tres b/project/demo/data/assets.tres index de033213..9004e88e 100644 --- a/project/demo/data/assets.tres +++ b/project/demo/data/assets.tres @@ -1,22 +1,35 @@ -[gd_resource type="Terrain3DTextureList" load_steps=7 format=3 uid="uid://dal3jhw6241qg"] +[gd_resource type="Terrain3DAssets" load_steps=9 format=3 uid="uid://dal3jhw6241qg"] [ext_resource type="Texture2D" uid="uid://br7bfxcxh60df" path="res://demo/assets/textures/rock030_alb_ht.png" id="1_v81ad"] [ext_resource type="Texture2D" uid="uid://cr72kjil43vgj" path="res://demo/assets/textures/rock030_nrm_rgh.png" id="2_72dup"] [ext_resource type="Texture2D" uid="uid://ddprscrpsofah" path="res://demo/assets/textures/ground037_alb_ht.png" id="3_g8f2m"] [ext_resource type="Texture2D" uid="uid://c1ots7w6i0i1q" path="res://demo/assets/textures/ground037_nrm_rgh.png" id="4_aw5y1"] -[sub_resource type="Terrain3DTexture" id="Terrain3DTexture_x74kb"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6fvgb"] +cull_mode = 2 +vertex_color_use_as_albedo = true +backlight_enabled = true +backlight = Color(0.5, 0.5, 0.5, 1) + +[sub_resource type="Terrain3DMeshAsset" id="Terrain3DMeshAsset_xqljq"] +height_offset = 0.5 +density = 10.0 +material_override = SubResource("StandardMaterial3D_6fvgb") +generated_type = 1 + +[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_mup2f"] name = "Rock" albedo_color = Color(1.596, 1.56, 1.5, 1) albedo_texture = ExtResource("1_v81ad") normal_texture = ExtResource("2_72dup") -[sub_resource type="Terrain3DTexture" id="Terrain3DTexture_56fwf"] +[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_od0q7"] name = "Grass" -texture_id = 1 +id = 1 albedo_color = Color(0.67451, 0.74902, 0.686275, 1) albedo_texture = ExtResource("3_g8f2m") normal_texture = ExtResource("4_aw5y1") [resource] -textures = Array[Terrain3DTexture]([SubResource("Terrain3DTexture_x74kb"), SubResource("Terrain3DTexture_56fwf")]) +mesh_list = Array[Terrain3DMeshAsset]([SubResource("Terrain3DMeshAsset_xqljq")]) +texture_list = Array[Terrain3DTextureAsset]([SubResource("Terrain3DTextureAsset_mup2f"), SubResource("Terrain3DTextureAsset_od0q7")]) diff --git a/project/demo/data/terrain_storage.res b/project/demo/data/terrain_storage.res index d5ede72d..f3603431 100644 Binary files a/project/demo/data/terrain_storage.res and b/project/demo/data/terrain_storage.res differ