Adds several skybox scenes to addon
This commit is contained in:
parent
a4f409f877
commit
b2e3a3957b
74 changed files with 99840 additions and 23 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=55 format=4 uid="uid://bwsugg4p50fjr"]
|
||||
[gd_scene load_steps=60 format=4 uid="uid://bwsugg4p50fjr"]
|
||||
|
||||
[ext_resource type="Environment" uid="uid://cm77bbr0io118" path="res://Stages/Test3D/new_environment.tres" id="1_8ph61"]
|
||||
[ext_resource type="Script" uid="uid://bwed2dwogfmxv" path="res://Entities/Player/scripts/player.gd" id="1_d602n"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6mugqvfn8ihk" path="res://addons/AllSkyFree/Skyboxes/AllSkyFree_Sky_ClearBlueSky_Equirect.png" id="1_fm6lr"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://bwnn7vpd0dqds" path="res://Common/animations/basic-movement.res" id="1_tfa5t"]
|
||||
[ext_resource type="Script" uid="uid://bbjv6a7yg7m02" path="res://Stages/Test3D/camera_pivot.gd" id="2_sdmks"]
|
||||
[ext_resource type="Shader" uid="uid://bsemnmdracd4m" path="res://Common/shaders/outline.gdshader" id="4_feu7y"]
|
||||
|
|
@ -23,6 +23,42 @@
|
|||
[ext_resource type="PackedScene" uid="uid://bwcevwwphdvq" path="res://Entities/GroundTile/GroundTile.tscn" id="25_caaui"]
|
||||
[ext_resource type="Script" uid="uid://dw2jmurt0iq5" path="res://Stages/UI/debug_ui.gd" id="27_1r6vk"]
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_ctie3"]
|
||||
panorama = ExtResource("1_fm6lr")
|
||||
|
||||
[sub_resource type="Sky" id="Sky_5wpmk"]
|
||||
sky_material = SubResource("PanoramaSkyMaterial_ctie3")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_vyi1v"]
|
||||
background_mode = 2
|
||||
background_color = Color(0.729412, 0.14902, 0.729412, 1)
|
||||
sky = SubResource("Sky_5wpmk")
|
||||
ambient_light_source = 3
|
||||
reflected_light_source = 2
|
||||
tonemap_mode = 1
|
||||
ssao_radius = 0.73
|
||||
ssao_intensity = 16.0
|
||||
ssao_detail = 2.89
|
||||
ssao_horizon = 0.27
|
||||
ssil_enabled = true
|
||||
ssil_radius = 2.55
|
||||
sdfgi_use_occlusion = true
|
||||
sdfgi_read_sky_light = false
|
||||
glow_normalized = true
|
||||
glow_intensity = 1.41
|
||||
glow_strength = 1.51
|
||||
glow_bloom = 0.31
|
||||
glow_blend_mode = 4
|
||||
fog_depth_curve = 2.2974
|
||||
volumetric_fog_density = 0.0111
|
||||
volumetric_fog_albedo = Color(0.160267, 0.278728, 0.160429, 1)
|
||||
volumetric_fog_emission = Color(0.171341, 0.313804, 0.172607, 1)
|
||||
volumetric_fog_detail_spread = 1.93187
|
||||
volumetric_fog_ambient_inject = 0.11
|
||||
adjustment_brightness = 1.69
|
||||
adjustment_contrast = 0.96
|
||||
adjustment_saturation = 0.78
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_0yf11"]
|
||||
script/source = "extends Node3D
|
||||
|
||||
|
|
@ -47,6 +83,68 @@ func _process(_delta):
|
|||
#(%PostProcessing as MeshInstance3D).mesh.surface_get_material(0).set_shader_parameter('light_direction', -global_basis.z)
|
||||
"
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_fm6lr"]
|
||||
script/source = "extends Node3D
|
||||
|
||||
@export var camera: Camera3D
|
||||
@export var impostor_texture: Texture2D
|
||||
@export var ring_distances: Array[float] = [20.0, 40.0, 50.0, 100.0]
|
||||
@export var ring_alphas: Array[float] = [0.15, 0.3, 0.6, 0.8]
|
||||
@export var ring_counts: Array[int] = [150, 250, 400, 500]
|
||||
@export var min_brightness: float = 0.2 # Darkest the distant trees get
|
||||
@export var max_brightness: float = 0.9 # Brightest the close trees get
|
||||
|
||||
func _ready():
|
||||
create_forest_impostors()
|
||||
|
||||
func create_forest_impostors():
|
||||
for i in range(ring_distances.size()):
|
||||
# Calculate brightness based on distance (closer = brighter)
|
||||
var max_distance = ring_distances.max()
|
||||
var brightness_factor = 1.0 - (ring_distances[i] / max_distance)
|
||||
var brightness = lerp(min_brightness, max_brightness, brightness_factor)
|
||||
|
||||
create_impostor_ring(
|
||||
ring_distances[i],
|
||||
ring_alphas[i],
|
||||
brightness,
|
||||
ring_counts[i]
|
||||
)
|
||||
|
||||
func create_impostor_ring(distance: float, alpha: float, brightness: float, count: int):
|
||||
for i in range(count):
|
||||
var angle = (i / float(count)) * TAU
|
||||
create_tree_impostor(angle, distance, alpha, brightness)
|
||||
|
||||
func create_tree_impostor(angle: float, distance_base: float, alpha: float, brightness: float):
|
||||
var mesh_instance = MeshInstance3D.new()
|
||||
|
||||
var quad = QuadMesh.new()
|
||||
quad.size = Vector2(10, 20)
|
||||
mesh_instance.mesh = quad
|
||||
|
||||
var distance = distance_base + randf_range(-8, 8)
|
||||
mesh_instance.position = Vector3(
|
||||
cos(angle) * distance,
|
||||
randf_range(-2, 2), # Slight height variation
|
||||
sin(angle) * distance
|
||||
)
|
||||
|
||||
var material = StandardMaterial3D.new()
|
||||
material.flags_transparent = true
|
||||
material.billboard_mode = BaseMaterial3D.BILLBOARD_ENABLED
|
||||
material.albedo_texture = impostor_texture
|
||||
material.albedo_color = Color(0.6 * brightness, 0.7 * brightness, 0.6 * brightness, alpha)
|
||||
material.flags_unshaded = true
|
||||
mesh_instance.material_override = material
|
||||
|
||||
add_child(mesh_instance)
|
||||
|
||||
func _process(_delta):
|
||||
if camera:
|
||||
global_position = camera.global_position
|
||||
"
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_tfa5t"]
|
||||
radius = 0.2
|
||||
height = 0.5
|
||||
|
|
@ -377,6 +475,13 @@ material = SubResource("ShaderMaterial_tfa5t")
|
|||
flip_faces = true
|
||||
size = Vector2(2, 2)
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_fm6lr"]
|
||||
dof_blur_far_enabled = true
|
||||
dof_blur_far_distance = 5.0
|
||||
dof_blur_far_transition = 10.0
|
||||
dof_blur_near_distance = 0.87
|
||||
dof_blur_amount = 0.08
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_tfa5t"]
|
||||
size = Vector3(60, 0, 20)
|
||||
|
||||
|
|
@ -461,7 +566,7 @@ section_segments = 1
|
|||
[node name="Test3d" type="Node3D"]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = ExtResource("1_8ph61")
|
||||
environment = SubResource("Environment_vyi1v")
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="WorldEnvironment"]
|
||||
script = SubResource("GDScript_0yf11")
|
||||
|
|
@ -483,7 +588,6 @@ stretch = true
|
|||
stretch_shrink = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(576, 324)
|
||||
render_target_update_mode = 4
|
||||
|
|
@ -492,6 +596,9 @@ render_target_update_mode = 4
|
|||
unique_name_in_owner = true
|
||||
script = ExtResource("1_d602n")
|
||||
|
||||
[node name="VisibilityDropoff" type="Node3D" parent="SubViewportContainer/SubViewport/Player"]
|
||||
script = SubResource("GDScript_fm6lr")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SubViewportContainer/SubViewport/Player"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.257867, 0)
|
||||
shape = SubResource("CapsuleShape3D_tfa5t")
|
||||
|
|
@ -772,6 +879,14 @@ mesh = SubResource("QuadMesh_tfa5t")
|
|||
[node name="RayCast3D" type="RayCast3D" parent="SubViewportContainer/SubViewport/Player/CameraPivot/Camera3D"]
|
||||
collision_mask = 3
|
||||
|
||||
[node name="FirstPersonCamera" type="Camera3D" parent="SubViewportContainer/SubViewport/Player"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.359, -0.2)
|
||||
attributes = SubResource("CameraAttributesPractical_fm6lr")
|
||||
current = true
|
||||
fov = 35.0
|
||||
near = 0.103
|
||||
far = 125.41
|
||||
|
||||
[node name="Environment" type="Node3D" parent="SubViewportContainer/SubViewport"]
|
||||
|
||||
[node name="Ground" type="StaticBody3D" parent="SubViewportContainer/SubViewport/Environment"]
|
||||
|
|
@ -822,7 +937,7 @@ draw_pass_1 = SubResource("QuadMesh_hvb1l")
|
|||
[node name="OmniLight3D" type="OmniLight3D" parent="SubViewportContainer/SubViewport/Camp/Objects/Camp/Campfire/Fire"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000509977, 0.121094, -0.00151992)
|
||||
light_color = Color(0.89, 0.461613, 0.2136, 1)
|
||||
light_energy = 0.823082
|
||||
light_energy = 0.816855
|
||||
light_indirect_energy = 1.084
|
||||
light_volumetric_fog_energy = 3.764
|
||||
light_size = 0.105
|
||||
|
|
@ -840,22 +955,21 @@ transform = Transform3D(0.440003, 0, 0.237482, 0, 0.5, 0, -0.237482, 0, 0.440003
|
|||
transform = Transform3D(0.72094, 0, -0.346764, 0, 0.8, 0, 0.346764, 0, 0.72094, -1.4942, 0.00999988, -0.784986)
|
||||
|
||||
[node name="statue_column2" parent="SubViewportContainer/SubViewport/Camp/Objects" instance=ExtResource("16_ynokf")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.654, 0, -2.707)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.654, -0.05, -2.707)
|
||||
|
||||
[node name="statue_column3" parent="SubViewportContainer/SubViewport/Camp/Objects" instance=ExtResource("16_ynokf")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.589154, 0, -2.703)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.589, -0.05, -2.703)
|
||||
|
||||
[node name="statue_column4" parent="SubViewportContainer/SubViewport/Camp/Objects" instance=ExtResource("16_ynokf")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.727, 0, 0.611)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.727, -0.05, 0.611)
|
||||
|
||||
[node name="statue_columnDamaged2" parent="SubViewportContainer/SubViewport/Camp/Objects" instance=ExtResource("17_pbfwi")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.609224, 0, 0.72)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.609, -0.05, 0.72)
|
||||
|
||||
[node name="VFX" type="Node3D" parent="SubViewportContainer/SubViewport/Camp"]
|
||||
|
||||
[node name="Rain" type="GPUParticles3D" parent="SubViewportContainer/SubViewport/Camp/VFX"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.545105, 10.1451, 0.937134)
|
||||
visible = false
|
||||
amount = 1000
|
||||
preprocess = 10.0
|
||||
visibility_aabb = AABB(-4, -20, -4, 8, 20, 8)
|
||||
|
|
@ -873,6 +987,7 @@ grow_vertical = 2
|
|||
stretch = true
|
||||
|
||||
[node name="UISubViewport" type="SubViewport" parent="UISubViewportContainer"]
|
||||
disable_3d = true
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(1152, 648)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
extends Camera3D
|
||||
@export var player: Node3D # Assign your player node in the editor
|
||||
@export var player: Node3D
|
||||
|
||||
func _ready():
|
||||
player = %Player
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
[gd_resource type="Environment" load_steps=3 format=3 uid="uid://cm77bbr0io118"]
|
||||
[gd_resource type="Environment" load_steps=4 format=3 uid="uid://cm77bbr0io118"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_lg8b7"]
|
||||
sky_horizon_color = Color(0.67451, 0.682353, 0.698039, 1)
|
||||
sky_curve = 0.0175
|
||||
ground_bottom_color = Color(1, 1, 1, 1)
|
||||
ground_curve = 0.171484
|
||||
[ext_resource type="Texture2D" uid="uid://c6mugqvfn8ihk" path="res://addons/AllSkyFree/Skyboxes/AllSkyFree_Sky_ClearBlueSky_Equirect.png" id="1_mrtgb"]
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_mrtgb"]
|
||||
panorama = ExtResource("1_mrtgb")
|
||||
|
||||
[sub_resource type="Sky" id="Sky_7bk1c"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_lg8b7")
|
||||
sky_material = SubResource("PanoramaSkyMaterial_mrtgb")
|
||||
|
||||
[resource]
|
||||
background_mode = 1
|
||||
background_mode = 2
|
||||
background_color = Color(0.752941, 0.776471, 0.827451, 1)
|
||||
sky = SubResource("Sky_7bk1c")
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.662745, 0.694118, 0.772549, 1)
|
||||
ambient_light_energy = 1.15
|
||||
ambient_light_sky_contribution = 0.34
|
||||
tonemap_mode = 3
|
||||
ssao_enabled = true
|
||||
ssao_radius = 0.3
|
||||
ssao_intensity = 0.5
|
||||
ssao_power = 15.0
|
||||
|
|
@ -24,3 +23,4 @@ glow_levels/2 = 0.6
|
|||
glow_levels/3 = 0.6
|
||||
glow_levels/5 = 0.0
|
||||
glow_intensity = 2.0
|
||||
volumetric_fog_density = 0.1222
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue