4

If I want to model a large environment, how can I solve the problem of earth curvature and horizon?

I use an environment map for the sky, but for the ground what can I do?

Do I have to model the ground with a big plane, disk or a spherical cap?

Is there a general procedure to solve this problem in computer graphics?

Nero
  • 1,320
  • 3
  • 15
  • 31
Valerio
  • 433
  • 2
  • 5
  • 3
    Following from your comment on the answer, could you clarify whether you want to know about a theoretical approach, how to achieve this programmatically or how to achieve this in modelling software? This Stack Exchange is specifically about computer graphics programming and theory. If your question is specifically about how to achieve the effect in modelling software, I'm afraid your question is off topic. It makes a good question as a general CG problem though. – Martin Ender Nov 09 '15 at 09:14

1 Answers1

6

Having the horizon fall off is simply dropping the ground in the distance down somewhat.

A point $x$ km away if you follow the curve of the planet will be $r-r\cdot \cos \frac{x}{r}$ down and $r\cdot \sin \frac{x}{r}$ out horizontally where $r$ is the radius of the planet you are modeling (~6.3k km for earth). In the vertex shader you can account for that before you apply the view and projection matrix.

ratchet freak
  • 5,950
  • 16
  • 28