Add grass texture and soften world lighting
This commit is contained in:
parent
1dabdd0d23
commit
67d17074b2
8 changed files with 98 additions and 4 deletions
BIN
art/exported/environment/textures/grass_olive_tile.png
Normal file
BIN
art/exported/environment/textures/grass_olive_tile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 554 B |
|
|
@ -0,0 +1,41 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://btxhq3rdlum2"
|
||||||
|
path.s3tc="res://.godot/imported/grass_olive_tile.png-72072a382d0948818df97773afa5493f.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/exported/environment/textures/grass_olive_tile.png"
|
||||||
|
dest_files=["res://.godot/imported/grass_olive_tile.png-72072a382d0948818df97773afa5493f.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
||||||
0
art/source/environment/textures/.gdignore
Normal file
0
art/source/environment/textures/.gdignore
Normal file
BIN
art/source/environment/textures/grass_olive_tile.xcf
Normal file
BIN
art/source/environment/textures/grass_olive_tile.xcf
Normal file
Binary file not shown.
10
world/materials/starter_island_grass.tres
Normal file
10
world/materials/starter_island_grass.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[gd_resource type="StandardMaterial3D" load_steps=2 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" path="res://art/exported/environment/textures/grass_olive_tile.png" id="1_texture"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_name = "Starter Island Grass"
|
||||||
|
texture_filter = 4
|
||||||
|
albedo_texture = ExtResource("1_texture")
|
||||||
|
roughness = 1.0
|
||||||
|
uv1_scale = Vector3(21.406, 21.406, 21.406)
|
||||||
|
|
@ -19,8 +19,13 @@ const FishingShopInteractionType = preload(
|
||||||
^"Interactables/PelicanCoolerPerch"
|
^"Interactables/PelicanCoolerPerch"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@export_group("Grass Surface")
|
||||||
|
@export var grass_material: Material
|
||||||
|
@export_range(0, 16, 1) var grass_surface_index: int = 0
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
_apply_grass_material()
|
||||||
_build_terrain_collision()
|
_build_terrain_collision()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,6 +49,28 @@ func has_terrain_collision() -> bool:
|
||||||
return collision_shape != null and collision_shape.shape != null
|
return collision_shape != null and collision_shape.shape != null
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_grass_material() -> void:
|
||||||
|
var visual_mesh: MeshInstance3D = (
|
||||||
|
get_node_or_null(visual_mesh_path) as MeshInstance3D
|
||||||
|
)
|
||||||
|
if visual_mesh == null or visual_mesh.mesh == null:
|
||||||
|
push_error("Starter island visual mesh is unavailable.")
|
||||||
|
return
|
||||||
|
if grass_material == null:
|
||||||
|
push_error("Starter island grass material is unavailable.")
|
||||||
|
return
|
||||||
|
if grass_surface_index >= visual_mesh.mesh.get_surface_count():
|
||||||
|
push_error("Starter island grass surface index is invalid.")
|
||||||
|
return
|
||||||
|
if visual_mesh.mesh.surface_get_name(grass_surface_index) != "grass":
|
||||||
|
push_error("Starter island grass surface name does not match.")
|
||||||
|
return
|
||||||
|
visual_mesh.set_surface_override_material(
|
||||||
|
grass_surface_index,
|
||||||
|
grass_material
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _build_terrain_collision() -> void:
|
func _build_terrain_collision() -> void:
|
||||||
var visual_mesh: MeshInstance3D = (
|
var visual_mesh: MeshInstance3D = (
|
||||||
get_node_or_null(visual_mesh_path) as MeshInstance3D
|
get_node_or_null(visual_mesh_path) as MeshInstance3D
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
[ext_resource type="Script" path="res://world/safe_respawn_point.gd" id="6_safe"]
|
[ext_resource type="Script" path="res://world/safe_respawn_point.gd" id="6_safe"]
|
||||||
[ext_resource type="PackedScene" path="res://world/interactables/fishing_shop_world.tscn" id="7_shop"]
|
[ext_resource type="PackedScene" path="res://world/interactables/fishing_shop_world.tscn" id="7_shop"]
|
||||||
[ext_resource type="PackedScene" path="res://world/interactables/pelican_buyer_world.tscn" id="8_pelican"]
|
[ext_resource type="PackedScene" path="res://world/interactables/pelican_buyer_world.tscn" id="8_pelican"]
|
||||||
|
[ext_resource type="Material" path="res://world/materials/starter_island_grass.tres" id="9_grass"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="WaterMaterial"]
|
[sub_resource type="StandardMaterial3D" id="WaterMaterial"]
|
||||||
transparency = 1
|
transparency = 1
|
||||||
|
|
@ -46,6 +47,7 @@ size = Vector3(11.5, 4.8, 8.5)
|
||||||
|
|
||||||
[node name="StarterIslandRegion" type="Node3D"]
|
[node name="StarterIslandRegion" type="Node3D"]
|
||||||
script = ExtResource("1_region")
|
script = ExtResource("1_region")
|
||||||
|
grass_material = ExtResource("9_grass")
|
||||||
region_id = &"starter_island"
|
region_id = &"starter_island"
|
||||||
|
|
||||||
[node name="Visuals" type="Node3D" parent="."]
|
[node name="Visuals" type="Node3D" parent="."]
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,21 @@
|
||||||
|
|
||||||
[sub_resource type="Environment" id="Environment"]
|
[sub_resource type="Environment" id="Environment"]
|
||||||
background_mode = 1
|
background_mode = 1
|
||||||
background_color = Color(0.48, 0.74, 0.92, 1)
|
background_color = Color(0.58, 0.72, 0.82, 1)
|
||||||
|
background_energy_multiplier = 0.85
|
||||||
ambient_light_source = 3
|
ambient_light_source = 3
|
||||||
ambient_light_color = Color(0.72, 0.78, 0.84, 1)
|
ambient_light_color = Color(0.78, 0.84, 0.92, 1)
|
||||||
ambient_light_energy = 0.72
|
ambient_light_energy = 0.95
|
||||||
|
fog_enabled = true
|
||||||
|
fog_light_color = Color(0.62, 0.73, 0.8, 1)
|
||||||
|
fog_light_energy = 0.75
|
||||||
|
fog_density = 0.0025
|
||||||
|
fog_aerial_perspective = 0.2
|
||||||
|
fog_sky_affect = 0.15
|
||||||
|
adjustment_enabled = true
|
||||||
|
adjustment_brightness = 0.9
|
||||||
|
adjustment_contrast = 0.89
|
||||||
|
adjustment_saturation = 0.91
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="NorthSouthBoundsShape"]
|
[sub_resource type="BoxShape3D" id="NorthSouthBoundsShape"]
|
||||||
size = Vector3(120, 14, 2)
|
size = Vector3(120, 14, 2)
|
||||||
|
|
@ -30,8 +41,11 @@ environment = SubResource("Environment")
|
||||||
|
|
||||||
[node name="Sun" type="DirectionalLight3D" parent="Environment"]
|
[node name="Sun" type="DirectionalLight3D" parent="Environment"]
|
||||||
rotation_degrees = Vector3(-54, -32, 0)
|
rotation_degrees = Vector3(-54, -32, 0)
|
||||||
light_energy = 1.1
|
light_color = Color(1, 0.94, 0.88, 1)
|
||||||
|
light_energy = 0.68
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
|
shadow_opacity = 0.58
|
||||||
|
shadow_blur = 2.0
|
||||||
|
|
||||||
[node name="Regions" type="Node3D" parent="."]
|
[node name="Regions" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue