feat: more work on tree graphics

This commit is contained in:
Sara 2025-05-28 19:33:15 +02:00
parent 4f525b2b16
commit 1f76dbbc8a
22 changed files with 1591 additions and 4 deletions

View file

@ -0,0 +1,7 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://boluuvdyoysy7"]
[ext_resource type="Shader" uid="uid://dsdrwuvbo85rv" path="res://materials/tree_abstractor.gdshader" id="1_jo5p1"]
[resource]
render_priority = 0
shader = ExtResource("1_jo5p1")

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfo6tpij7p21d"
path.s3tc="res://.godot/imported/forest_floor_grass_albedo.png-5eace128d804bb00e037dee24a0f7f97.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/forest_floor_grass_albedo.png"
dest_files=["res://.godot/imported/forest_floor_grass_albedo.png-5eace128d804bb00e037dee24a0f7f97.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c7tmbo0hmtrgm"
path.s3tc="res://.godot/imported/forest_floor_grass_normal.png-c5504866386b1f942fb631586da08e2d.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/forest_floor_grass_normal.png"
dest_files=["res://.godot/imported/forest_floor_grass_normal.png-c5504866386b1f942fb631586da08e2d.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://materials/forest_floor_grass_normal.png"
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

View file

@ -0,0 +1,19 @@
shader_type spatial;
uniform sampler2D albedo : hint_default_black, source_color;
void vertex() {
}
void fragment() {
// Called for every pixel the material is visible on.
vec4 col = texture(albedo, UV);
ALPHA = col.w;
ALBEDO = col.xyz;
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View file

@ -0,0 +1 @@
uid://dsdrwuvbo85rv

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dq7w8p5uip7gs"
path.s3tc="res://.godot/imported/walls_albedo.png-14d409b72623475467ee56404365c248.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/walls_albedo.png"
dest_files=["res://.godot/imported/walls_albedo.png-14d409b72623475467ee56404365c248.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctbhdv8f5ts1a"
path.s3tc="res://.godot/imported/walls_normal.png-c40f01dc33d54b9da34e2b029436249f.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://materials/walls_normal.png"
dest_files=["res://.godot/imported/walls_normal.png-c40f01dc33d54b9da34e2b029436249f.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://materials/walls_normal.png"
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

Binary file not shown.

View file

@ -32,7 +32,14 @@ animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
_subresources={
"materials": {
"leaves": {
"use_external/enabled": true,
"use_external/path": "uid://dqtsjjn0jp0oj"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true

Binary file not shown.

View file

@ -1,4 +1,70 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dqtsjjn0jp0oj"]
[gd_resource type="ShaderMaterial" load_steps=3 format=3 uid="uid://dqtsjjn0jp0oj"]
[ext_resource type="Texture2D" uid="uid://d1sxmql1f46f6" path="res://materials/leaves_albedo.png" id="1_dgtoi"]
[sub_resource type="Shader" id="Shader_6fq30"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.4.2.rc's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, skip_vertex_transform;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
uniform ivec2 albedo_texture_size;
uniform float point_size : hint_range(0.1, 128.0, 0.1);
uniform float roughness : hint_range(0.0, 1.0);
uniform sampler2D texture_metallic : hint_default_white, filter_linear_mipmap, repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r, filter_linear_mipmap, repeat_enable;
uniform float specular : hint_range(0.0, 1.0, 0.01);
uniform float metallic : hint_range(0.0, 1.0, 0.01);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX * 1.2, 1.0)).xyz;
NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
BINORMAL = normalize((MODELVIEW_MATRIX * vec4(BINORMAL, 0.0)).xyz);
TANGENT = normalize((MODELVIEW_MATRIX * vec4(TANGENT, 0.0)).xyz);
UV = UV * uv1_scale.xy + uv1_offset.xy;
vec3 center = vec3(VIEWPORT_SIZE / 2.0, 0.0);
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo, base_uv);
ALBEDO = albedo.rgb * albedo_tex.rgb;
ALPHA = albedo_tex.a;
float metallic_tex = dot(texture(texture_metallic, base_uv), metallic_texture_channel);
METALLIC = metallic_tex * metallic;
SPECULAR = specular;
vec4 roughness_texture_channel = vec4(1.0, 0.0, 0.0, 0.0);
float roughness_tex = dot(texture(texture_roughness, base_uv), roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
}
"
[resource]
albedo_color = Color(0.27451, 0.388235, 0.192157, 1)
render_priority = 0
shader = SubResource("Shader_6fq30")
shader_parameter/albedo = Color(0.27451, 0.388235, 0.192157, 1)
shader_parameter/texture_albedo = ExtResource("1_dgtoi")
shader_parameter/albedo_texture_size = Vector2i(0, 0)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = Vector4(1, 0, 0, 0)
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)

Binary file not shown.

Binary file not shown.

View file

@ -15,15 +15,19 @@ sky_material = SubResource("ProceduralSkyMaterial_pvuhy")
[sub_resource type="Environment" id="Environment_lj5yw"]
background_mode = 2
background_energy_multiplier = 1.84
sky = SubResource("Sky_x4b8f")
ambient_light_source = 3
ssao_enabled = true
ssao_radius = 2.55
ssao_intensity = 5.42
[node name="Valley" type="Node3D"]
[node name="level" parent="." instance=ExtResource("1_ch7jd")]
[node name="Player" parent="." instance=ExtResource("2_pvuhy")]
transform = Transform3D(0.99745, 0, 0.0713757, 0, 1, 0, -0.0713757, 0, 0.99745, 4.57328, 0.0706022, -40.0223)
transform = Transform3D(0.99745, 0, 0.0713757, 0, 1, 0, -0.0713757, 0, 0.99745, 4.57328, 31.6645, -38.9574)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -0.740828, 0.671695, 0, -0.671695, -0.740828, 0, 6.05439, 0)
@ -44,6 +48,39 @@ transform = Transform3D(-0.880138, 0, 0.474718, 0, 1, 0, -0.474718, 0, -0.880138
[node name="Node3D23" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(-0.635459, 0, 0.772135, 0, 1, 0, -0.772135, 0, -0.635459, 13.5623, 1.23662, 60.5792)
[node name="Node3D39" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.981023, 0, -0.193892, 0, 1, 0, 0.193892, 0, 0.981023, -13.5101, 1.23662, 62.9594)
[node name="Node3D94" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.981023, 0, -0.193892, 0, 1, 0, 0.193892, 0, 0.981023, -17.689, 1.23662, 55.8823)
[node name="Node3D95" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.981023, 0, -0.193892, 0, 1, 0, 0.193892, 0, 0.981023, -25.44, 1.23662, 52.1079)
[node name="Node3D96" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.841464, -1.6038e-08, -0.540314, 1.51426e-08, 1, -6.10033e-09, 0.540314, -3.04854e-09, 0.841464, -22.8788, 1.23662, 45.1656)
[node name="Node3D97" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.841464, -1.6038e-08, -0.540314, 1.51426e-08, 1, -6.10033e-09, 0.540314, -3.04854e-09, 0.841464, -22.5418, 1.23662, 35.5947)
[node name="Node3D98" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.841464, -1.6038e-08, -0.540314, 1.51426e-08, 1, -6.10033e-09, 0.540314, -3.04854e-09, 0.841464, -21.733, 1.23662, 26.0238)
[node name="Node3D99" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.841464, -1.6038e-08, -0.540314, 1.51426e-08, 1, -6.10033e-09, 0.540314, -3.04854e-09, 0.841464, -24.6986, 1.23662, 20.1599)
[node name="Node3D103" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.420197, -1.18985e-08, -0.907433, 1.51426e-08, 1, -6.10033e-09, 0.907433, -1.11775e-08, 0.420197, -23.71, 1.23662, 12.7674)
[node name="Node3D100" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.62591, -2.81386e-08, -0.779895, 2.5615e-08, 1, -1.55225e-08, 0.779895, -1.02614e-08, 0.62591, -18.7674, 1.23662, 17.3965)
[node name="Node3D101" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.62591, -2.81386e-08, -0.779895, 2.5615e-08, 1, -1.55225e-08, 0.779895, -1.02614e-08, 0.62591, -16.7454, 1.23662, 9.51059)
[node name="Node3D102" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.104755, -4.17581e-08, -0.994498, 3.49956e-08, 1, -3.83029e-08, 0.994498, -3.07907e-08, 0.104755, -12.0273, 1.23662, 3.10752)
[node name="Node3D2" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(-0.583853, 0, 0.811859, 0, 1, 0, -0.811859, 0, -0.583853, 13.7278, 1.31703, 30.075)
@ -185,6 +222,12 @@ transform = Transform3D(-0.262273, -1.0157e-07, 0.964994, 3.51579e-08, 1, 1.1481
[node name="Node3D86" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(-0.262273, -1.0157e-07, 0.964994, 3.51579e-08, 1, 1.14811e-07, -0.964994, 6.40389e-08, -0.262273, 18.7966, 0.853164, 61.4759)
[node name="Node3D104" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(0.395593, 9.15362e-08, -0.918426, 3.51579e-08, 1, 1.14811e-07, 0.918426, -7.77082e-08, 0.395593, -11.1774, -0.230842, 39.2564)
[node name="Node3D105" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(-0.199709, -1.05476e-07, 0.979855, 3.51579e-08, 1, 1.14811e-07, -0.979855, 5.73785e-08, -0.199709, 3.23367, -0.230842, 53.8158)
[node name="Node3D87" parent="." instance=ExtResource("3_lj5yw")]
transform = Transform3D(-0.262273, -1.0157e-07, 0.964994, 3.51579e-08, 1, 1.14811e-07, -0.964994, 6.40389e-08, -0.262273, 21.7753, 1.18729, 49.1584)