Sign in to follow this  
guvidu

Bigger FPS help!

Recommended Posts

Hello. Im making a cabe with lots of dice objects that i import via a 3ds importer. The problem is that when i have only 2 or 6 dices it work ok. But i need to have like 46 of theme. All of them are visible all the time. So frutum is not good(i know that frustum only takes out the object that are out of the view). I was thinking of doing something like not rendering the part of the object that is mask by other object. How can i do this? Or how can i make my frame rate bigger. I render the objects with vertex buffers. Thanks!

Share this post


Link to post
Share on other sites
One general hint first: profile your app to see whether you are CPU-limited or GPU-limited. If you are GPU-limited check if you are limited by fillrate or transformation. Try to reduce the number of polygons drawn or reduce the window size. Which one does affect framerate the most?

Window size --> fillrate limited
Fewer polys --> transformation limited

Occlusion culling is what you mean by masking parts of the objects out but I don't know if this would help in your case.

Try sorting the dices from front to back and let OpenGL do the masking part (z-culling).

Share this post


Link to post
Share on other sites
Hi,

Well this doesn't sound to bad really, assuming you only have 46 dice, I would hope it's not made of more than 12 polygons each ??

Unless it is a real high definiftion model, with real smooth/rounded corners or something.

assuming 46 dice, 6 sides per dice, 2 polygons per side, if your using triangles and not quads, then it would be half the amount.

You are only rendering a maximum of 552 polygons, that's not a lot.

Are you using culling, so you dont draw the back off the dice you cannot see ?..
glCullFace(GL_BACK); (or front)
glEnable(GL_CULL_FACE);

failing that, what about texture size, and are your textures the power of 2 (128x128, 256x256 etc etc)

Share this post


Link to post
Share on other sites
its a 3ds mesh - im rendering with vertex buffert GL_TRIANGLES , i'm using 256x256 tga texture also im duing culling and i have like 380 poligons in a mesh..But with 4 objects in the scene i drop the framerate to 60.

Since its the same object will i get improve fps with display list? Thanks!

Share this post


Link to post
Share on other sites
380 polygons for a dice !!!

That seems an awful lot.. (around ~17,000 polys for your scene, without culling)

I'm not surprised you have low FPS, plus that depends on your graphics card spec too .. What have you got ?

Are you using the same textures for every dice (i'm guessing it a single texture, wrapped around the mesh, since you say it's a 3DS file)
(Or is it 6 textures, one per side)


Post your code, if there are a lot of calls to glBegin, glEnd etc etc can cause a performance drop.

Share this post


Link to post
Share on other sites
17000 polys is really not that much for most video cards to handle, but you should tell us what hardware you are running. If you are getting 60 FPS you may just be hitting the refresh rate of your monitor. Do you have vsync enabled? That said, 380 polys per dice (die?) is rediculous. Before you do anything else, go make a post in the art forum or in the help wanted forum. Put up a screenshot of your current dice and see if someone will make you a low poly version of the same thing. It should take any half decent modeler on this board less than an hour to create a low poly texture mapped set of dice suitable for your game. Once you have reasonable sized objects for your game, then you can revisit optimizing your renderer.

Share this post


Link to post
Share on other sites
I agree with you on the dice model. Have to change it. My specs are intel core 2 duo ati x1400 256Ram. I dont have vsync activated. With nothing draw i get 1100 fps.:)

Share this post


Link to post
Share on other sites
try here for dice models

http://www.turbosquid.com/ there are quite a few.

And well you have a very good graphics card, and like CodeMunkie said, it shouldn't really be killing your frame rate.

Post your render code, you may have a bigger problem somewhere else.
Like I said in a previous post, maybe too many calls to GL (glBegin/glEnd etc)

Share this post


Link to post
Share on other sites
Thanks all for the reply - i managed to improve the framerate. Now i get like 200fps with 20 objects. So thats good. The problem was with the object and im a shame to say with my declaration of VBO.

Thanks again!

Share this post


Link to post
Share on other sites

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