Skip to main content
GameDev.net gamedev.net
🔒 Locked

Optimize the project

Started by ghiboz Aug 23, 2007 at 8:54 AM 4 replies 750+ views
Original Post
ghiboz
ghiboz
Hi! I'm making some tests and I seen that if I load over 6, 7 meshes into my project the fps are very bad (consider that I have a sheet of pc) I tried using the occlusion query method and the things are better... is there some other thing to improve the performances?? thanks again! :)
jpetrie
jpetrie
Yes.




But if you want more detailed information, I'm afraid you're going to have supply more information yourself. How are you loading the models? How are you displaying them? How is your rendering pipeline organized? Et cetera.
ghiboz
ghiboz
sorry...
I create the mesh using a proper file format from 3d studio:
HRESULT res = D3DXCreateMesh(nFaces, nVertex, D3DXMESH_MANAGED|D3DXMESH_32BIT, elm, pDevice, &Mesh);


after I render like this:
pQuery->Issue( D3DISSUE_BEGIN );{	for( DWORD i=0; i < NumMaterials; i++ )	{		pDevice->SetMaterial( &Materials );		pDevice->SetTexture( 0, Textures );		Mesh->DrawSubset( i );	}}pQuery->Issue( D3DISSUE_END );


thanks again!
jollyjeffers
jollyjeffers
Okay, but how many vertices/triangles are you rendering? What sort of hardware are you targetting? How many subsets per mesh?

What sort of texturing or transformations are you using - complex shaders at work?

Be warned that occlusion queries are a very easy way of forcing lock-step between the CPU and GPU. This is very bad for performance.

What hard facts have you got about performance. Your description is vague at best - have you done any proper profiling, benchmarking or any other objective analysis?

Have you used any CPU or GPU tools for profiling? Done any measurement using PIX? etc..etc..

I don't like to be negative, but you need to realise that rendering with modern GPU's and API's is an exceptionally complicated beast when it comes to performance. There are a huge number of potential bottlenecks - even experienced developers like myself (~8 years with D3D) can take hours or even days to properly identify performance issues. There are so many things to look at, to test etc...

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
ghiboz
ghiboz
thanks jack...
sorry, i'm newbie from dx...
i made some other tests...
the strange thing is that the performance fall off in a very strange thing:
i explain:

I tried:
165020 faces
494988 vertex
fps over 100

i added a little mesh
168188 faces
504492 vertex
fps 1

i tried also to change the mesh that I added (maybe the problem is the mesh) but seems that if the number go over a certain value, the project go down

i don't use any shader, i use max 12 subset per mesh

thanks again
paolo
Adam_42
Adam_42
500,000 verts at say 32 bytes each (position, normal & UV) gives a 16MB vertex buffer and 2MB index buffer.

How big are the textures? Are they DXT compressed? How much video ram have you got in your card?

If you run out then things can go very slowly.


That's just a guess as to what might be wrong. What I'd recommend you do is to get hold of NVPerfHud, install it, read the documentation and try to identify the bottleneck with that.

Topic Locked

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

Sign in to reply to this topic.