REALTIMELIGHTS UNLIMITED!

I was reading the blender 2.25 game book and online it also sayed that in blender 2.25 you can not have more than 8 Realtime lights in the game engine on a single layer because open GL doesent support that. Well i was board and i added 20 realtime lights to my first person shooter and it droped the frame rate from 45 to 42 but it worked great!

Cool! I’m really glad about that. Not about the frames per second, though.

You can have 20 lights in the scene, but only 8 of them will be working at any given time.

last I heard, it was 8 per layer

… but, if a mesh is on mutiple layers, I think it wouldn’t be affected by all of the lamps on all of those layers if that is more than 8

the limitiation of 8 is an opengl specification [minimum specification, but a specification nonetheless] and most engines use other lighting methods for more than 8 lights on a face because calculating the lighting makes things slower [so, what is usually done is several of the nearest lamps are actually calculated, the rest are just averaged togehter and treated as a single lamp]

Sorry yes, per layer.

In most situations though this should be adequate, with the use of a culling system to remove unseen lights in a more complex game. I’ve never tested this in practice but in theory it should work.

Can realtime lights in games cast shadows?

You must be extremely lazy if you can’t find the answer to this yourself… Did you bother to check a few posts down?

http://www.elysiun.com/forum/viewtopic.php?t=27848

As far as I have been able to test this it is not possible to add lights from other layers using Edit Object > Add Object (I’m pretty sure I read in a post that the lights are calculated at the start of the runtime). It’s not possible to end them either using Edit Object > End Object that I can see.

Does anyone have an alternate method for this? I’ve tried playing with this a few times and always end up using an IPO to add light to a dark room as I could not figure out how to add a light from a different layer.

In the game engine light is not blocked by walls. This means that if you have a scene with say 50 rooms, all of them could be lit by one single light positioned above the whole scene, you don’t need a light in each room. You may choose to use a few extra lights for special purposes, but you should never need more than 8 lights in one scene.

Keith. 8)

since last week, yes:

1 - you’ll need the latest tuhopuu build
2 - your graphic card must support the OpenGL extension GL_arbitrary_shadow (or similar).

search the forum, there is a thread on that topic