Godot Version
4.0.2 stable
Question
I have imported Meshes and Lamp Models made in Blender. The light from the models appears to travel through the blender meshes and light surfaces on the other side of the mesh instead of creating shadows.
extends Node3D
var lights = []
var init = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if not init:
#Initialize all Lights
for lamp in get_children():
lights.append(lamp.find_child("Light"))
#Reset lamp settings
for l in lights:
l.light_energy = 1
l.rotation = Vector3(deg_to_rad(-90),deg_to_rad(90),deg_to_rad(36))
l.light_indirect_energy = 0
l.shadow_enabled = true
l.distance_fade_enabled = true
l.shadow_normal_bias = 0
#End Initialization in the process
init = true
This is the lamp code and settings I have for the problamatic light sources. They are of the Spotlight3D node type.
Another thing I have noticed is that light that comes from my DirectionalLight3D does not appear to have light travel through these blender meshes, I only noticed the issue with the Imported Spotlights.
I have attatched an image with what it looks like in game. There is a floor of meshes in between the spotlight above and the floor below which should have no light.
Any help or insight to this issue would be greatly appreciated!