# 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.

## 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 on other sites
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 on other sites
Exactly right! Thanks for the reply - as I said I wasn't very with it this morning.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013401
×