Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 May 2012
Offline Last Active Dec 26 2012 06:25 AM

Topics I've Started

Maximum intersections between view frustum and grid

14 September 2012 - 12:53 PM

Hi guys,

currently I'm a little at a loss. I've got something like a grid (rows x columns) of bounding boxes. They are something along the line of 200 x 200 x 400. Now I'm trying to find a function that gives me the maximum numbers of intersections a view frustum of a given size can have with the bounding boxes of that grid. I can also go so far as to neglect the near plane. So i just use a pyramid that has the far plane as its base area and the distance from the camera to the far plane as its height. (I'm looking for this because I need to reserve resources for the maximum number of bounding boxes in the view frustum)

I would be very grateful for any ideas you might have.

Profiling project with procedurally generated content

15 May 2012 - 09:41 AM

Hello everybody,

this is my first post in these forums and i already come to you with a problem. So, I'm writing a program for my thesis on procedural content generation in games for my university.
Right now the program creates a bunch of objects which hold vertex data of ground squares as well as a seed. As these come into view (implemented view frustum culling) some string is created based on the random seed of the ground square object through a parametric L-System. Then based on that string a lot of street elements are created which hold the vertex data(DynamicVertexBuffer) of the streets on the ground square. When the square leaves view the street elements and therefore the vertex data is destroyed again.
Now to the actual problem. When those ground squares come into view the "game" stops for like half a second to a second and goes on then (although not showing me any problems with frames). Naturally I thought there must be a problem with the creation of the vertex data during the update method. But profiling showed me that most of the time is spend in the Draw() method and Update() doesn't seem at all critical.
I also downloaded the cpu profiling program Very Sleepy and profiled the game. Which showed me that the process spends a lot of time in Kernel32 waitForSingleObject or waitForMultipleObjects.

So I'm pretty new to this. I cannot even say whether this means the game is CPU or GPU bound.
If you have any clues for me I'd be very grateful.

so long