Jump to content
  • Advertisement
Sign in to follow this  
Unreal

Dirty way for discart not-in-frustum objects. Help plz

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

Hello!!! In a level loaded in my 3dengine i have some hi-poly count static objects. I have that objects in a object manager class that renders that objects. But I also render objects that is not in the camera frustum!This is waste of fps. My Engine has a BSP Tree but the only optimization I have in it is Bounding Box optmimization and I can't discart all the objects that are not in the camera frustum using the BSP Tree. Is there any other way to do this? I was thinking this: before render the actual object render the bounding box or sphere of the object using an occlusion query to see if the object is visible at camera frustum. if yes then draw it. if not then dont draw it. but to do all this stuff i must render the bounding box/sphere first. and the bounding box will appear to the screen! how can I erase that? well I know that you can not just erase something. but there must be some trick to "hide" it. thanks in advance;

Share this post


Link to post
Share on other sites
Advertisement
Disable colour and z writes (or use an alpha blend of SRCBLEND_ZERO).

Be warned that the occlusion query probably won't execute quickly enough to give you results the same frame (at least, not without having you sit around for a while and wait). You'll likely want to use the results of the query you made the previous frame, sort of thing.

Share this post


Link to post
Share on other sites
thanks for your reply!
well.. about occlusion query speed now...
Am I gonna lose a lot of fps when testing with queries?
is it better from drawing 2000 polygons?

Share this post


Link to post
Share on other sites
It depends on a lot of things (such as the heavyness of your vertex shader). You'll have to profile, but my gut feeling is that yes, trying to get the results of the query back the same frame will cause you slowdown.

Share this post


Link to post
Share on other sites
i use them and i have some extra fps because now i dont draw the objects that are behind the walls. :)
In a simple level with some complex geometry I can discart 30.000 - 40.000 vertices whitch is behind the walls. :)

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!