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

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
wire_demon

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

Post 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:
Guest

Post 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.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

wire_demon

Post by wire_demon »

dude thnx a lot !!! thnx a lot
and sorry for the uppercase
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post 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.
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post 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.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Bot_Builder
Posts: 23
Joined: Thu Apr 14, 2005 6:59 pm
Location: Bushland

Post 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.
ImageXP SP2, AMD Athlon 64 3500+, 1GB HyperX RAM, Radeon X700 Pro (PCI-e), 120GB SATA drive :)
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post 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).
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post 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
Last edited by disanti on Thu Feb 24, 2011 10:32 am, edited 1 time in total.
Myth
Posts: 81
Joined: Wed Apr 13, 2005 5:48 pm

Post 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?
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.

My fan site: http://www.halo-center.com
Post Reply