Jump to content

Did Directx12 make KSP faster?


gutza1

Recommended Posts

Has a new version of KSP, built on a new version of Unity, that knows anything about Directx12, been released while I wasn't looking?

(It was asked and speculated about a while ago, although I can only find a reddit link, off hand: https://www.reddit.com/r/KerbalSpaceProgram/comments/3f00gz/with_windows_10_and_directx12_around_the_corner/)

ninja'd - serves me right for trying to find the link.

Link to comment
Share on other sites

And to follow on Umlüx : all games needs to be (re)written for DX12 to take advantage of that speed improvement. Some future games may have multiple rendering mode that works in either DX11 or DX12 but right now none does.

Link to comment
Share on other sites

true, but the most important thing, the physics engine is still limited to one core iirc?

i wouldn't get me too excited. unity5 is more important for 64bit functionality and no memory limit.

You forgot native DX11 ( which handles CPU cores better than DX9 ) and better graphics with lower requirements. Moreover, DX12 can be really a game changer for KSP

Link to comment
Share on other sites

true, but the most important thing, the physics engine is still limited to one core iirc?

i wouldn't get me too excited. unity5 is more important for 64bit functionality and no memory limit.

Physics will no longer be limited to one core. However, one physics object can only run in one thread. Spacecraft are physics objects. So one single rocket will still run on one single core. The difference is that under Unity 5, other physics objects (discarded stages, the space station you are approaching to dock etc) get to be shunted away to other cores instead of all sitting on the same core. Additionally, there are claims that the physics engine itself is faster and more efficient.

Also, don't be so sure that DX12 will make a tangible difference. DX12 improves CPU overhead of handling large numbers of graphics objects on the screen at once ("draw calls"). KSP doesn't draw much on the screen at once. In fact, apart from the spacecraft, KSP doesn't draw much at all; the game is 99% empty space and flat surfaces with simple textures. The draw call bottleneck only manifests itself at very high numbers (>10,000 calls per second), and thus optimizing that may not benefit KSP in any measurable way.

Graphics bombs like ARK, those are the games that benefit from DX12 in a major way.

Link to comment
Share on other sites

Most of the time, complete rewrites are riddled with new bugs and it takes a while to get back to stable. As a programmer myself, I've ruined my fair share of apps from rewrites, and the worse was a DirectX app, I think from 7 to 8, don't remember. But the big issue is usually old legacy code that isn't commented, and you don't remember how that method worked or what all the parts did or required. This just leads to confusion and wasted time going over it all to try to add comments. Usually these old working parts are the hardest to rewrite, especially when they're part of the base core of the project. So for major rewrites, I'll wait and see what everyone else experiences first and stick with what works.

Link to comment
Share on other sites

Eh? Does ARK have nice graphics?

If you crank it up, Ark has very nice graphics, but some of the graphics parameters (notably ground scatter and sky quality) have pretty severe performance impacts and should be turned all the way down if you want to boost other things.

/offtopic

What DX12 will likely do for KSP once it can support it (meaning after U5 and after any necessary code changes are made) will be memory savings on textures. I expect that will be a big selling point. Currently OpenGL actually nets me more memory savings, but at the cost of destroying my FPS to intolerability. DX11 produces no known graphical artifacts and cuts my ram usage massively (YMMV).

Link to comment
Share on other sites

KSP has no scenes complex enough to get even lower-end graphic cards busy. If you compare KSP to games like Crysis 1 that was running on hardware from 2007 and already had way better graphics than KSP ever will have, you soon realize that the issue is not the graphic card. As far as I am aware the issue lies within the physics calculations, which are not done on the graphics core (like i.E. PhysX does it), but on the CPU, and are only calculated single-threaded, further slowing down things.

So even if KSP would fully support DX12 it is hardly going to change anything.

Link to comment
Share on other sites

The real question is: Will there be any real performance boost with this next update?

As they upgrade the engine to Unity 5 what can we expect? I've heard a lot of rumors. For one we will have native x64 support but that only really benefits Windows users. Still, now I can use my full 8GB of RAM without having to resort to witchcraft. Also from what I've heard Physx will be processed by the GPU instead of the CPU. Also I've heard that we'll get multi threaded support. Also I've seen some demos from the new physics engine implemented on U5 and it seems to be much more efficient and the new engine by itself seems to improve performance.

What's keeping me on my toes is... Can I expect a tangible performance boost with this next update? Or will it be so negligible I won't even feel it?

Link to comment
Share on other sites

did they change that? last time i checked, physics was CPU only.

plus: unity (and KSP with it) is already multi threaded. the problem is: physics can only run in one thread. apparently it is impossible to run the calculations on several threads at once.

Link to comment
Share on other sites

I think physics in U5 may be able to run on multiple cores, or even GPU, it makes little difference, individual ships must be single threaded for affinity, you may be able to have 2 400 part ships near each other, if they dock your FPS will crash to slideshow. U5 brings some performance improvements for physics, but the main winners will be memory footprints.

Link to comment
Share on other sites

I apologise for going offtopic myself, but ...

/offtopic

Currently OpenGL actually nets me more memory savings, but at the cost of destroying my FPS to intolerability.

I dont get this ... a lot of people complain that openGL makes the game almost unplayable and yet my game runs great with opengl (with the ocassional stutter? but its rare and almost unnoticeable). In what circumstances does it happen for you? I have yet to build truly large rockets but so far so good.

I run a lot of mods so opengl is a saver for me ...

DX11 produces no known graphical artifacts and cuts my ram usage massively (YMMV)

Are you telling me that you are on dx11 and the game runs great with less ram usage? Or am i reading this wrong .... ?

This makes me wonder, on what dx version does ksp run on default anyway?

Edited by code99
Link to comment
Share on other sites

All Unity3D engine command line arguments are here by the way.

-adapter N (Windows only) Allows the game to run full-screen on another display. The N maps to a Direct3D display adaptor. In most cases there is a one-to-one relationship between adapters and video cards. On cards that support multi-head (they can drive multiple monitors from a single card) each “head” may be its own adapter.

-batchmode Run the game in “headless” mode. The game will not display anything or accept user input. This is mostly useful for running servers for networked games.

-force-d3d9 (Windows only) Make the game use Direct3D 9 for rendering. This is the default, so normally there’s no reason to pass it.

-force-d3d9-ref (Windows only) Make the game run using Direct3D’s “Reference” software renderer. The DirectX SDK has to be installed for this to work. This is mostly useful for building automated test suites, where you want to ensure rendering is exactly the same no matter what graphics card is being used.

-force-d3d11 (Windows only) Make the game use Direct3D 11 for rendering.

-force-opengl (Windows only) Make the game use OpenGL for rendering, even if Direct3D is available. Normally Direct3D is used but OpenGL is used if Direct3D 9.0c is not available.

-nographics When running in batch mode, do not initialize graphics device at all. This makes it possible to run your automated workflows on machines that don’t even have a GPU.

-nolog (Linux & Windows only) Do not produce output log. Normally output_log.txt is written in the *_Data folder next to the game executable, where Debug.Log output is printed.

-popupwindow The window will be created as a a pop-up window (without a frame).

-screen-fullscreen Overrides the default fullscreen state. This must be 0 or 1.

-screen-height Overrides the default screen height. This must be an integer from a supported resolution.

-screen-width Overrides the default screen width. This must be an integer from a supported resolution.

-screen-quality Overrides the default screen quality. Example usage would be: /path/to/myGame -screen-quality Beautiful

-show-screen-selector Forces the screen selector dialog to be shown.

-single-instance (Linux & Windows only) Allow only one instance of the game to run at the time. If another instance is already running then launching it again with -single-instance will just focus the existing one.

-parentHWND <HWND> (Windows only) Embeds Windows Standalone application into another application, you have to pass parent application’s window handle to Windows Standalone application. See this example EmbeddedWindow.zip for more information.

Link to comment
Share on other sites

WRONG, i put force-d4d12

now i have KSP in 3D, my RAM is now under 10megabit, i can dock several ships of +2500parts at +150fps with my oldschool 10 years old laptop!

also i made an asteroids field to test a bit the limits, but it's ok, so i installed it on my phone and smartwatch:

i also use finite element analysis in real time to have the whole part deformed instead of just a pivot point and connected the cloud layers to the irl weather-forecast-center!

Edited by Skalou
Link to comment
Share on other sites

Re Dx11 vs OpenGL

It depends entirely on your machine. OpenGL causes FPS hits for some and graphical issues for others (some of which can be fixed in the graphics driver software). Dx11 has better graphics with no tweaking but has significant performance issues with crewed vessels for some. Both reduce RAM usage.

My rig has an i7 and a GTX 660. OpenGL has no performance issues and displays shadows. I have to use the driver to get anti-aliasing. Dx11 is prettier but halves my frame rate when I have several crew members on a vessel.

Link to comment
Share on other sites

WRONG, i put force-d4d12

now i have KSP in 3D, my RAM is now under 10megabit, i can dock several ships of +2500parts at +150fps with my oldschool 10 years old laptop!

also i made an asteroids field to test a bit the limits, but it's ok, so i installed it on my phone and smartwatch:

i also use finite element analysis in real time to have the whole part deformed instead of just a pivot point and connected the cloud layers to the irl weather-forecast-center!

https://youtu.be/yVdXy7t9oJs?t=37s

Uhhh, what? You really shouldn't drink and post, it gets you in hot water, trust me lol

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...