Meshing Question How does Orbiter render planet meshes?

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
I'm wondering how the sim handles spherical planet meshes? When I'm close to Earth the edge of the planet looks very spherical with no visible bumps, however when I zoom out there comes a point where it noticeably switches to a low-poly sphere and stops rendering the atmosphere. Is it just using a high-poly sphere when I'm closer in or does it use something more complicated?

Thanks!
 

SolarLiner

It's necessary, TARS.
Addon Developer
Joined
Jun 14, 2010
Messages
1,847
Reaction score
2
Points
0
Location
404 ROAD NOT FOUND
From the Dev Notes of KSP's developers, I know they handle it with a Quad sphere (that is, a cube that has been smoothed out into a sphere), and then plays with the subdivision level (the closer to the camera, the more subdivisions, so the more polygons). The result is that you get detailed results up close, but still save thousands of polygons in the distance.
But that works best with terrain. And while the beta has it, the "regular" stable version is still plain sphere. And I believe it still works the same way: the closer, the more polygons.
I think for simplicity, you have a rectangle per surface tile on the planet mesh. And then the transforming is the same.

Though for Orbiter, such heavy optimizations are not needed. They are welcomed, sure but, 99% of the time the only meshes seen are the planet and your ship, which is at most 20k polys (Dansteph's Arrow Freighter is about that number of polygons). So even if the planet mesh is 100k polys at most, GPU doesn't suffer at all (especially if using D3D9 client, which in itself is a huge optimization improvement over D3D7), because mid-range GPUs are capable of showing 500k polys with a 60Hz refresh rate.
 

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
Thanks, I searched but didn't find that!
 
Top