RenderPipeline issue: Shadows for multiple pointLights

Recently, I was trying RenderPipeline by tobspr for rendering. My scene contains static as well as dynamic objects, multiple point or spot lights. I have created two point lights and set various properties such as position, energy, shadow map resolution etc. Then I added them using render_pipeline.add_light(). For each of the light, I have set casts_shadow property as True. What I observed is that, upon rendering,
one light fails to create any shadow, while the other one is working perfectly and generating shadows for static as well as dynamic objects. What could be the problem here ?
Here is the code snippet,

    self.light = PointLight()
    self.light.set_color_from_temperature(3 * 1000.0)
    self.light.energy = 500
    self.light.pos = (20,15,3)
    self.light.casts_shadows = True
    self.light.shadow_map_resolution = 512
    self.render_pipeline.add_light(self.light)

    self.Second_light = PointLight()
    self.Second_light.set_color_from_temperature(3 * 1000.0)
    self.Second_light.energy = 1000
    self.Second_light.pos = (40, 15, 3)
    self.Second_light.casts_shadows = True
    self.Second_light.shadow_map_resolution = 512
    self.render_pipeline.add_light(self.Second_light)

    self.render_pipeline.prepare_scene(self.scene)

Here are the screenshots for the two cases. The first one shows shadow while the second one does not.


Thanks in advance.

I can see that both lights casts shadows. So I think the problem is related to dynamic objects. Make sure that you calling “.invalidate_shadows()” every time the objects moved (or every frame) for your lights to update shadows.

Thanks Yonji. I also thought that the problem is related to dynamic objects, however, I found that with SpotLight() there seems to be no problem, that is the shadows are coming properly as they should be, even with the dynamic objects.