Jump to content
  • Advertisement
Sign in to follow this  
Magnumwolf

Rendering items you cant see

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

Hi, Im working on a small game that i will eventually be transfering onto a small handheld games device so im trying to make a few optimisations My question is: would it be an optimisation to only render what is currently displayed on the screen (or is that done automatically) If i have a 500 x 500 map, but my screen is 250 x 250 would it be better for me to program my render code so that its only trying to render a 250 x 250 area or will it automatically ignore the "unseen" parts?

Share this post


Link to post
Share on other sites
Advertisement
I don't know about all the different handheld devices, but on most platforms, frustum culling is automatic (providing it's enabled) and does more or less what you want. Anything not within the view frustum will not be rendered. Manually checking this kind of thing would be slow and counterproductive.

I don't know what a 500x500 map is. Is it 2d tiles or 3d terrain tiles or some kind of mesh tiles? If it's 2d tiles, you should definitely only be drawing what's in the screen bounds. It's pointless rendering all those tiles because with an isometric camera and 2d drawing, you know exactly what things need to be drawn at any given time. With terrain tiles or mesh tiles, you probably don't.

Now again, I'm not sure about all platforms, but I know that occlusion culling is also very important on the IPhone. So if that's one of the devices you want to port to, and you're doing 3d, you should definitely look into occlusion culling. Even so, you don't want to do heavy duty occlusion culling, because the device will be too slow. You'll probably want to just precalculate the static objects and setup some camera zones. Just really simple basic stuff which can eliminate as many draw calls as possible with as little work as possible.

Share this post


Link to post
Share on other sites
Quote:
Original post by Magnumwolf

If i have a 500 x 500 map, but my screen is 250 x 250 would it be better for me to program my render code so that its only trying to render a 250 x 250 area or will it automatically ignore the "unseen" parts?


A = Cost of visibility culling
B = Cost of overdraw

If A < B, then it's worth doing it.

Some mobile devices only support retained mode, and with that it might cost more to constantly update the visibility, rather than letting graphics hardware deal with it.

As always, it depends.

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!