Sign in to follow this  

Single Pass lighting speed issue....

This topic is 4339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my lighting and bump mapping the way I want them. The problem I'm having atm is related to speed. I just wanted to ask if this was the type of output I should be expecting(which doesn't seem right)... Currentlly when looking down one hallway there is about 10-12 lights, and its rendering 3000ish verticies I believe. The problem is it runs at about 7-10 fps. My graphics card is a Geforce 6600 299/501. When its NOT overclocked I get 5-9 fps. When I overclock the GPU(377/501), I get 9-13. This still doesn't seem right to be because other games have dynmaic lighting with more vertices/dlights and they have to render them in multiple passes. I would use deluxel maps but right now im really consindered with backwords cabaility. And I just wanted to know, is the GPU really the bottleneck? Theres screenshots of the test level, and the hallway that runs really slow: http://photobucket.com/albums/c335/justinmarshall23/darklight_build_2045_private/

Share this post


Link to post
Share on other sites
If you would send the file to rapidshare.de or something i could download it for you just to back it up. I have a gf6 6600DP turbo edition, shouldn't make a very big difference. What are your cpu and ram specs?

Share this post


Link to post
Share on other sites
I store the properties of the lights in two RGBA textures. The first texture is the origin(RGB) + light radius(Alpha), and the other texture holds the light color values. Which is the way the NVIDIA example shows how to do single pass lighting.

RAM: 1GB
CPU: P4 3.0ghz w/ emt64

Share this post


Link to post
Share on other sites
Do you do one pass per light ? If so, then you could perhaps improve speed by rendering several lights per pass.

3000 vertices doesn't sound too big. Does the performance scale down by each light you add to scene ? I suppose that you have a ROI system so that each object is rendered only as many times as there are lights close enough to contribute some lighting on it.

Nice screenshots by the way.

Regards

[Edited by - Demus79 on January 27, 2006 3:10:42 AM]

Share this post


Link to post
Share on other sites
No I do ALL lights in one pass. Which is the advantage of sending light data in textures because you can draw as many lights as you want in a single pass(odviouslly maxed at 4096 but who would that many lights in scene anyway). Yes the performance does scale down each time I add a light. I do cull out lights that wouldn't be visible, but sense all lights are drawn in one pass, even lights that wouldn't hit a surface get calculated as well. But still that is the concept of single pass lighting ;).

If one light is being drawn I get about 40-60 fps and it drops from there(12 = 10-12 fps).

Thks Demus79 ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by AndyEsser
I'm just getting into lighting myself for my engine but wouldn't doing multiple passes increase the framerate? Or is there a reason you prefer single pass?


Doing lights in multiple passes will only give you higher FPS because you can detect what light hit what verts so lights don't calculate surfaces that the light value is < 0. If you just draw all lights that visible in the frustum(and cull out the ones that arent) and just cull the lights that cant directlly be seen(for example behind a wall ex TraceLine)(which is what Im doing now), it would be slower(depending on many verts are in the scene) in multi pass lighting.

Share this post


Link to post
Share on other sites
Figures do sound very low, should easily be able to do 200+ lights on a 6600gt without issues (though that was without bump mapping - depends how expensive your code is for that).

GOCP

Share this post


Link to post
Share on other sites

This topic is 4339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this