Tech Discussion: Engine switch to Unigine or...?


With default Unity you get floating point precision issues as soon as 3000 units from the origin of the world. That's where the Starbase Build Site is located when using one meter per unit. Especially physics started to glitch in my case, which was really annoying because I want to do a lot with physics. So sooner or later I needed a solution, especially if we want to go to space later on anyway. Why not look for one sooner then?

How to do deal with floating point precision?

AFAIK, the three main approaches to deal with this issue are shifting origin of world by teleporting everything all the time (the Kerbal way), reducing the scale of everything or going to 64 bit. I haven't done much research on this though. So please tell me, if there are other and better approaches.

  • Teleporting might be difficult as I use articulation bodies for a lot of stuff and they are not easy to teleport. It also has other difficulties when you deal with particles and so.
  • Reducing scale of everything now would be a lot of work and all kinds of problems might come with it. I can start over with a 64 bit engine right away as well in this case.
  • 64 bit, also called double precision, solves the issue by sacrificing a bit of performance. This should be fine for our application. (There are ways to use 64 bit in Unity, but I rather would use an engine which fully supports it.)

Why Unigine?

I read about it in the KSP 2 modding discord. Someone mentioned that the free version has 64 bit support now, so I checked it out and it looked pretty promising. Their focus is on flight and train simulators, so they care about realistic graphics and large worlds. Perfect! In comparison, Unity doesn't really have a focus. You can do everything with it, except large worlds. Initially I thought this wouldn't become a problem anytime soon as long as I focus on the build site, but I was wrong.

After looking at some videos and the documentation, I decided to give it a try and make a small demo, because you can only find out it if it's worth it, if you actually build something with it. I put in a basic terrain which is really easy with their system and you can get super high fidelity as well, including nice water and sky. Then I implemented the SPMT to transport stuff as this touches a lot of areas, physics wise, that are important, also the floating point precision issues when you drive around the build site. That also worked quite well. Then I wanted to add one new feature quickly. The rope system looked promising, so I went for the highbay crane. Unfortunately this one was a bit buggy and super hard to work with. In general, setting up and testing physics stuff is quite cumbersome compared to Unity. There was also a big issue which prompted me to halt development on the demo and to release it as is on Patreon a few days ago (see below). The issue has been fixed in the mean time (partially a noob mistake though).

You can see in this video everything that I got out of Unigine so far:

and this one which I showed earlier already:

The demo is available on Patreon, but you can not really do much more than what is shown in the videos. If you join Patreon, you do it mostly to support the development, help make a better version of StarbaseSim, get updates early and also help to provide a free version later on for everybody. The demo will also be freely available later on. But this depends on how I proceed.

What's the plan?

I am still not sure yet about Unigine. If I continue with it, I will just build out the demo and release frequent updates for it on Patreon and when it's good enough it will replace the Unity version also here on Itch. Then it will take a bit until there are updates to the free version again.

However, after pausing work on Unigine, I had a first closer look into Unreal Engine as they are pushing the large world stuff more now it seems with 64 bit support, terrain streaming and maybe even out of the box round earth support in the not too distant future. I will investigate  it deeper now with setting up some basic physics stuff, but probably not a full demo again. Even though I should also check out the UI side of things. But I want to get this investigation done a bit faster this time. I know what to look out for, so it should be easier and quicker to gauge, if it is really an option right now.

Why not Unreal Engine!?

Oh, I think you haven't read everything... :P

Why not 'xyz' open source engine?

I would love to, but haven't looked it into it at all. If you know one that is really good with large worlds and physics, please let me know. I might be willing to sacrifice other features for it.

Get Starbase Simulator

Download NowName your own price

Leave a comment

Log in with to leave a comment.