Who needs so MANY LIGHTs?!

Posted By: Hummel

Who needs so MANY LIGHTs?! - 04/18/10 21:30

...probably nobody, but looks cool laugh

I experimented around with the basic idea of the Light pre-pass [ENGEL] and got this awesome rendering technique
wich allows you to render a huge amount of dynamic lightsource depending on the light-ranges and the viewers position.

The following scene was rendert with 60fps on my GTX285 (30-40fps on Slins 8800GS)
and contains 700 low-range light sources. Every particle is a lightsource:





Thanks to ChrisB who gave me an essential hint wink

I uploaded two demos here. One with 700 lights and the other with 350.
Let me know how fast it runs on your hardware (fps are limited to 50, use the console to change this).

I do not take any responsibility for hardware damage caused by running this demo.

PS: Before people start asking: to make use of this stuff you have to adapt your whole rendering pipeline
so I couldnīt easily contribute this without building a complete rendering system.
But you can always hire me for payed jobs wink
Posted By: Rackscha

Re: Who needs so MANY LIGHTs?! - 04/18/10 21:40

Mh..*searching* sorry cant find a better word than AWESOME(i mean it wink )


Would like to have a demo to test perfromance(waiting)


Greets
Rackscha
Posted By: Widi

Re: Who needs so MANY LIGHTs?! - 04/18/10 21:41

Looks cool..
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/18/10 21:55

sry, have currently some probs with the publisher mad

EDIT: done. WRS-resources donīt work correctly for any reason...
Posted By: Joozey

Re: Who needs so MANY LIGHTs?! - 04/19/10 00:09

350 lights: 1-2 fps
700 lights: 0-1 fps

:B

Intel Chipset Family Express ^^.
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/19/10 00:17

wtf?! oO°
Mod please delete Joozeys post-thatīs bad promotion grin
Posted By: Superku

Re: Who needs so MANY LIGHTs?! - 04/19/10 00:38

Wow, this is amazing!
2006 Notebook, XPS M1710, Dual Core 2.0, 512MB 7900 GTX:
350 lights: 20fps but it feels and looks like ~40fps, how come?
700 lights: 13fps.
Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/19/10 05:02

350: 50fps
700: 30fps

nVidia 9600GT.

Solid, mate laugh

Jibb
Posted By: GorNaKosh

Re: Who needs so MANY LIGHTs?! - 04/19/10 06:37

ATI Mobility Radeon HD 4650
If I take the startposition of the camera
350: 30fps
700: 20fps

If I scroll out to have all lights rendered to the screen at once, the fps are much higher Oo
Posted By: MTD

Re: Who needs so MANY LIGHTs?! - 04/19/10 07:14

350 & 700 = 50fps
nVidia 8800GT

Looks great and interesting
Good job.
Posted By: Joozey

Re: Who needs so MANY LIGHTs?! - 04/19/10 07:41

Originally Posted By: Hummel
wtf?! oO°
Mod please delete Joozeys post-thatīs bad promotion grin

The truth hurts, many people have even worse graphic capabilities tongue . At least it renders correctly! No errors. It could run the DX11 benchmark at 0.2 fps like a charm ^^.
Posted By: Puppeteer

Re: Who needs so MANY LIGHTs?! - 04/19/10 10:44

350 @ 50ps
700 @ 35fps
8800GT
Posted By: Cowabanga

Re: Who needs so MANY LIGHTs?! - 04/19/10 10:53

Extremely awesome laugh

NVIDIA GeForce 8600 GT:
350 lights: ~25 FPS.
700 lights: ~15-20 FPS.
Posted By: Quad

Re: Who needs so MANY LIGHTs?! - 04/19/10 11:03

Beatiful

NVIDIA GeForge 9600GT
350 lights: 50 FPS
700 lights: ~45 FPS
Posted By: wdlmaster

Re: Who needs so MANY LIGHTs?! - 04/19/10 12:01

what !? how get you "only" 35 FPS on a GeForce 8800 ?!

i get 132 FPS (350 Lights) and 68 FPS (700 Lights)

with 8x AA and fully zoomed out!
Posted By: Quad

Re: Who needs so MANY LIGHTs?! - 04/19/10 12:47

when fully zooomed out, i get 50 fps in both , that is i guess because it's capped to 50?
Posted By: AlphaWolf

Re: Who needs so MANY LIGHTs?! - 04/19/10 12:55

Ati radeon HD 4870
350 lights: 50 FPS
700 lights: 50 FPS
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/19/10 12:56

AA shouldnīt work since I use a pp effect to combine color and lighting in contrast to the original 'Light pre-pass'. I would also like to know how you managed to get fps over the defined limit of 50?
Posted By: achaziel

Re: Who needs so MANY LIGHTs?! - 04/19/10 13:04

both 350 and 700 at constant 50 fps. impressive.

nvidia 240 gt
Posted By: Espér

Re: Who needs so MANY LIGHTs?! - 04/19/10 13:04

NVidia GeForce GTX 260
350: 50 FPS
700: 50 FPS
Posted By: wdlmaster

Re: Who needs so MANY LIGHTs?! - 04/19/10 13:15

Yes, AA has indeed no impact on the frame rate. And about the FPS limit: i simply typed "fps_max = 200" in the console
Posted By: Cowabanga

Re: Who needs so MANY LIGHTs?! - 04/19/10 13:17

Originally Posted By: wdlmaster
And about the FPS limit: i simply typed "fps_max = 200" in the console
That was clever. grin
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/19/10 13:44

indeed laugh
Posted By: AlphaWolf

Re: Who needs so MANY LIGHTs?! - 04/19/10 15:04

Ati radeon HD 4870
with fps_max = 200;

i have 78 fps by 700 lights
Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/19/10 15:10

Quote:
If I scroll out to have all lights rendered to the screen at once, the fps are much higher Oo
Each light is only calculated within its actual range. If you're very far zoomed out, each light's range would only be a few pixels of screen-space, if that.

Jibb
Posted By: Michael_Schwarz

Re: Who needs so MANY LIGHTs?! - 04/19/10 15:19

nVIDIA GeForce 9800 GTX+
350: 50 FPS
700: 50 FPS
Posted By: mikaldinho

Re: Who needs so MANY LIGHTs?! - 04/19/10 17:03

it looks really good!


oh, and both 700 & 350 ran perfectly fine on my notebook :-)
Posted By: Rackscha

Re: Who needs so MANY LIGHTs?! - 04/19/10 17:24

ATI HD 4870
350lights = 115FPS(lowest stable FPS, up to 140fps)
700lights = 65-75FPS

Nice work, and running smooth^^


Greets
Rackscha
Posted By: ptrc1c

Re: Who needs so MANY LIGHTs?! - 04/19/10 17:58

That is really impressive, the only problem I found was that I could hear the
fan on my graphics card speed up until I thought it was going to take off.
Posted By: BoH_Havoc

Re: Who needs so MANY LIGHTs?! - 04/20/10 10:09

Hey,
nice work you did there!
I tried to do it myself in the past, but couldn't get it to work and eventually dropped it. So again: Nice work laugh

runs ok here @
30 fps 700 lights
50 fps 350 lights

@ 9800 GT Mobile


Looking forward for more laugh
Posted By: ratchet

Re: Who needs so MANY LIGHTs?! - 04/20/10 13:18

Runs very smooth on my GTX 285 for 700 lights.

I can see that only few lights affects each 3D objects.
And it's simple 3D cubes !
So putting 700 really doesn't mean nothing laugh
Instead you should do a demo displaying how many simultaneous lights are affecting the objects each time and put it on a complex 3D scene instead with houses , trees, terrain to see how it behaves!

Only last 3D cards with pixel shaders 4 if i'm not wrong ???
Allow to do deferred shading : lot of simultaneous dynamic lights affecting the entire scene. Before it was impossible or performance was incredibly bad with standard shaders.
Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/20/10 14:10

It would be the same if it was 700 lights affecting one single object. That's the beauty of deferred rendering, and this has some tricks to make it even faster.

I don't know about Hummel's particular code, but deferred shading can be done taking advantage of MRTs as early as shader model 2.

In fact, since 3DGS uses DirectX 9, it couldn't possibly require a shader model 4 card.

Deferred shading isn't performance hungry at all -- that's the whole point of it. And that's why you can have hundreds of lights affecting each object.

Jibb
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/20/10 14:24

@ratchet: the performance does not depend on how many lights affect a single object. Look into my start post.
The lighting speed is independend from the complexity of your objects.
Shader version 4 isnīt supported by GS at all.
What I do here is not really deferred shading, but I make use of MRTs and a single post processing effect with about 20 pixel shader instructions.

Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/20/10 16:28

While I haven't read the paper in detail, I got the impression that it is deferred shading, but it just does things in a different order to reduce the amount of texture samples that need to be taken.

Jibb
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/20/10 17:10

the original Light pre-pass doesnīt use any MRTs, it replaces the deferred renderer completely but requires to render the scene twice.
Posted By: ratchet

Re: Who needs so MANY LIGHTs?! - 04/20/10 19:24

Ok, im not specialist about shaders !
So , now you just have to incorporate your great rendering shader in the A8 package laugh
Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/20/10 19:31

Okay, I see that now.

So, the advantage is that objects can more easily have their own material properties while still having many of the advantages of a deferred renderer (specifically, the ridiculous amount of light-sources)?

Jibb
Posted By: Hummel

Re: Who needs so MANY LIGHTs?! - 04/20/10 19:36

that seems to be the idea but the lighting is much more efficient than adding a render pass for each light to the whole screen like you do it with DS
Posted By: FBL

Re: Who needs so MANY LIGHTs?! - 04/20/10 20:05

27 / 17 / GF7900GT
Posted By: JibbSmart

Re: Who needs so MANY LIGHTs?! - 04/20/10 20:49

Quote:
that seems to be the idea but the lighting is much more efficient than adding a render pass for each light to the whole screen like you do it with DS
I wasn't aware that deferred shading normally does each lighting pass to the whole screen -- hence the confusion here tongue I've never actually read much on deferred shading. For the summer contest last year I had a deferred renderer that rendered each light as a sprite so that if the light's range occupies very little screen space, the lighting would be calculated on very few pixels.

Of course, it needed a little work (everything was out by half a pixel, and if the sprite passed just behind the camera it would get clipped away completely, removing the effects of the light), but I guess it's a similar thing.

And of course, it was still just deferred shading -- not a light pre-pass rendering chain.

Jibb
Posted By: SchokoKeks

Re: Who needs so MANY LIGHTs?! - 04/20/10 20:50

61 and 42 fps on Radeon HD3870
© 2024 lite-C Forums