#### Archived

This topic is now archived and is closed to further replies.

# ...As far as the eye can see

This topic is 5980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am writing my first flight simulator using opengl which is a new language to me. The problem I am running into right now is how to get the "ground" to reach the horizon no matter how high the "airplane" goes up. Right now I am using simple triangle strips to create the ground below, but the higher up the view is, the more it looks like you are about to fall of the edge of the "earth". Any tips on how to achieve convincing ground? Or do you guys need more info? I not sure i explained my problem very well. Thanx in advance.

##### Share on other sites
You can draw a quad in screenspace for this. Determine the screen coordinates of the horizon, set your worldview matrix to identity, set up an orthographic projection. Then, use glVertex4f to draw the quad (yes: you need all 4 components, including w, to get perspective correct texturing).

##### Share on other sites
what if my "ground" is continuouly being drawn in real time?

##### Share on other sites
Yes, so? Doing this transform yourself (only 4 vertices) can be done several hundred thousand, if not several million times a second.

##### Share on other sites
If your ground is pretty big, and you could see it if you were that high, then you probably want to increase your far clipping plane. But the ground is going to have to be big enough to see far away.

##### Share on other sites
the earth is round
at sea level we can see about 60km (i think)
at 10km we see about 200km (i think)
what resolution is your height data ie how far apart are the height samples 1 meter 10 meters 100 meters?

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
quote:
Original post by zedzeek
at sea level we can see about 60km (i think)
at 10km we see about 200km (i think)

I believe its substantially less than that, just due to curvature of the earth, and not atmospheric attenuation, weather, occlusion, etc.

Try here.
just gotta figure out some nice level of detail drawing for your ground draw bigger triangles farther away and you can draw lots more .. makeing your ground larger add alittle atmospheric fog and there ya have it..

##### Share on other sites
>>I believe its substantially less than that, just due to curvature of the earth<<

cheers for that link, still find it hard to believe though
ie from napier (sealevel) u can see mahia penisula (about 80km away ill check later) i dont know how high that it but it cant be more than 2-300m perhaps refraction is occuring?

http://uk.geocities.com/sloppyturds/gotterdammerung.html

1. 1
Rutin
31
2. 2
3. 3
4. 4
5. 5

• 13
• 49
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632965
• Total Posts
3009546
• ### Who's Online (See full list)

There are no registered users currently online

×