Ultimate space simulation software

 
User avatar
longname
Pioneer
Pioneer
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

18 Jan 2020 06:32

Is anyone willing to make a program that can take Universe Sandbox 2 simulation files, read the celestial bodies' properties inside, and convert it into code that Space Engine can read?
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
Salvo
Pioneer
Pioneer
Posts: 467
Joined: 03 Nov 2016 07:19
Location: Veneto, Italy
Contact:

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

20 Jan 2020 04:18

It's hard because coordinates are very different, in US2 there is a 0:0 point in the middle and everything has a position, in SE objects have declination/right ascension/distance etc., you'll need to input those values before the conversion.
If I could see a US2 simulation file and study it I could tell if it's possible or not  :lol:
The universe is not required to be in perfect harmony with human ambition.

CPU: Intel Core i7 14700KF GPU: NVidia RTX 4070
RAM: 32 GBs
 
User avatar
SFGameZ64
Astronaut
Astronaut
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

20 Jan 2020 09:43

Correct me if I'm wrong, but you would also have to calculate where planets would be based on their velocity and a number of other variables. Because US2 is a simulation, while SE is an emulation, things are stored much differently. Planets don't have a defined distance from their star, like SE planets have a specific semi-major axis, because in US2, that number can change at any time. 

I'm sure someone much smarter than I could actually calculate that, otherwise I would give it a try, but I'm not a physics major. 

Edit: You've inspired me to buy US2. For some reason unknown to me, I just never thought about getting it. The last time I looked at development must have been years ago, but it looks incredible now. I'll look into converting files and if I can figure it out, I may be able to whip up a small console app that creates files. May take a bit of time though  :)
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
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

25 Jan 2020 07:41

It's hard because coordinates are very different, in US2 there is a 0:0 point in the middle and everything has a position, in SE objects have declination/right ascension/distance etc., you'll need to input those values before the conversion.
If I could see a US2 simulation file and study it I could tell if it's possible or not  :lol:
Why not just make the barycenter of the system the simulation origin?
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
longname
Pioneer
Pioneer
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

25 Jan 2020 07:45

because in US2, that number can change at any time.
I don't see why pulling the orbital characteristics straight from US2 could do much harm.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
longname
Pioneer
Pioneer
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

25 Jan 2020 07:49

If I could see a US2 simulation file and study it I could tell if it's possible or not 
Edit: You've inspired me to buy US2. For some reason unknown to me, I just never thought about getting it. The last time I looked at development must have been years ago, but it looks incredible now. I'll look into converting files and if I can figure it out, I may be able to whip up a small console app that creates files. May take a bit of time though 
I appreciate your enthusiasm.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SFGameZ64
Astronaut
Astronaut
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

25 Jan 2020 18:03

I don't see why pulling the orbital characteristics straight from US2 could do much harm.
So I've been playing around with US2 for a couple of days now and I think it is technically possible to convert a file to SE. But let me explain why this is a very difficult job. 

If US2 stored orbital information in the same way the SE does, it wouldn't be a problem. When you open up a .sc file for SE, you can scroll down until you find the semimajor axis and inclination and everything, erase them, and then type a new number and you're good to go. But US2 doesn't have any of that, because those values are constantly being calculated and re-calculated in-game while the simulation is running. So you can't make a program that just pulls the information from a US2 file to re-format it for SE, because the information is stored so differently. For example, here are just a few lines from a US2 file for a planet:
"Position":"17046981212.884;12272041.2089375;-31153573670.1187",
"Velocity":"58613.9243973804;-10.2405686752699;25996.5155932321",
The position is the coordinates in the 3d grid, while velocity is, well, obviously how fast it's going in each direction. These numbers are used to calculate all movements in US2, not just orbits, so they must be stored this way. Converting that into orbital mechanics that SE can read is... not something I'm going to school for. 

But still possible, technically. Not by me though. And even though it is technically possible, this would still only be a snapshot of the system at the time the file was exported. If your simulation had a planet on a collision course with another, or some planets with no orbits at all, there would be no way for SE to handle those kinds of movements and things would look weird after it was converted. 

And all of this comes back to something I said earlier: that US2 is a simulation, while SE is an emulation. The data behind it all just isn't the same. 

Anyway, sorry to break the news to you. If I could do it, I would, but I don't have the physics knowledge to take a vector of coordinates and velocities to translate into functioning orbital mechanics :(
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881
 
User avatar
SpacePioneer
Space Tourist
Space Tourist
Posts: 25
Joined: 12 May 2017 17:57
Contact:

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

27 Jan 2020 12:35

I'd really like to see this come to fruition somehow. Seeing the planets I make in US2 in the context of a full universe like SE would be amazing. I actually did this at one point, but there was no automation involved...just human elbow grease, haha.

I figured such a problem as this formatting difference would be why a converter would be difficult. But maybe if we "bug" the US2 team enough we could get the option to export the orbital parameters as they are seen in-game in relation to the taken barycenter of all objects in the simulation that we could then have converted and put into the SE universe with whatever location and rotation we wanted and whatnot, essentially as a normal .sc file we could use/modify like any other.
Search the skies for a new home
As the old one burns
In ashen skies and firey night
The void my only savior
I, am the lone, space pioneer.

CPU: AMD Ryze Threadripper 2970WX, GPU: NVIDIA GeForce RTX 2080 Ti, 64 GB RAM, 4 Drives (2 1TB SSDs, 2 4TB HDDs)
 
User avatar
SpaceEngineer
Author of SpaceEngine
Author of SpaceEngine
Posts: 1125
Joined: 17 May 2016 22:16
Location: Saint-Petersburg
Contact:

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

27 Jan 2020 13:52

Looks like US2 just stores the "state vectors" of each body. This makes sense, because US2 is a physics simulator. SE also have physics simulation, used for ships, thus have internal functions to convert state vector to orbital elements and back. I can implement a new way to define objects in catalog, using the state vector. If you figure out units used in US2, this will help. Position is probably meters, and velocity in m/s?
 
User avatar
SFGameZ64
Astronaut
Astronaut
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

27 Jan 2020 18:27

Looks like US2 just stores the "state vectors" of each body. This makes sense, because US2 is a physics simulator. SE also have physics simulation, used for ships, thus have internal functions to convert state vector to orbital elements and back. I can implement a new way to define objects in catalog, using the state vector. If you figure out units used in US2, this will help. Position is probably meters, and velocity in m/s?
If SE could do that work internally, that could be the perfect solution. Position is meters and velocity is m/s, as far as I can tell. But I'm still new to US2 and haven't had time to test the file system beyond just looking at. 

I wonder, would system barycenters still be a problem? Position is relative to the center of the current simulation in US2, not to the nearest star/planet. But you know more about your engine than I do. 

If you could have SE do all of that work internally, I'm pretty sure I could write a simple console app that cuts everything useless out of a US2 file and converts it into useful information for a .sc file. 
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
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

28 Jan 2020 12:15

A problem: binary planets work in US2 because the planets pull on each other instead of orbiting a barycenter. SE does the latter because it doesn't simulate gravity between planets. Planets would fly apart unless you could find a way to get the planets to orbit a manually inserted barycenter (select multiple bodies > create barycenter) instead of the total center of mass of everything in the sim.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
A-L-E-X
Galaxy Architect
Galaxy Architect
Posts: 3498
Joined: 06 Mar 2017 20:19

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

28 Jan 2020 17:24

SE is far more complete than US2.... I tried US2 and it seems boring in comparison to SE.
 
User avatar
longname
Pioneer
Pioneer
Topic Author
Posts: 381
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 Space Engine File Conversion (Suggestion)

29 Jan 2020 14:12

SE is far more complete than US2.... I tried US2 and it seems boring in comparison to SE.
Boring isn't a factor when it comes to how complete a game is.
[dah<500,26>dah<180,14>dah<180,21>dah<500,19>dah<180,26>dah<500,21>]
 
User avatar
SpacePioneer
Space Tourist
Space Tourist
Posts: 25
Joined: 12 May 2017 17:57
Contact:

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

30 Jan 2020 08:12

SE is far more complete than US2.... I tried US2 and it seems boring in comparison to SE.
Boring isn't a factor when it comes to how complete a game is.
Agreed. What one considers boring another may not and so really can't be considered for that.
I have over 2,000 hours in US2, so obviously I don't think it's boring.
Search the skies for a new home
As the old one burns
In ashen skies and firey night
The void my only savior
I, am the lone, space pioneer.

CPU: AMD Ryze Threadripper 2970WX, GPU: NVIDIA GeForce RTX 2080 Ti, 64 GB RAM, 4 Drives (2 1TB SSDs, 2 4TB HDDs)
 
User avatar
SFGameZ64
Astronaut
Astronaut
Posts: 48
Joined: 24 May 2017 21:18
Location: South USA

Universe Sandbox 2 to Space Engine File Conversion (Suggestion)

05 Feb 2020 20:01

Between yesterday and today, I laid the groundwork for code that will be useful when/if that update is ever released. If you're interested, you can check it out here: https://github.com/SethFusion/US2-to-SE-Converter/releases

The output it creates isn't actually useful to Space Engine yet, because that velocity/position vector problem hasn't been solved. If it ever is solved, this program only needs a few formatting changes to work. If it never is, then oh well. Not too much time wasted. Really you could totally still use this to cut out some of the manual work, but you would have to go through the file and add orbits and parent bodies for every object. So I hope it helps someone. 

Also, the US2 simulation file is very large and confusing, so there might be some weird special cases where the program I wrote just won't pick things up. If anyone has any tips or tricks on using the file system for US2, feel free to send them my way. There aren't any tutorials or manuals online for US2 modding like there are for SE. 
Better known as Seth Fusion
A little generator I made - http://forum.spaceengine.org/viewtopic.php?f=3&p=27881#p27881

Who is online

Users browsing this forum: No registered users and 0 guests