C Senthil Kumar

In my application, culling has no effect on framerate.

I am rendering a 3D model (.x file format) with approx 2400 triangles (1500 vertices) in my application.

With backface culling turned on,

pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );

and at 640x480 resolution in fullscreen mode, my framerate hovers around 3 fps (my application is currently not that effecient) when the entire model is in my view.

Even if I turn off culling, the framerate still hovers around 3 (it should decrease right )

I think a model with 2500 triangles should show a difference (of atleast around 2 fps). But there is no difference whether I turn culling on or off.

Am I missing something here, or should I use more complex models for the framerate to show any difference With the same framerate in both cases, I am confused whether culling really works or not!

Thanks.



Re: Game Technologies: Graphics Culling backfacing triangles has no effect

Ralf Kornmann

There are multiple reasons why back face culling gives you not the expected performance boost. If you are unsure if it works at all you can cull the front faces. This should show you the faces that are normally culled.

Depending on your video hardware there are different tools available that can help you to find the bottleneck. You should browse to the developer page of your GPU manufacture.






Re: Game Technologies: Graphics Culling backfacing triangles has no effect

C Senthil Kumar

Thanks.

I also need to cull triangles that are completely behind the camera. I can do it manually, but I need to know whether DirectX does it by itself. Does DirectX remove triangles not visible within the Field of View by itself If so, it would be a waste performing it myself.

Also, after I send 'x' triangles for rendering, DirectX may cull, clip and perform other operations before the actual rendering. Is there a way to find out how many triangles were actually rendered






Re: Game Technologies: Graphics Culling backfacing triangles has no effect

S.

DirectX won't cull the triangles behind the camera for you.
For this you'll need frustum culling. (every good engine should have this feature).
Great article: http://www.flipcode.com/articles/article_frustumculling.shtml




Re: Game Technologies: Graphics Culling backfacing triangles has no effect

C Senthil Kumar

I thought that it would be a duplicate effort. Thanks for confirming that DirectX won't do the culling. Now I can go ahead and do it myself.

Also, thanks for the link to the culling article.





Re: Game Technologies: Graphics Culling backfacing triangles has no effect

C Senthil Kumar

Thanks for confirming that DirectX won't do the culling. Now I can go ahead and do the culling myself.

Also, thanks for the link to the frustrum culling article.






Re: Game Technologies: Graphics Culling backfacing triangles has no effect

E.Jordan

Check out the ati framework source code it has frustum culling implementation.

Hope this helps

Erik

www.ManagedGames.com

Administrator





Re: Game Technologies: Graphics Culling backfacing triangles has no effect

DukeZZZ

I suspect you have a CPU bound application, and so, any improvement you can apply in the graphic pipeline won't produce any benefits to your application because it will still stay CPU bounded.

3 fps is a very low framerate considering the modern hardware, unless you are using the unreal engine 10's shaders ( Big Smile )... I think the problem is caused by some inefficent data structure you are using or some portion of code with a complexity more above the linear, maybe O(n^3) considering the size of the scene you have reported. 2500 tris are an insignificant amount of data for the modern GPU (again, unless you are using some crazy shaders)

What else your app is doing other than drawing the tris check that part of code and try to reduce its (computational) complexity