Status update: Point light stress testing.

Yesterday I added over 1000 (one thousand) moving point lights to the terrain. On the PC this was fine. The scene partitioning used by my forward rendering setup uses a lot of CPU time though, so on the XBOX this performed abysmally — it took something like 10ms to update all of the point lights in the scene partitioner — not including calculating their positions. (And remember, we only have around 16-20ms per frame to do all updating.)

Point light stress testing.

Point light stress testing.


Since this was so slow, and I want to associate a point light with most enemies, I’ve been optimizing the partitioning a bit without making any very drastic changes.

Since there’s only about a month left, I decided that the smart thing to do is just to reduce the size of the terrain, and reduce the number of lights, in order to get everything done. Once it’s all working, I’ll consider revising the partitioning system to support a larger world again, and add more lights.

Below is the current state of things:

Point light testing, and some spheres rolling around on the terrain, colliding with each other.

After optimizations, this runs at about twice the speed that it did yesterday.

Struggling to get things working fast enough on the XBOX CPU (which provides me with roughly 10% of my PCs processing power) has been slowing me down a lot. Things that I keep expecting to be more than efficient enough, turn out to be twice as slow as what’s really feasible.

The image above has only 270 point lights spread out across the terrain (the little blue particles, only about 30 are visible), but runs at about 65FPS on the XBOX, limited by the CPU. That should hopefully be enough for the state of the game at the competition deadline. Far more lights, and a much bigger world is possible — but it’s not looking like I’ll have time for more than this before June 14th.

This entry was posted in DBP2011, XNA and tagged , , . Bookmark the permalink.

5 Responses to Status update: Point light stress testing.

  1. Pingback: Deferred lighting. | Olhovsky

  2. Matt says:

    “And remember, we only have around 16-20ms per frame to do all updating.”

    Are you targeting 30 or 60fps?

    If you’re targeting 30fps, then you have 33mms for cpu and 33ms for gpu per frame. Using non-immediate presentation mode, the gpu and cpu will work in parallel, with the gpu rendering the previously submitted data as the cpu prepares the next frame.

    If you’re targeting 60fps, then each will need to complete in 16ms (not 20).

    This can be commonly misunderstood when going from PC with super fast gpu’s to the a console.

  3. olhovsky says:

    I am not targeting 30fps.

    I am targeting either 60fps (16ms/frame) or 50fps (20ms/frame).

    There is no rule written in stone that says that you have to pick between 30 and 60fps :)

  4. Latrice says:

    Finally i quit my regular job, now i earn decent money
    online you should try too, just type in google –
    bluehand roulette system

  5. buy csgo says:

    I treasure the information on your website. Thank you so much!.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>