Unite 2013 - Building a new universe in Kerbal Space Program

Unity · 110K views · 2013 · 59:19

Open on YouTube

Game programming & enginesComputer graphics & renderingIndie game developmenttalk

Why Game Development Stack Exchange recommends it

Game Development Stack Exchange users link it when asked about floating point precision, huge worlds and large-scale space rendering in Unity, since it shows how KSP handles these problems.

Recommended by 4 people across 3 different months, 2015 to 2017.

What it is

A Unite 2013 conference talk by the Kerbal Space Program developers on how they built a full-scale space flight simulation in Unity. It covers the vast scales of a solar system, keeping the physics stable, and supporting player-built ships.

What people said

Recommends adsilcott · 2015-09 · Game Development Stack Exchange · on “How can I represent location in a massive world?”

You might be interested in this presentation on Kerbal Space Program, where they talk about a LOT of these issues. They use a floating origin point, double-precision types, and a number of other techniques: [this video]

Recommends MAnd · 2015-10 · Game Development Stack Exchange · on “Is a custom coordinate system possible in Unity”

If what you want is to bypass the floating inaccuracy caused by single point precision problem, for the sake of creating bigger environments for your game, then it depends on what you are willing to accept as a solution. Let's start by making this clear: it is impossible to alter the coordinate system at the inner core of Unity. So, you can't use double-precision inherently for coordinates. 1) Depending on how you need it, however, it is possible to have custom classes in double-precision that might be of help. Of course it sill converts back to float so Unity system can work with, which is not a solution, but in many cases it might be of help even if for implementing other solutions. By the

Recommends DMGregory · 2015-10 · Game Development Stack Exchange · on “Is a custom coordinate system possible in Unity”

I doubt that there's a way to change the coordinate system Unity uses internally for its transforms/physics/etc. Not without recompiling the engine source at least. But that may not be necessary to get both the precision and scales you need. Kerbal Space Program is made with Unity, and plays out over interplanetary scales. The developers have been great about sharing their process for dealing with these issues: [LINK] [LINK] ! [this video] The basic idea is that the player characters/vehicles are kept near the origin, so that Unity's physics system remains well-behaved for interactions between vehicle parts, characters, and terrain. Similarly, when the player zooms their camera around in the map,

Recommends Školstvo · 2015-12 · Game Development Stack Exchange · on “Why don't objects far away from the camera experience floating point issues?”

I'm fairly sure floating point rounding errors don't mean that an object will be absolutely rendered incorrectly when far away. It just means that the probability of the sun being exactly where it is supposed to be is smaller the farther away from the origin it is. However, you might not be able to notice if the sun is at the wrong place with an error of 10 km for instance. Since the sun jumping between 10 km is hardly noticeable from earth. It wouldn't even move a single pixel. You also have to take into account that Kerbal uses many cameras to render a single scene. Three, if I remember correctly. One for the cockpit or ship, one for the landscape, and one for celestial objects. These came

Cites House · 2015-07 · Game Development Stack Exchange · on “In a large space simulation, why is my sun light not reaching the planets?”

Apparently your simulation is too large. You need to think about ways to create the simulation on a smaller scale. Something similar to the way Kerbal Space Program does it [this video] . (They broke it up into a 1/6000 scale scene and a 1/1 scale scene mixed together).

Cites GR00G0 · 2017-11 · Game Development Stack Exchange · on “Large Mesh at a far distance”

So I am trying to do something like KSP, where I have a ground to orbit Level of Detail with the planets. And from their Building a new Universe Video [this video] I know they are using scaled space, and local space, where (as i assume) The whole planet is divided in smaller quads. This is all fine but from my understanding They are all still in the same unity scene and rendered( if they’re not invisible( isn’t that automatically decided by the cpu/gpu?)). But now to my question. Even if such a Quad just has 16x16 Vertices, it’s still up thousand if not millions of units away from the scene origin and you and the camera(I know there are two cameras for near and far) Wouldn’t this quad produce a l