Compare commits

..

2 Commits

Author SHA1 Message Date
Rob Kelly d762bfc8f1 Guard rail multimesh error fixes 2024-11-17 11:41:27 -07:00
Rob Kelly 9cc6036073 Autoshader & mountain rock texture 2024-11-16 16:59:30 -07:00
8 changed files with 64 additions and 30 deletions

Binary file not shown.

BIN
assets/textures/mountain_rock/mountain_rock_albedo.dds (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/textures/mountain_rock/mountain_rock_normal.dds (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=53 format=3 uid="uid://bm2o3mex10v11"]
[gd_scene load_steps=56 format=3 uid="uid://bm2o3mex10v11"]
[ext_resource type="Terrain3DStorage" uid="uid://bu1gewgsgc5hm" path="res://levels/debug_level/terrain_3d_storage.res" id="1_nlsu2"]
[ext_resource type="Texture2D" path="res://assets/textures/grass_fairway/grass_fairway_albedo.dds" id="2_e4m27"]
@ -11,14 +11,16 @@
[ext_resource type="Texture2D" path="res://assets/textures/sand_trap/sand_trap_normal.dds" id="7_f25dn"]
[ext_resource type="Texture2D" uid="uid://con5a36t6n6sq" path="res://assets/textures/clear_sea_water_2048x2048.png" id="7_t86h2"]
[ext_resource type="PackedScene" uid="uid://cy7t2tc4y3b4" path="res://src/player/shot_setup/shot_setup.tscn" id="8_h44v5"]
[ext_resource type="Texture2D" path="res://assets/textures/mountain_rock/mountain_rock_albedo.dds" id="8_ujbjy"]
[ext_resource type="Script" path="res://src/world/ball_zone/ball_zone.gd" id="9_jwlau"]
[ext_resource type="Texture2D" path="res://assets/textures/mountain_rock/mountain_rock_normal.dds" id="9_rrguh"]
[ext_resource type="PackedScene" uid="uid://dagh38vap4t1d" path="res://src/props/scenery/city/concrete_building_1.tscn" id="10_lf15j"]
[ext_resource type="PackedScene" uid="uid://cjubxs7peir5k" path="res://src/props/scenery/city/kana_signboard.tscn" id="11_evxup"]
[ext_resource type="PackedScene" uid="uid://di7aql54lksn7" path="res://src/props/scenery/trees/palm_tree/palm_tree.tscn" id="12_sswxf"]
[ext_resource type="PackedScene" uid="uid://c7l58wuuahn7w" path="res://src/props/flag/flag.tscn" id="13_6jtao"]
[ext_resource type="Texture2D" uid="uid://dj60e8ri2fco" path="res://assets/models/scenery/city/concrete_building_1/concrete_building_1.png" id="14_y7s2h"]
[ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="16_2m5yu"]
[ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail.tscn" id="16_xtxyj"]
[ext_resource type="PackedScene" uid="uid://nqar1qcun8ax" path="res://src/props/scenery/highway/guard_rail/guard_rail.tscn" id="16_xtxyj"]
[ext_resource type="PackedScene" uid="uid://d0tcr6uijpym5" path="res://src/props/scenery/highway/highway_road.tscn" id="17_amems"]
[ext_resource type="PackedScene" uid="uid://cblsayfgirexr" path="res://src/characters/umineko/umineko.tscn" id="21_ch6qk"]
@ -34,7 +36,11 @@ noise = SubResource("FastNoiseLite_rpgb7")
[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_woy2k"]
_shader_parameters = {
"blend_sharpness": 0.87,
"auto_base_texture": 3,
"auto_height_reduction": 0.1,
"auto_overlay_texture": 0,
"auto_slope": 0.41,
"blend_sharpness": 1.0,
"height_blending": true,
"macro_variation1": Color(0.964742, 0.964742, 0.964742, 1),
"macro_variation2": Color(1, 1, 1, 1),
@ -56,6 +62,7 @@ _shader_parameters = {
}
world_background = 2
texture_filtering = 1
auto_shader = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2u1w6"]
cull_mode = 2
@ -90,9 +97,16 @@ albedo_texture = ExtResource("6_nlea7")
normal_texture = ExtResource("7_f25dn")
uv_scale = 0.01
[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_13d2a"]
name = "mountain_rock_albedo"
id = 3
albedo_texture = ExtResource("8_ujbjy")
normal_texture = ExtResource("9_rrguh")
uv_scale = 0.02
[sub_resource type="Terrain3DAssets" id="Terrain3DAssets_eq5uw"]
mesh_list = Array[Terrain3DMeshAsset]([SubResource("Terrain3DMeshAsset_8g62o")])
texture_list = Array[Terrain3DTextureAsset]([SubResource("Terrain3DTextureAsset_kocfk"), SubResource("Terrain3DTextureAsset_vmhlw"), SubResource("Terrain3DTextureAsset_k6h8c")])
texture_list = Array[Terrain3DTextureAsset]([SubResource("Terrain3DTextureAsset_kocfk"), SubResource("Terrain3DTextureAsset_vmhlw"), SubResource("Terrain3DTextureAsset_k6h8c"), SubResource("Terrain3DTextureAsset_13d2a")])
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_h8tes"]
panorama = ExtResource("6_ectru")

BIN
levels/debug_level/terrain_3d_storage.res (Stored with Git LFS)

Binary file not shown.

View File

@ -23,9 +23,21 @@ var _dirty := false
@onready var post_multi_mesh: MultiMeshInstance3D = $PostMultiMesh
static var multimesh_mesh: Mesh = preload(
"res://src/props/scenery/highway/guard_rail/guard_rail_post_mesh.tres"
)
func _ready() -> void:
post_multi_mesh.multimesh = post_multi_mesh.multimesh.duplicate()
# Set up multimesh
# This is a workaround for an engine bug as of Godot 4.3
# ref: https://github.com/godotengine/godot/issues/68592
var multimesh := MultiMesh.new()
multimesh.transform_format = MultiMesh.TRANSFORM_3D
multimesh.instance_count = 0
multimesh.mesh = multimesh_mesh
post_multi_mesh.multimesh = multimesh
func _update_multimesh() -> void:

View File

@ -1,29 +1,12 @@
[gd_scene load_steps=7 format=3 uid="uid://nqar1qcun8ax"]
[gd_scene load_steps=5 format=3 uid="uid://nqar1qcun8ax"]
[ext_resource type="Script" path="res://src/props/scenery/highway/guard_rail.gd" id="1_imntf"]
[ext_resource type="Script" path="res://src/props/scenery/highway/guard_rail/guard_rail.gd" id="1_imntf"]
[ext_resource type="Material" uid="uid://cift6p0wn1oce" path="res://assets/materials/guard_rail.tres" id="2_1s4wy"]
[ext_resource type="PlaneMesh" uid="uid://bdcmgvgpj1e0w" path="res://src/props/scenery/highway/guard_rail/guard_rail_post_mesh.tres" id="3_hha2c"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_fo7j3"]
load_path = "res://.godot/imported/guard_rail_post.png-4447ff881a5916e5281ed251b7beecd0.ctex"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k1yjg"]
transparency = 2
alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0
albedo_texture = SubResource("CompressedTexture2D_fo7j3")
texture_filter = 4
texture_repeat = false
billboard_mode = 2
[sub_resource type="PlaneMesh" id="PlaneMesh_ko4yv"]
material = SubResource("StandardMaterial3D_k1yjg")
size = Vector2(0.5, 1)
center_offset = Vector3(0, 0.5, 0)
orientation = 2
[sub_resource type="MultiMesh" id="MultiMesh_ecm13"]
[sub_resource type="MultiMesh" id="MultiMesh_suiix"]
transform_format = 1
mesh = SubResource("PlaneMesh_ko4yv")
mesh = ExtResource("3_hha2c")
[node name="GuardRail" type="Path3D"]
script = ExtResource("1_imntf")
@ -59,6 +42,6 @@ path_joined = false
material = ExtResource("2_1s4wy")
[node name="PostMultiMesh" type="MultiMeshInstance3D" parent="."]
multimesh = SubResource("MultiMesh_ecm13")
multimesh = SubResource("MultiMesh_suiix")
[connection signal="curve_changed" from="." to="." method="_on_curve_changed"]

View File

@ -0,0 +1,19 @@
[gd_resource type="PlaneMesh" load_steps=3 format=3 uid="uid://bdcmgvgpj1e0w"]
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_fo7j3"]
load_path = "res://.godot/imported/guard_rail_post.png-4447ff881a5916e5281ed251b7beecd0.ctex"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k1yjg"]
transparency = 2
alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0
albedo_texture = SubResource("CompressedTexture2D_fo7j3")
texture_filter = 4
texture_repeat = false
billboard_mode = 2
[resource]
material = SubResource("StandardMaterial3D_k1yjg")
size = Vector2(0.5, 1)
center_offset = Vector3(0, 0.5, 0)
orientation = 2