Skip to main content
gamedev.net
🔒 Locked

Bigger FPS help!

Started by guvidu 8 replies 1.2k views
Original Post
guvidu
guvidu
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!
Lord_Evil
Lord_Evil
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).

If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
darren_mfuk
darren_mfuk
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)
----------------------------------------Now just hit that link that says 'Rate This User' [wink]
guvidu
guvidu
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!
darren_mfuk
darren_mfuk
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.
----------------------------------------Now just hit that link that says 'Rate This User' [wink]
CodeMunkie
CodeMunkie
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.
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
guvidu
guvidu
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.:)
darren_mfuk
darren_mfuk
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)

----------------------------------------Now just hit that link that says 'Rate This User' [wink]
dpadam450
dpadam450
Its probably so many polys cuz he made sphere cut-outs for the dots. Put the dots in a texture.
NBA2K, Madden, Maneater, Killing Floor, Sims 
guvidu
guvidu
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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.