Feature Request: Expose Light shadow clip parameters to python API

Currently the KX_LightObject python API does not provide much access to light control. I can understand not being able to change shadow resolution or light type from the API, but the functionality I would like exposed is:

  • Shadow Near Clip
  • Shadow Far Clip
  • Frustum Size (for sun lamps)

The bais controls would also be great to expose. I see they are read-only, but it would be nice to make them writable. I can’t see why these parameters aren’t writable as surely they don’t effect the material shader?

Two other tangentally related things:

  • I kind-of think instead of having a KX_LightObject super-object, there should be KX_SpotLightObject and KX_PointLightObject etc.
  • Why does shadow resolution have a lower bound of 128? I want a 64px shadow buffer for some things (faking AO with low-res shadows)

I’d like to see more control over lights in general. It can be difficult to set up a shadow light when you have variable zoom situations.

Good point. I’ve added Frustum size to the list in the first post. However, I suspect that one would be a lot harder to implement as it may change the material shader.

I guess this is a request for the upbge devs. :slight_smile: