maximum lights

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

maximum lights

Post by jontan6 »

I think I read somewhere that I can only add upto 8 lights into a scene. What If my scene has many rooms? I should lightmap then?

Is it possible that I add lights to my scene but irrlicht precalculate the lightmap?
nmn
Posts: 23
Joined: Tue Sep 02, 2008 7:35 pm

Re: maximum lights

Post by nmn »

jontan6 wrote:I think I read somewhere that I can only add upto 8 lights into a scene. What If my scene has many rooms? I should lightmap then?

Is it possible that I add lights to my scene but irrlicht precalculate the lightmap?
Use lightmaps in your scene if both your scene and the lights are static - For moving lights you could probably go dynamic for just the dynamic ones.

Also, I don't know how Irrlicht handles it, but you can have up to 8 lights if you only ever see 8 or less at a time. You can just manage them by setting all 8 of the lights to the closest 8. Irrlicht may or may not handle this for you.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Irrlicht will turn on the 8 lights closest to the active camera, without consideration of their type, radius or intensity.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

so i can place as many dynamic lights as i pleased right? its just that only 8 lights will be active at a given time? its ok with me. thanks!
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Yes, but they may not be the lights that you want to be on. You said "rooms", but the lighting algorithm doesn't take occlusion into account, just distance from the camera, so lights will leak through from nearby rooms.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

its ok, ill just test throughly. i just thought before i cant add more than 8 lights :)
Post Reply