• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# OpenGL Question about speed in OpenGL

## Recommended Posts

How many triangles do you think should be enough to make a decent quality 3d world, without sacrificing speed using for example a 1GHz processor and a Geforce2 GTS card?

30000

##### Share on other sites
I agree. 30000 gives me 30 fps on my 1.6 GHz, but it should be about the same for you.

##### Share on other sites
It is absolutely impossible to say. It depends on too many factors.

Define ''decent quality 3D world''. Some would say 10k (big Q3 level), others would say way over 100 million. The number of faces that can be handled is typically not defined by the CPU and 3D card. It''s defined by your 3D engine. It''s very likely that you''ll hit the limit of your engine before you''re hitting hardware limits. A 1Ghz CPU with GF2-GTS (given enough RAM) can handle 3D worlds with several million faces at 30fps, on a highend engine. On a lowend engine, you might already hit the 30fps limit with 10k faces. The hardware limit of a GF2 is way over that. Given optimal programming, you could run up to 200k - 300k faces in the view at 30fps on it.

Only one way to find out: time and profile your engine.

##### Share on other sites
we know that i can have a million polygons as well just split my surface so i get a million but nowerdays decent egoshooters handle around 30000 wpolys and more

##### Share on other sites
Thanx everyone for your help... and ... Yann L, when i write a "decent quality 3D world", i mean that if you were making a game with enough subdivisions that the player doesn''t says that it looks "blocky" and still have a good performance. If your engine is really slow, and you think the world that you got have your requirements the thing you should improve is the engine, right? Just suppose the engine can render up to 50000 triangles without problems.

What i see is that i should aim for 30000 polys. I''m not a expert or even a experienced 3d programmer. I have done many small proyects with 3d graphics and i feel it''s time to try something bigger.

##### Share on other sites
in KEA (below) the planet in the screenshots have about 50,000 tris (not all on screen at once tthough) also this is just for the planet everything else is extra.
btw 50,000 aint much

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
My GeForce4 can do 1.03 trillion a second, oh wait thats operations a second. Theres a 128 meg of DDR on the card, so asume that it can handle a great deal of punishment. I only have the 4200, I want the 4800. I have never sean a 3D engine that actually uses the full hardware support. I think the DOOM3 would probebly ge there more then any thang else will. I think I remeber some of the objects being discussed were around 1000 polygons or more each. Thats alot per model. I rember that nVidia fire truck being some like 100,000 polies. I would like to see an actual 3D engine that uses my computers full hardware caps. Is there any thang wrong with using multiple graphics cards APIs in your program, just making sure that there not running if the card isn''t present. That would get you closer and make a better engine. But I want to see something that really pushes me graphics card to the max. If any of you know of something, please tell me.

##### Share on other sites
quote:

If your engine is really slow, and you think the world that you got have your requirements the thing you should improve is the engine, right? Just suppose the engine can render up to 50000 triangles without problems.

If your scene isn't insanely complex, then that's right. The bottleneck is almost always the engine.

quote:

What i see is that i should aim for 30000 polys. I'm not a expert or even a experienced 3d programmer. I have done many small proyects with 3d graphics and i feel it's time to try something bigger.

Well, I don't know your engine (D3D, OpenGL ?), so I can't really give you any advice other than that the most important thing are your data structures and hierarchical organization. If you use vertex streaming, then 30000 faces is virtually nothing for a GF2 GTS.

Why not target higher ? Do you have an octtree engine running (forget BSPs) ? Yes ? Good. Do you know how to stream static vertex data into an AGP/VRAM cache (that's VAR for OpenGL and static vertex buffers for D3D, lots of tutorials available) ? If yes, then forget about the 30k faces. Target 200000. That's a good start, and it isn't very difficult to build a basic engine that can handle this number. You could even go higher. Some simple nVidia demos have objects with 300000 faces in the view at once, that run at 30 fps. And this are small 500 line demos.

Even if your 3D world doesn't need them all (though you can make 3D worlds that take lots of faces, and not only for subdivision, but for real 3D detail. But you need a good artist, that might be a problem for many amateur prgrammers), you can still use them for better looking models and objects.

I'm just a little fed up by people telling 'oh look, current games do not use more than 50k faces, so that must be the limit that can be achieved'. Wrong. Even current games were designed years ago, with lower target specs in mind. Not a single game currently on the market does even use 20% of the power a GF4 provides. Not one. Not even Doom3. Why limit yourself to that. Target higher.

quote:

Just suppose the engine can render up to 50000 triangles without problems.

Hmm, do you mean at once in the view ? Or for a full 3D world ?

/ Yann

[edited by - Yann L on November 6, 2002 3:52:13 PM]

##### Share on other sites
my biggest problem is the worldcraft coordinate system
when i port it to ogl all my visability checks don t work anymore and right now i can t imagine how to convert my vectors
thats really annoying

##### Share on other sites

I''m working with OpenGL(that''s why i''m posting in this forum). Getting a good artist is not a problem, and sometimes i might need to put more than 50% of the world on the screen, but i don''t think that i really need to display the whole thing at once.

##### Share on other sites
quote:

Getting a good artist is not a problem, and sometimes i might need to put more than 50% of the world on the screen, but i don''t think that i really need to display the whole thing at once.

50% display ratio is a bit atypical for a 3D world. Do you really need to display all that ? Large scale isometric view ?

Anyway, if you have access to a good 3D artist, then you should target higher than 30k per world. I would go with 200k - 300k, that seems like a reasonable number for a GF2. But don''t over-tesselate your world either. Put the faces where it''s worth it: smooth surfaces, realistic organic objects (eg. characters), etc. If you don''t need more than 30k, then stay with 30k. But if using 100k will give you a much nicer, less blocky world, then use 100k.

About the coding: if you put everything in a VRAM cache (VAR extension), then you can easily get 50 to 60fps on a 300k world. Just be sure to have a decent hierarchical frustum culling algorithm, and some occlusion won''t hurt either.

/ Yann

##### Share on other sites
Well, my terrain engine can cope with 8.4+ million faces in a landscape easily... ( on a GF4 Ti 4200 )... though no where near that are displayed at any one time, I think thats one of the major factors, the number of triangles displayed at any one time...

Death of one is a tragedy, death of a million is just a statistic.

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627667
• Total Posts
2978532
• ### Similar Content

• Both functions are available since 3.0, and I'm currently using glMapBuffer(), which works fine.
But, I was wondering if anyone has experienced advantage in using glMapBufferRange(), which allows to specify the range of the mapped buffer. Could this be only a safety measure or does it improve performance?
Note: I'm not asking about glBufferSubData()/glBufferData. Those two are irrelevant in this case.
• By xhcao
Before using void glBindImageTexture(    GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), does need to make sure that texture is completeness.
• By cebugdev
hi guys,
are there any books, link online or any other resources that discusses on how to build special effects such as magic, lightning, etc. in OpenGL? i mean, yeah most of them are using particles but im looking for resources specifically on how to manipulate the particles to look like an effect that can be use for games,. i did fire particle before, and I want to learn how to do the other 'magic' as well.
Like are there one book or link(cant find in google) that atleast featured how to make different particle effects in OpenGL (or DirectX)? If there is no one stop shop for it, maybe ill just look for some tips on how to make a particle engine that is flexible enough to enable me to design different effects/magic
let me know if you guys have recommendations.
• By dud3
How do we rotate the camera around x axis 360 degrees, without having the strange effect as in my video below?
Mine behaves exactly the same way spherical coordinates would, I'm using euler angles.
Tried googling, but couldn't find a proper answer, guessing I don't know what exactly to google for, googled 'rotate 360 around x axis', got no proper answers.

References:
Code: https://pastebin.com/Hcshj3FQ
The video shows the difference between blender and my rotation:

• By Defend
I've had a Google around for this but haven't yet found some solid advice. There is a lot of "it depends", but I'm not sure on what.
My question is what's a good rule of thumb to follow when it comes to creating/using VBOs & VAOs? As in, when should I use multiple or when should I not? My understanding so far is that if I need a new VBO, then I need a new VAO. So when it comes to rendering multiple objects I can either:
* make lots of VAO/VBO pairs and flip through them to render different objects, or
* make one big VBO and jump around its memory to render different objects.
I also understand that if I need to render objects with different vertex attributes, then a new VAO is necessary in this case.
If that "it depends" really is quite variable, what's best for a beginner with OpenGL, assuming that better approaches can be learnt later with better understanding?

• 10
• 10
• 12
• 22
• 13