Orbit lines clipped correctly

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
alexibu
Posts: 17
Joined: 17.11.2003
With us: 20 years 11 months
Location: Bristol UK

Orbit lines clipped correctly

Post #1by alexibu » 10.12.2003, 16:43

Hi,
At the moment orbit lines are obscured by planets and are not rendered with a depth buffer. This means that you can never see the orbits of satelites of earth (for example) except where the orbit lines are next to and not infront or behind earth in the observers view. It also means that no matter how hard you try you can never see the orbit line going through the planet - which is conceptually bad.
I am considering doing it, and have a fair idea about OpenGL and celestia code but thought it would be wise to ask - since I am sure it has been thought about before.

How difficult would it be to fix this :?:
1. OpenGL doesn't support a depth buffer and clipping for lines. This would require making a polygonal tube orbit - the size of which would have to change depending on the view - difficult.
2. OpenGL lines can be made to support a depth buffer and clipping for lines but it requires changing the rendering code.
3. Some other logical problem that I have missed.

Thanks
Alex

HankR

Post #2by HankR » 10.12.2003, 17:54

Alex,

I believe the problem lies in how Celestia uses the depth buffer. Because of the large range of cosmic distances and the limited precision of the depth buffer, Celestia segments the depth buffer and uses the segments separately for rendering local groups of objects. This makes it difficult to apply depth buffering to global objects such as orbits.

- Hank


Return to “Development”