Jump to content
  • Advertisement
Sign in to follow this  
GameMasterXL

Not rendering unscene polygons

This topic is 4848 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

Ok this might sound noobish but if i have an image of a oil drum and behind that is a terrain a very bumpy terain and i am looking at the oil drum and only see a bit of the terain around the oil drum. Then the gemoetry behind it is not seen and beinhde the hill you can see so can you stop this from being rendered and using memory and cpu speed? so if i froze it it looked like bits of the level was cut out into a perfect shape of the object that ook that space up when you looked at it.

Share this post


Link to post
Share on other sites
Advertisement
that's a very good technique to raise the performance of your rendering, actually, you have two things you have to pay attention to:
geometry culling: which consists of rendering the polygons that are withing your view frustum, in other words if you are in the middle of a terrain, then you don't need to render things that positioned behind, or to the extrem sides, because you can't see them.
the other thing you have to care about is PVS, potentially visible surfaces, and that's what you were talking about, by not rendering polygons that will be hidden by other sufraces, you can significantly increase performance.

so how to implement those two techniques...well actually there are dozens of ways you can follow, so try to look up, geometry culling and PVS, and see wich best suits you.

Share this post


Link to post
Share on other sites
A technique called "z rejection" is a very useful technique in modern graphics hardware. When you sort your renderable objects front-to-back order, the graphics card doesn't bother to fill the pixels that do not pass the z-buffer check, thus saving potentially enormous amounts of fillrate (which is a very common bottleneck in newer games with complex per-pixel processing). For example, draw the oil drum before the background.

It is not usually worth the trouble to cull out individual polygons; instead, if you have huge amounts of geometry, divide it to batches of (about) few thousand polygons per region, and check which regions are visible before rendering. This way, you'll balance the work the cpu and gpu need to do about the geometry, thus gaining good geometry processing performance.

The optimal size of the batches are dependent of hardware, so make some profiling before you decide the best values.

Share this post


Link to post
Share on other sites
Thanku all for your help. Is there by any chance a way of me implimenting an algarithm that will cut out each individual pixel from the objects you can't see?

Edit i also found an engine that decreases the ammount of polygons at distance and texture quality which would be a good one also.

Share this post


Link to post
Share on other sites
Quote:
Original post by GameMasterXL
Thanku all for your help. Is there by any chance a way of me implimenting an algarithm that will cut out each individual pixel from the objects you can't see?


It would take more time to try to do pixel culling yourself rather than letting the hardware try to draw them. The z rejection technique is essentially hardware pixel culling and you should use it to your advantage.

Quote:

Edit i also found an engine that decreases the ammount of polygons at distance and texture quality which would be a good one also.


Depending on the actual drawing approach of the engine, it may or may not bring you benefits on performance. The small number of calls needed to draw something is much more important than small total amount of polygons on modern graphics cards.

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!