Universe Sandbox

Universe Sandbox => Universe Sandbox ² | Discussion => Topic started by: Greenleaf on February 28, 2015, 06:23:24 PM

Title: Something new, fast and exciting
Post by: Greenleaf on February 28, 2015, 06:23:24 PM
Physics is being rewritten with focus on performance.
Currently a c# cpu implementation is outperforming the best opencl gpu from before.
Should probably have shown a clip of this simulation on cpu in the current public alpha. It is pretty simple really... it is essentially a screenshot of a locked up UI.

http://youtu.be/pxh5FUmRQyU
Title: Re: Something new, fast and exciting
Post by: Greenleaf on March 06, 2015, 01:24:58 PM
Judging by the lack of reactions in here, I should perhaps make the point of this change more explicitly clear.


The nbody physics, in this version, is a lot faster than before. You can either have many more objects in the scene or you can have the same number of objects while having much faster simulation speed.


Seeing a pure managed cpu implementation with more than 50 thousand ring particles and one planet and 10 moons run at the framerate shown in the video is an extreme improvement. I dare anyone to try it with the current cpu implementation ;-)


As it is, this outperforms the current opencl implementation on beefy graphics cards as well.
Add to this that a new native cpu version is about 4 times faster yet, and that a new gpu version is also coming along...


In short: physics have grown organically in little steps and had grown into a less than optimal form. It is now essentially reshaped from scratch (keeping the recent collision changes though) and shows a huge performance improvement. Hopefully the required changes to the rest of the project can be completed soon, and it can be part of the next alpha. Perhaps it will take a bit longer. We will see.
Title: Re: Something new, fast and exciting
Post by: Cryo on March 06, 2015, 02:43:14 PM
Judging by the lack of reactions in here, I should perhaps make the point of this change more explicitly clear.


The nbody physics, in this version, is a lot faster than before. You can either have many more objects in the scene or you can have the same number of objects while having much faster simulation speed.


Seeing a pure managed cpu implementation with more than 50 thousand ring particles and one planet and 10 moons run at the framerate shown in the video is an extreme improvement. I dare anyone to try it with the current cpu implementation ;-)


As it is, this outperforms the current opencl implementation on beefy graphics cards as well.
Add to this that a new native cpu version is about 4 times faster yet, and that a new gpu version is also coming along...


In short: physics have grown organically in little steps and had grown into a less than optimal form. It is now essentially reshaped from scratch (keeping the recent collision changes though) and shows a huge performance improvement. Hopefully the required changes to the rest of the project can be completed soon, and it can be part of the next alpha. Perhaps it will take a bit longer. We will see.
To my glowing red level of stupidity I dared and i completely wrecked my computer and had to restart it manually, there's not a single word that i know of that can really describe my enthusiasm at the amount of progress Giant army is making
Title: Re: Something new, fast and exciting
Post by: shadyJ on March 06, 2015, 05:18:10 PM
This looks awesome Greenleaf! One question, will it do away with the need of some systems to have to download the OpenCL drivers to get US2 to function? I had to get the OpenCL drivers for my system.
Title: Re: Something new, fast and exciting
Post by: Greenleaf on March 07, 2015, 02:29:22 AM
The openCL version will still be relevant, but less so, when cpu performance is improved.
Title: Re: Something new, fast and exciting
Post by: raxo2222 on March 07, 2015, 06:26:32 AM
Hmm so it can run very fast now!

How many years per second can pass in stock simulation of solar system without planets falling off now in this version?

What computers you are using?
Mine is Intel Core i3-3220 @3.3 GHz CPU, 4 GB of DDR 3 ram and GeForce GTX 550 Ti

I got 27 points in latest performance test in your sim.
I have Alpha 14.1 ;)

Title: Re: Something new, fast and exciting
Post by: im4space on March 07, 2015, 06:52:05 AM
Alpha 14 was a big speedup. So I can hardly wait for more speed.
Title: Re: Something new, fast and exciting
Post by: Bla on March 10, 2015, 04:43:10 AM
Looks great, it's always nice to have the possibility of more impressive galaxy collissions without having to get a new computer. :P