Ultimate space simulation software

 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox to SE File Converter

23 Feb 2020 10:49

US2 to SE Converter 1.2.zip
(509.19 KiB) Downloaded 221 times
8/1/22
So I kind of forgot about this old project for a while and realized I never did post that update. That's my bad, lol. Life got busy, what can I say. But after a comment on my YouTube video reminded me people might still find this useful, I decided better late than never. The 1.2 version of the converter is leaps and bounds better than the last public version. It turns out that my first attempt at the equations got some things embarrassingly wrong. I'll credit that to my inexperience. Whoops.

That being said, the perfectionist in me is still left wishing the final product was better. There just isn't a 1-1 translation from US to SE. And I haven't tested it a whole lot recently. I just wanted to get this posted. Also, I didn't work on this alone. The very helpful Roshex wrote basically all of the code that "classifies" plants and stars (and then some). It works much better than mine did, and it looks like magic to my eyes, so I left it the way it was. And I'm very grateful for the work he volunteered to put in.

Anyways, this is probably the last time I'll update this. It isn't getting much better than it is (unless someone fixes obliquity, then hit me up). I wanted to add some QoL things, like planet colors, but SE doesn't play nice with colors anymore. Feel free to take a look at the GitHub page (https://github.com/SethFusion/US2-to-SE-Converter), and if you see something you think could be better, you have my full permission to fork and post your changes. Universe Sandbox's file structure changes almost every time they update, so it will likely be necessary for someone in the community to update for compatibility. The groundwork is laid though. 

Glad I could contribute to the community, and I hope a few people find this useful. 

Past Updates:
► Show Spoiler

There are instructions in the readme file when you download it, but a video format can be found here: 


DISCLAIMER:
Remember that a file from US2 is just an instance of the system at the time of export, so the values converted will NEVER be 100% accurate. Especially if you have a system that is broken at the time of export (like one planet crashing into another), this converter will give you extremely weird results. 

DISCLAIMER #2
Binary orbits DO NOT work. At least, not completely. The program will generally calculate the semi-major axis (mostly) correctly, but all other values are useless. If you have binary orbits in US2, SE will render them after conversion, but they will look wrong. You will have to open the .sc file and manually edit those values if you want them to look correct. I wish there was something I could do about it, but I don't know if the problem is with the formulas or if binary orbits are too complex to calculate with just an instance of information. And I'm not a physics major, by any stretch of the word, so if anyone has suggestions please feel free to let me know. 

As always, if something goes wrong, or if you have problems other than weird binary orbits, please tell me about it and we will fix the problem together. I'm sure you will have issues, but for the general case system, hopefully, there will not be any problems. 

And if you would like to make fun of my code, you can find it on GitHub:
https://github.com/SethFusion/US2-to-SE-Converter

Old files:
► Show Spoiler
Last edited by SFGameZ64 on 01 Aug 2022 16:46, edited 3 times in total.
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
Theloic971
Astronaut
Astronaut
Posts: 46
Joined: 05 Sep 2017 11:57
Contact:

Universe Sandbox 2 to SE File Converter NEW

23 Feb 2020 12:12

This is awesome ! Great job !
Do you want to archive your discoveries in Space Engine ? Use my new website : https://se-archive-project.net/
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

24 Feb 2020 16:13

This is amazing! How'd you pull it off?
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to SE File Converter NEW

24 Feb 2020 18:28

This is awesome ! Great job !
This is amazing! How'd you pull it off?
Thank you. Basically I just got restless and learned the math behind it. It still isn't perfect but I didn't want to wait for SE to update, so I did what I could. 
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
Salvo
Pioneer
Pioneer
Posts: 451
Joined: 03 Nov 2016 07:19
Location: Veneto, Italy
Contact:

Universe Sandbox 2 to SE File Converter NEW

26 Feb 2020 07:39

Good job mate!
You have my respect.
The universe is not required to be in perfect harmony with human ambition.

CPU: Intel Core i7 4770 GPU: Sapphire Radeon RX 570 RAM: 8 GBs
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

26 Feb 2020 14:49

I like how you actually put the file you want converting into a folder and press a button and it comes out of the other end. Very skeuomorphic, lol. A bit of advice, binary orbits break because the orbit is calculated relative to the star and not the barycenter. The orbits wobble to make the planets go up and down so they go around each other, but the orbits freeze in SE as they are.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

26 Feb 2020 15:01

Tried running it and it's missing vcruntime140d.dll, msvcp140d.dll, vcruntime140_1d.dll and ucrtbased.dll. Why am I getting these problems?
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to SE File Converter NEW

26 Feb 2020 18:02

Tried running it and it's missing vcruntime140d.dll, msvcp140d.dll, vcruntime140_1d.dll and ucrtbased.dll. Why am I getting these problems?
I'm not sure. It doesn't use any fancy headers that I haven't used before, so I'll have to look into it. I hope not everyone is having that problem. What kind of computer do you have? Windows 10, or something else?"

Also, for the binary orbits, as far as I know technically yes you are correct. But that is only for simulations. Theoretically, the barycenter holds the velocity that takes the system around the star, but the planets relative to each other must calculate their orbit relative to the barycenter. For instance, open up SE and look at the velocity of Earth, the Moon, and the Earth-Moon barycenter. The barycenter is moving quite fast, while the Earth only has a velocity ~12m/s around the Moon. Technically it is moving much faster than that, around the star, but because its own system center is the barycenter, we don't have to worry about that. 

Unless I'm wrong about that, then please let me know. Again, sorry you are having issues, I'll try to fix it soon. 
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to SE File Converter NEW

27 Feb 2020 13:09

Tried running it and it's missing vcruntime140d.dll, msvcp140d.dll, vcruntime140_1d.dll and ucrtbased.dll. Why am I getting these problems?
An update from Visual Studio must have changed some settings and the .exe wasn't compiled with the proper .dll files included. I recompiled and hopefully have fixed the problem. The file size is 10x larger, but still under 1 megabyte. Please download the new file above and tell me if it works for you. If it does not, there may still be problems I need to address. 
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

27 Feb 2020 14:55

Tried running it and it's missing vcruntime140d.dll, msvcp140d.dll, vcruntime140_1d.dll and ucrtbased.dll. Why am I getting these problems?
An update from Visual Studio must have changed some settings and the .exe wasn't compiled with the proper .dll files included. I recompiled and hopefully have fixed the problem. The file size is 10x larger, but still under 1 megabyte. Please download the new file above and tell me if it works for you. If it does not, there may still be problems I need to address. 
It's worked, thank you!
Quality of life suggestion, automatically create a catalogs > stars/planets folder in the output folder
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

27 Feb 2020 15:06

It keeps throwing things out of orbit. With my first test, the orbits were shuffled slightly, but in my second test, a moon that was in a stable orbit around a planet had been flung off.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to SE File Converter NEW

27 Feb 2020 15:25

It keeps throwing things out of orbit. With my first test, the orbits were shuffled slightly, but in my second test, a moon that was in a stable orbit around a planet had been flung off.
Is there any way you can give me the .simulation file you are converting so I can check it out?
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

28 Feb 2020 09:35

It keeps throwing things out of orbit. With my first test, the orbits were shuffled slightly, but in my second test, a moon that was in a stable orbit around a planet had been flung off.
Is there any way you can give me the .simulation file you are converting so I can check it out?
Holl around Etern was stirred up a bit, and the planet Nomad inside the Viet and Nistrader system I was OK with being messed up, but the moon Nomad around Nomai was completely flung around. It's supposed to be in a perfectly stable orbit around Nomad. Plus, Viet and Nistrader don't work properly. One of the systems can't go around the barycenter faster than the other. The moon Retror is supposed to go opposite of Prog, hence the name, and one of the habitable moons was boiled.
Attachments
simulation.rar
Etern System
(871.93 KiB) Downloaded 512 times
simulation.rar
Viet and Nistrader System
(875.43 KiB) Downloaded 494 times
Etern and Viet.pak
SE Catalog - both systems contained inside file.
(5.68 KiB) Downloaded 471 times
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SFGameZ64
Astronaut
Astronaut
Topic Author
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to SE File Converter NEW

28 Feb 2020 13:34

Okay, I'm going to try to address these problems one by one. I'll say, first of all, you have very... complex... systems. I'm honestly impressed at the stability of some of them  :lol:
Holl around Etern was stirred up a bit, and the planet Nomad inside the Viet and Nistrader system I was OK with being messed up,
Remember that the converter is only working with what the system looks like at the time you export the simulation file. So large orbital changes over time will be totally ignored. Even small changes over the course of hours can't be considered, so things will never look 100% perfect. 
but the moon Nomad around Nomai was completely flung around.
This was a weird one. I looked into it and it seems like a logical error on my part. In the simulation file, Nomai is considered a planet, which caused it to go through the planet section of code when it should have gone through the moon section. That shouldn't technically be a problem, but it just so happens that they were orbiting a binary system, which broke the logic of my code. I'll look into fixing that. 
One of the systems can't go around the barycenter faster than the other.
I said up above that binary orbits aren't calculated properly, including orbital period. Almost all of the orbital values for binary objects are useless, and until I find a fix, you'll have to fix that data yourself. 
The moon Retror is supposed to go opposite of Prog
After a quick look, I don't immediately know what the problem here is. Space Engine is having a hard time reading Retror as a child of the system, even though it looks fine in the file. I suspect the binary object that was created between terra Flora and Prog is to blame, but I don't know why yet. 
and one of the habitable moons was boiled.
Unfortunately, SE calculates all temperatures for planets. I can't do anything about this one.

Midterms are this upcoming week and I'll be gone this weekend, so give me some time to look into the other issues. Thank you for bringing them to my attention though; complex systems and edge cases like yours I couldn't have tested on my own. Even if it doesn't work perfectly, I hope it cuts out 95% of the process for converting these things from scratch. 
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
longname
Pioneer
Pioneer
Posts: 380
Joined: 13 Apr 2017 07:20
Location: ∞/The Multiverse/The Universe/Local Cluster/The Milky Way/Orion Arm/Sol System/Earth-Moon/Earth/UK

Universe Sandbox 2 to SE File Converter NEW

28 Feb 2020 14:21

Remember that the converter is only working with what the system looks like at the time you export the simulation file. So large orbital changes over time will be totally ignored. Even small changes over the course of hours can't be considered, so things will never look 100% perfect. 
But the predicted orbits and trails are very stable and don't wobble.
Thanks for replying!
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]

Who is online

Users browsing this forum: Google [Bot] and 3 guests