Archived

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

...As far as the eye can see

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

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
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 this post


Link to post
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

Share this post


Link to post
Share on other sites