pokepetter / ursina

A game engine powered by python and panda3d.

Home Page:https://pokepetter.github.io/ursina/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PandaPointLight limit ?

ursinaguy opened this issue · comments

I am using PandaPointLight() function to generate lights in a for loop for my randomly generated map then append every light to a list
the length of the list is 25 but the scene seems to only have 7-8 lights
I dont know whether this is a bug or there is a light limit .
Your help is appreciated

There is a limit for sure, there usually is with forward rendering. It's often 4 or 8 in most game engines I've seen. A way around it is to use deferred rendering instead of forward, but ursina doesn't support that and it comes with it's own set of issues, including worse performance if you're not using many lights.
The best option, if possible, would be to bake the lights. That way you could have as many static lights as you want, and even make have bounce light and look realistic. Downside of course is that you they'll have to be static and not move. You can bake lights in Blender.