Skip to content

Commit 2d87b5d

Browse files
committed
little fixes/tuning by guess
1 parent 30d30ce commit 2d87b5d

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

addons/libmaszyna/e3d/e3d_nodes_instancer.gd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func _do_add_submodels(
117117
# Applying transform before adding may cause issues (especially on windows)
118118
if child is Node3D and submodel.transform:
119119
var child_node:Node3D = child as Node3D
120-
if child is SpotLight3D:
120+
if submodel.submodel_type == E3DSubModel.SUBMODEL_FREE_SPOTLIGHT:
121121
# Do not scale SpotLight3D to avoid configuration warnings
122122
child_node.position = submodel.transform.origin
123123
child_node.basis = submodel.transform.basis.orthonormalized()
@@ -149,7 +149,10 @@ func _create_submodel_instance(target_node: E3DModelInstance, submodel: E3DSubMo
149149
obj = SpotLight3D.new()
150150
obj.name = submodel.resource_name
151151
obj.light_color = submodel.diffuse_color
152-
obj.light_energy = submodel.visibility_light
152+
obj.light_color.a = 1.0
153+
#obj.light_energy = submodel.visibility_light # ????
154+
obj.light_energy = 10.0 # FIXME: guessing
155+
obj.light_volumetric_fog_energy = 4.0 # FIXME: guessing
153156
obj.shadow_enabled = true
154157
obj.distance_fade_enabled = true
155158
obj.spot_range = submodel.light_range

demo/demo_3d.tscn

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ glow_enabled = true
5353
fog_enabled = true
5454
fog_sky_affect = 0.4
5555
volumetric_fog_enabled = true
56-
volumetric_fog_density = 0.029
56+
volumetric_fog_density = 0.01
5757
volumetric_fog_anisotropy = 0.0
58-
volumetric_fog_length = 0.4
58+
volumetric_fog_length = 55.89
5959
volumetric_fog_detail_spread = 1.0
6060
volumetric_fog_sky_affect = 0.405
6161
adjustment_enabled = true
@@ -233,6 +233,8 @@ visible = null
233233
[node name="MaszynaEnvironmentNode" type="Node" parent="." unique_id=1464463242]
234234
script = ExtResource("2_py6pt")
235235
world_environment = NodePath("../WorldEnvironment")
236+
season = 2
237+
weather = 0
236238
sky_texture_offset = Vector2(0.49, 0.005)
237239
sky_texture_scale = Vector2(0.547, 0.865)
238240
sky_energy = 0.85
@@ -248,6 +250,7 @@ size = Vector3(5000, 0.1, 5000)
248250

249251
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=786641912]
250252
transform = Transform3D(-0.846557, 0.01871, 0.531969, 0.393589, 0.694835, 0.601906, -0.358369, 0.718925, -0.595582, 5.83027, -6.14961, 0)
253+
visible = false
251254
light_color = Color(0.929688, 0.848771, 0.817108, 1)
252255
light_energy = 1.12
253256
light_indirect_energy = 2.0

demo/vehicles/sm42/sm_42.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ lights_state = Dictionary[String, bool]({
3939
"endsignal13": false,
4040
"endsignal22": false,
4141
"endsignal23": false,
42-
"headlamp11": false,
42+
"headlamp11": true,
4343
"headlamp12": true,
4444
"headlamp13": true,
4545
"headlamp21": false,

0 commit comments

Comments
 (0)