Jump to content
  • Advertisement
Sign in to follow this  
ArchangelMorph

Clipping and Occlusion

This topic is 4697 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys! Was just wondering something.. I recently built a small demo using directX9 and it runs horribly slow (even on my GeForce 7800 GTX).. I think the problem seems to be with my environment mesh of which I loaded in from an .X file.. The environment mesh is quite large (a couple of thousand polys) and textured with a relatively simple texture map.. I think the problem maybe that I haven't setup any form of clipping occlusion culling in the demo because I was under the impression DirextX does/can do it for you.. Can someone please confirm whether this is the case or whether i'm just being a noob who should go away and write some code for this purpose..?

Share this post


Link to post
Share on other sites
Advertisement
Well, I don't know what performance a 7800GTX would give, but the figure you're saying, a couple thousand polygons surely wouldn't be a problem in it's own.

One possible thing is that you're doing a lot of pixel overdraw. However, I do think anything under 20fps would mean you're doing something else wrong.

As a quick test, I'd recommend viewing your environment mesh in DX Viewer, and comparing framerates. Try and move the DX Viewer view to something similar to where the camera would be in-game. If you get a large difference, something else is probably slowing you down.

Another test would be to comment out just the line to render the environment mesh. If you don't get a very big increase in fps when you do so, this isn't what's holding you back.

Anyhow, on to culling. The first step you need to make is allowing your engine to only draw part of the environment. You could either split the mesh up into several smaller meshes/subsets. If you split them up into "areas", or maybe even a grid of some sort, you could easily only render the parts of the scene that are visible.

Hope this helps :).

Share this post


Link to post
Share on other sites
Hi,

You didn't say if you're a beginner in DirectX, so forgive me if you're not ^^
But, a few beginners often create and delete their resources (textures or meshes, etc.) every frame ! That could be the problem.

(A couple thousands tris with a single texture should render at hundreads of fps : my 6800 outputs something like 50K tris at 300FPS with 3 textures of size 2048², so your card shouldn't have those low framerates)

You could also try to check the output of Visual. Turn DirectX runtime to debug mode, and check the output of Visual to see if DirectX reports errors or warnings.

Share this post


Link to post
Share on other sites
Quote:
Original post by paic
Hi,

You didn't say if you're a beginner in DirectX, so forgive me if you're not ^^
But, a few beginners often create and delete their resources (textures or meshes, etc.) every frame ! That could be the problem.

(A couple thousands tris with a single texture should render at hundreads of fps : my 6800 outputs something like 50K tris at 300FPS with 3 textures of size 2048², so your card shouldn't have those low framerates)

You could also try to check the output of Visual. Turn DirectX runtime to debug mode, and check the output of Visual to see if DirectX reports errors or warnings.


Thnx 4 the heads up!

I'll try these out and see if the problem can be isolated.. Oh and I am pretty much a beginner when it comes to DirectX 9 (I previously did alot of 2D programming with DX8) but not a beginner when it comes to games programming in general..

K i'll be back with feedback..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!