Jump to content

Lets talk KSP and unity 5, based on other games that had made the conversion


Recommended Posts

Right now a lot of unity 4 based games like KSP, are converting over to Unity 5; and the ones that have done this already you can get a good idea of the performance enhancements. I just want to say I'm very hyped for the change. In some games (don't want to advertise) they have seen increases up to 400%!!! and are most likely just hype training it up.

But does anyone have some more concrete evidence or want to talk about their experience with playing games that have updated to unity 5?

that way we can have a better idea of how it'll affect KSP.

Link to comment
Share on other sites

All we can say for sure is what the devs are telling us. You can't really compare to other games, they are too different. KSP has more joint physics than any other game I've ever heard of. Most Unity 4 games didn't push the engine to it's limits like KSP does.

Link to comment
Share on other sites

Indeed. I'm excited too, but don't make any bets. KSP is different from the vast majority of games in that it's heavily physics-based and its physics objects are collections of parts attached to each other and constantly interacting (which makes it hard to multithread).

Performance enhancements are very likely, but 400% would be a miracle.

Link to comment
Share on other sites

I read somewhere one of the devs said to expect around a 10-50% performance boost (sorry I don't have a source)

Any idea what this would mean in game play terms? Would a frame rate of 12 increase 13 to 18? Where before you could fly a 400 part craft, would that mean you could fly one of 440-600 parts? Or, is this not how a performance increase is measured.

Link to comment
Share on other sites

Any idea what this would mean in game play terms? Would a frame rate of 12 increase 13 to 18? Where before you could fly a 400 part craft, would that mean you could fly one of 440-600 parts? Or, is this not how a performance increase is measured.

My guess is that it would depend on your cpu and your ship. More cores give higher increase. Static load on ships under trust might not improve so much, however multiple ships together would run in different treads and might not have much performance impact unlike today.

Link to comment
Share on other sites

If there's a chance to let the joints and thermal system run on different cores, speed increase will be even more profound.

We also need a change in how heat is calculated in general I think. Heat alone causes extreme frame issues for me even on craft in orbit - I assume it to be related to the heat because of all the gauges which do sometims just not disapear. Since they are working on it (I think Roverdude?) I'm really hoping for performance improvements on that department aswell. Maybe it's just a bug for me I don#t really know.

Another thing I am curious about is can we actually increase the physics calculation distance even more with the multicore support? Reusing boosters and don't having to care about when to drop them would be great! However, this would also require to add some sort of ingame logics so parachutes could for example open at certain speeds autonomously. I'd love that so much!

Edited by KerbalEssences
Link to comment
Share on other sites

My prediction has been 20-50% boost. I've read that the new PhysX brings a 20% improvement for joint performance.

As for what that translates to, well I'll take the upper end. If you currently get 20 fps with a 200 part ship, that means you will get 30 fps with a 200 part ship. However it doesn't mean you'll get 20 fps with a 300 part ship, because frametimes in KSP scale more than linearly with part count. It might be quadratic, cubic, or some other power, it might even be exponential.

The end result is that even a good boost in game performance by normal standards won't actually increase the tolerable part count that much.

Link to comment
Share on other sites

I'll be happy enough if the quarter-second to one second pauses (caused by the garbage collector, I think) go away. But yeah, if your "pain threshold" is now 200 parts, it might go up all the way to 210 parts if we're lucky.

Link to comment
Share on other sites

and the rag doll thing has to go. And kerbal so have to not slide when in a closed compartment. And they have to not glitch out of craft when walking back.

- - - Updated - - -

My prediction has been 20-50% boost. I've read that the new PhysX brings a 20% improvement for joint performance.

As for what that translates to, well I'll take the upper end. If you currently get 20 fps with a 200 part ship, that means you will get 30 fps with a 200 part ship. However it doesn't mean you'll get 20 fps with a 300 part ship, because frametimes in KSP scale more than linearly with part count. It might be quadratic, cubic, or some other power, it might even be exponential.

The end result is that even a good boost in game performance by normal standards won't actually increase the tolerable part count that much.

waa I am sad now;.;;.;;.;;.;;.;

Link to comment
Share on other sites

I like to bring these tests up when I see a physx performance thread:

http://physxinfo.com/news/11327/multithreaded-performance-scaling-in-physx-sdk/

Test 5 is most like what we would have in KSP. There are huge performance boosts just from having the new version of Physx, which is further enhanced by multithreading. Of course, tests like this are usually designed to show off some very specific instances of performance boosts, so I doubt that we'll ever see anything quite that big.

Link to comment
Share on other sites

My prediction has been 20-50% boost. I've read that the new PhysX brings a 20% improvement for joint performance.

The microbenchmark for non-threaded connected rigidbody physics simulations shows about a 50% improvement in most cases, seldom more, and sometimes less.

However it doesn't mean you'll get 20 fps with a 300 part ship, because frametimes in KSP scale more than linearly with part count. It might be quadratic, cubic, or some other power, it might even be exponential.

As I understand the biggest problem with part count scaling (resources), the algorithm used is o(n^2), so a 50% increase in parts would result in 1.5*1.5 (or 2.25) times as much computation required. A doubling in parts would result in four times as much computation required, resulting in a quarter of the display rate if you were computationally bound to begin with, looking at just the resource utilization code.

On the more optimistic side, the most KSP-like Unity 5 game I'm aware of, Besiege (think KSP but making medieval siege machines) had some rather significant performance improvements in their Unity 5 update which just came out Friday. Now, Besiege doesn't have the resource tracking issues that KSP does, but they are seeing 3x simulation framerate improvements even in times when multithreading shouldn't have been a big win (still a minor improvement from multithreading because Besiege almost never has a single collection of parts loaded, since there has to be a target). Then again, the demo the devs showed with that much improvement could have come from the improved collision detection, which I don't think is that big a deal in KSP.

Basically, there's a lot of things changing under the hood which could improve same-craft performance in switching to Unity 5, but without having code profiling statistics for the current version of KSP, it's hard to predict how much these improvements will improve the overall end result. Having one part of the code running 4 times faster doesn't help much if that code is only running 5% of the time and the other 95% of the time it's running code that hasn't improved. Having one part of the code running 50% faster doesn't mean an overall 50% increase in speed unless either some other code has been improved even more or ALL the code is running 50% faster.

Personally, I don't think we're going to see a huge increase in usable part counts on crafts until the scaling of the resource allocation code is improved, either by caching the results (which the devs have discussed) or by finding a "better" algorithm. Or better yet, both, because an order(n^2) algorithm is still an order(n^2) algorithm after caching is added, it's just a much faster order(n^2) algorithm. Then again, arguing worst-case conditions may not be the best approach when discussing KSP since it's possible for something that behaves "better" in an absolute worst case scenario to be slower during any conditions where the game would actually be playable.

With all that said, my prediction matches cantab's prediction. I don't think it's impossible that the actual results will be outside that range (in either direction), just unlikely. If I had to do an over/under on that prediction, I'd probably hem and haw and never give an actual over/under, since the pessimist in me thinks it's more likely to be under 20% than over 50%, but the kid in me looks at the Besiege improvement and goes "ZOOMMMM!!"

Link to comment
Share on other sites

I'm curious, would it be worth it to upgrade one's video card to improve performance in KSP 1.1? PhysX is a Nvidia technology, which apparently will offload calculations to the gfx card which I am all about. I'm not sure how the Unity/KSP integration will handle this though, most talk is about multi-core cpu/Win 64 support.

Link to comment
Share on other sites

I'm curious, would it be worth it to upgrade one's video card to improve performance in KSP 1.1? PhysX is a Nvidia technology, which apparently will offload calculations to the gfx card which I am all about. I'm not sure how the Unity/KSP integration will handle this though, most talk is about multi-core cpu/Win 64 support.

That would depend, What is your CPU speed? If its low you would gain more from a CPU upgrade as KSP uses the CPU more than the GPU.

- Arrow

Link to comment
Share on other sites

That would depend, What is your CPU speed? If its low you would gain more from a CPU upgrade as KSP uses the CPU more than the GPU.

- Arrow

Ah that's too bad, but I imagine it's easier to support cpu only because AMD/ATI don't use CUDA. I wonder if there is an experimental flag that can be turned on somewhere...

Link to comment
Share on other sites

I'm curious, would it be worth it to upgrade one's video card to improve performance in KSP 1.1? PhysX is a Nvidia technology, which apparently will offload calculations to the gfx card which I am all about. I'm not sure how the Unity/KSP integration will handle this though, most talk is about multi-core cpu/Win 64 support.

Can't speak for Unity 5, but KSP on U4 does not use your GPU for Physx calculations. I don't know if this is a U4 limitation, nor have I seen anything to suggest that this is going to change in U5.

There was an AMA about a year ago, where Max said they wouldn't be doing Physx on GPU because it would alienate AMD users. (Which is a terrible excuse in my opinion, but I'm not a dev. I guess they want everyone to have the same experience).

Link to comment
Share on other sites

Can't speak for Unity 5, but KSP on U4 does not use your GPU for Physx calculations. I don't know if this is a U4 limitation, nor have I seen anything to suggest that this is going to change in U5.

There was an AMA about a year ago, where Max said they wouldn't be doing Physx on GPU because it would alienate AMD users. (Which is a terrible excuse in my opinion, but I'm not a dev. I guess they want everyone to have the same experience).

No. Unity 5 does not have that support yet. Even if it did that is only for a select few capabilities, cloth and steam/smoke. So launches might look really good, and flags could 'wave' on atmospheric bodies. There is also some debris rendering.

shows examples of what it did in the batman games, largely just extra visuals. Most of this can be done without PhysX on the GPU too, Rocksteady just decided not to. Edited by Alshain
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...