Jump to content
  • Advertisement
Sign in to follow this  
Frag_My_Mind

Visible Distances

This topic is 3785 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, I previously started this (very early this morning) in the beginners section, but have been advised to move it here. I'm currently working on a space combat game. To simplify some of my lod calculations, I'm trying to find the distance at which an object becomes invisible (ie: is less than 1 pixel wide or tall). All of my objects have a bounding sphere or radius r_obj. Supposing we have a horizontal field of view fov_x, and similarly a resolution res_x I had reasoned as follows: d_critical = r_obj / tan( fov_x / 2res_x ) where d_critical is the distance at which the object takes up 1 pixel. So far this is all very basic trig. And yet when I tested this method, I find that the critical distances are much larger than this predicts. Any ideas where I've gone wrong?

Share this post


Link to post
Share on other sites
Advertisement
Your formula looks correct. Can you post an example where it doesn't seem to work?

I think the problem might be that objects under 1 pixel are still visible, certainly if you are using good anti-aliasing.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!