octree madness!!

Published November 04, 2007
Advertisement
octree madness

So..

spent about 4 hours today adding a nice octree to my game framework. I'm able to render 100 models on screen at a jaw-dropping 15 FPS. Obviously the octree only helps if they aren't all visible.

Theres still the big question of why I'm getting such crummy performance, but I'll leave that for another day.

Maybe its time to look into doing Level of Detail (LOD). Hmm I wonder if anybody has done XNA stuff on that yet.. I'll have to check it out.
0 likes 4 comments

Comments

moribundus
I hope I'll catch up with your framework soon. I wonder what framerate will I get :)

Hmm, how many polys does the shuttle have? The performance seems to be odd. You can always try to profile your code (although I'm not sure if it's possible with Visual Studio Express) or use nVidia's profiling and performance analyzing tools (providing you have one of their cards). Or maybe ATI (oh, AMD) offers similar tools.
November 04, 2007 06:43 PM
nordwindranger
heh I must admit that I've been cheating like mad lately, by looking at as many tutorials as I can get my hands on. Although I guess theres really no reason why I should reinvent the wheel. I know I certainly wouldn't have been able to figure out the math for the octree on my own.

The shuttle is actually one of the more expensive files that I've made. the .x file is around 2 meg, but I haven't checked to see how many poly's it is yet.

I think I'm going to do animation next, so I'll use a different model, we'll see if it makes much of a difference.

I'm not really sure where the fps drag is coming from though. I've got bloom lighting going, and each model is shaded with a pixel shader 2.0 shader, but this is no different from IDOE, which had a steady 60 fps. (of course i never ran 100 models at once in IDOE, so who knows).

Ive got an ATI card, so I'm not to sure if they have those kind of tools or not, but I'll check it out.

November 05, 2007 10:59 AM
moribundus
2meg? Ehehehehe. That's at least few hundred thousand triangles :D

However what you can do (although I have no knowledge of XNA) is to make some global counter for rendered polygons (triangles) and display it along with the FPS counter each frame. Just set this counter to zero at the beginning of each frame and every time you call DrawPrimitive (or something like that), just add the number of primitive's triangles to it.

Btw. there's nothing wrong with tutorials - the more, the merrier ;)
November 08, 2007 10:01 AM
nordwindranger
I wish I had a way of being notified when someone posts on this..

yeah, come to think of it, all of those pretty cylindrical sides on that model probably jacked up the polys. I've really gotta pay better attention to that kind of stuff
November 11, 2007 03:54 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement