How much polygons in 3D engine?

Started by
9 comments, last by BlueLagoon 20 years, 10 months ago
When I put a detailled mesh in my Engine, it immidiatly runs slow. It now runs 14FPS (avarage) with rendering 5340 polygons per frame. Is this normal (for a beginning engine)? And if it can run faster by removing the high detailled mesh, it always runs at 85FPS (my monitor frame rate)... how can I adjust this, so I''ll see the REAL framerate? Thnx!
Advertisement
turn of vsync! it should be in your cards controle pannel..
it all depends on your 3d card... and your code...
i think it sounds slow with 14:5340, but i cant know, whitout knowing more about your computer/code...

try to profile it, and find what parts of the engine that are slow... also browse this forum (OpenGL/DirectX) to find ways to du stuff faster....

minimize the times you change textures(sort things by texture)
blending is pretty slow on older cards...
newer render single triangles...

[edited by - uncutno on June 4, 2003 9:51:55 AM]
-Anders-Oredsson-Norway-
I''m testing on a:

Intel Pentium 3 - 800Mhz
512 MB SDRAM
Geforce 4 TI 4400
There is a flag called PresentationInterval in the present parameters (used when creating device).
You should check what the is the value that you are using (check the SDK for possible values)
_________ Evious Ltd.
Those suggestions do not explain the 14FPS. No, that is not normal. For 5000 polygons on a GeForce4 Ti, you should be getting several hundred frames per second. Probably you are submitting the data horribly inefficiently (like one triangle per vertex buffer). How many vertex buffers are you using, and how many DrawIndexedPrimitive (or DrawPrimitive) calls are you making each frame?

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
We''re just importing Meshes, without vertex buffers, as far as I know ... Import -> Render We don''t use drawprimitive.

Changing PresentationInterval to "D3DPRESENT_INTERVAL_IMMEDIATE;" helped to get the FPS around 150fps, but without the havy meshes (now 2670 polygons per frame).

So my polygons get doubled... and the FPS goes down 10 times!!

Any suggestions? :D
If you are using Direct3D, make sure you have Hardware Vertex Processing turned on. You specify that flag when creating the device. If you are transforming your triangles in software processing, that may explain the low speed.

Guimo
Direct3D has no "Import" or "Render" commands, which means you''re using something on top of it. What? Is it that DirectX class library thingie MS released?

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
We just import .x files... let''s see the folowing code, does importing:

D3DXLoadMeshFromX(pFilename, D3DXMESH_SYSTEMMEM, m_pD3DDevice, NULL, &pMaterialsBuffer, &m_dwNumMaterials, &pMesh)) 


We''ve now turned on Hardware Vertex Processing!! And now we can import the high poly files with a framerate of over 180fps!

Problem is, we''ll have to demonstrate it on a laptop, that proberly won''t support Hardware Vertex Processing

Thnx
Well there are laptops with T&L cards. Mine for example. But if you''re using hardware vertex processing, you do not want to load the mesh into system memory -- use D3DXMESH_DEFAULT (or D3DX_DEFAULT or whatever, they''re all 0).

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.

This topic is closed to new replies.

Advertisement