Page 1 of 1

LIGHTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Posted: Fri Jun 10, 2005 10:01 am
by wire_demon
FOR GOD SAKE HOW MANY LIGHTS ARE THERE IN IRRLICHT !! i AM WORKING ON A HUGE PROJECT WITH IRLLICHT NOW I CAN FIND ONLY TWO ACTIVE LIGHTS AND THE REST OF IT ARE NOT WORKING !!! :evil:

Posted: Fri Jun 10, 2005 4:26 pm
by Guest
As most 3D engines do, Irrlicht supports 8 dynamic lights at the same time. For special materials like parallax mapping, this is amount reduced to 2.
However, it is still possible to render your world with >2000 active lights at the same time. Just implement a scene node for this, which renders the scene in a intelligent way, and only uses 8 lights per pass at maximum. I did it this way.
And btw: NOBODY WOULD NORMALLY ANSWER YOUR QUESTION WHEN POSTING IN UPPER CASE CHARACTERS ONLY.

Posted: Fri Jun 10, 2005 5:31 pm
by afecelis

Posted: Fri Jun 10, 2005 5:34 pm
by wire_demon
dude thnx a lot !!! thnx a lot
and sorry for the uppercase

Posted: Sat Jun 11, 2005 3:48 am
by genesisrage
hey "guest" any more information on how to do the >2000 active lights, ive been asking around for a while now, but havent gotten anywhere yet.

Posted: Sat Jun 11, 2005 6:50 pm
by Electron
write a shader that does the light computations and pass the lights as uniform parameters. Note that you'd probably only want to do per-vertex lighting with a large number of lights and also that you'd want to implement some sort of light occlusion and culling because there is no way you can process >200 (let alone 2000) lights for every vertex in realtime unless you have a very small scene and a very fast machine. Other optimizations, like doing only diffuse lighting for lights not right nearby could also help speed things up. Lights take a quite large performance hit, however. I'm really not sure how many you can realistically have.

Posted: Sun Jun 12, 2005 3:22 am
by Bot_Builder
Back in blitz we'd have 8 lights and a bunch of pivots marking lighting positions. Then just find the closest 8 pivots, position the lights, set the color, distance, etc and render.

I'm sure that when you have access to all the code for the engine it should be possible to select the closest/most affecting lights for each object.

Posted: Sun Jun 12, 2005 3:30 am
by genesisrage
im trying to find something maybe a little easier, but it has to be over 8. so what you are saying you did in Blitz wouldnt work because you still would only have 8.

examples of what i am looking for is like a long tunnel with flickering torches on the wall, NPCs walking around with lamp/torches, shooting a plasma-gun that the bullets glow and light up the world, etc... just some simple ideas that ive been thinking of that would require more than 8 lights, dont need >2000, was just saying that as a number. more realistically i would need like 20-80 or so (as a guess).

Posted: Sun Jun 12, 2005 4:26 am
by disanti
Heh, why don't you just make your tunnel a little more curvy and use the distance formula to check which lights to display?
________
HONDA MANUFACTURING OF ALABAMA SPECIFICATIONS

Posted: Sun Jun 12, 2005 8:15 am
by Myth
genesisrage wrote:im trying to find something maybe a little easier, but it has to be over 8. so what you are saying you did in Blitz wouldnt work because you still would only have 8.

examples of what i am looking for is like a long tunnel with flickering torches on the wall, NPCs walking around with lamp/torches, shooting a plasma-gun that the bullets glow and light up the world, etc... just some simple ideas that ive been thinking of that would require more than 8 lights, dont need >2000, was just saying that as a number. more realistically i would need like 20-80 or so (as a guess).
Could you tell me what formula that would be?