Jump to content

Less memory usage by using OpenGL


Eisfunke

Recommended Posts

Your actual computer specs don't really matter at that sort of performance. Because of the way KSP calculates physics, I believe that using OpenGL affects the amount of time it takes KSP to do a physics calculation, effectively running the game at half the speed it would whilst using DirectX. As long as you have a core with a clock higher than around 2.4Ghz, at least 4Gb and a fairly decent graphics card, KSP will work decently. Any hardware higher than that then you won't notice much difference performance wise.

Are you sure? according to benchmarks with KSP http://forum.kerbalspaceprogram.com/entries/1170-CPU-Performance-Database CPU speed matters. It therefore helps to overclock your system

Link to comment
Share on other sites

That's the thing. it doesn't SEEM to run slower. Physically, it does not affect any sort of lag. BUT, and this is a big but (hehe :P), it affects the SIMULATION speed which you may not necessarily notice. You will only notice it in some circumstances. It also depends on what OS you are running to how much it actually affects the simulation time because each OS runs their graphical rendering a different way even though they use the same engine (with an exception to OS X, which I am not entirely sure if it has any option to use DX 9/10/11 etc). SO, although you may not notice it, 7/10 it is there but you just don't realise it. Now you are probably thinking, "well if I don't realise it, why did you bring it up?". That's a good question. I brought it up because - because KSP now spends longer on each physics calculation a potential bottleneck may/will occur when more parts and ships are in the physics calculation range at once. Your 1000 part ship that your computer can reasonably handle using DX 11 (or whatever DX you use), your computer may not be able to handle OR there will be a physical decrease in speed whilst using OpenGL. Again, depends on the DX version you are benchmarking against if you are going to do this. Also depends on the OpenGL version you use to benchmark this AND the OS you are running. On some occasions also depends on your hardware. I hope this clears some stuff up,

ToTheMun

Intresting, do you have sources to back up those claims?

Link to comment
Share on other sites

Are you sure? according to benchmarks with KSP http://forum.kerbalspaceprogram.com/entries/1170-CPU-Performance-Database CPU speed matters. It therefore helps to overclock your system

Did you actually read my post? I said that with the specs I posted it will work decently. Once you start getting higher performance hardware "you won't notice much difference." I said that because the only thing that really affects the performance is the CPU. If you start getting a higher powered GPU, the GPU will make barely any difference once you get past a certain point because the CPU still has to dish out the models, meshes, textures, etc to the GPU AT THE SAME TIME as calculating physics. Read the post properly next time.

Intresting, do you have sources to back up those claims?

It's called me. Google search "me". No, don't actually do that. I have done several benchmarks in the past on a variety of games benchmarking their performance with rendering as DX and OpenGL. I have done these benchmarks on KSP and whilst using OpenGL, CPU usage is increased and simulation time was about 1/3 more. As I said in my post, it all depends on your system. What hardware you have, what DX version you are running, what OpenGL version you are running, and what OS you have. There is a combination of the 4 that allows OpenGL rendering with no extra impact on simulation times, or physical lag, however I am yet to find this combination. Linux looks promising for it though, so far having only a 19% increase on simulation time while running OpenGL compared to the Windows benchmark which was a 37% increase in simulation time. Both DX versions were the same release, both OpenGL versions were the same release and both OSes were tested on the same hardware.

Link to comment
Share on other sites

What do you mean by half speed? You mean when outside of KSP it plays at half speed or all the time? what kind of hardware do you use? I use a 4.6G overclocked watercooled Ivy Brigde rig with 512 SDD and Gefore 670GTX. Although It's a few years old, it is still kicking but.

Just your run of the mill Intel Core 2 Quad 3.0--and by half speed, I mean half speed. So two seconds pass for every second in game, on x1 speed. It's very easy to see if you have a watch handy.

KSP in Directx 9 did not do this (it also didn't load up all my mods, unless I was playing x64).

Edited by Synthesis
Link to comment
Share on other sites

I filled out a survey--performance is a bit worse, but on the other hand, OpenGL slow is preferable to Vanilla crashing.

Another thing I noticed, besides a slight decline in framerates and some shadow issues and no antialiasing--certain textures don't want to work (Bahamuto's Critter Crawler comes up as complete white).

Very odd, but not a major issue.

I'm having the same issues. Shadows show up through models, and it looks awful sometimes.

But without OpenGL, I simply can't play the game due to the sheer number of mods I have. So I'll have to come to terms with it, it seems. Any workarounds?

Link to comment
Share on other sites

Any workarounds?

Download more RAM :P Don't do that, actually. If OpenGL is not working for you (or you just don't like the way stuff looks with it), your best bet would be to use KSP 64 bit. But because of the highly instable 64x build on windows, I would not recommend using it on windows, but instead installing Linux as a dual boot with your windows system. The Linux 64x build is a lot more stable and with the 64x build, you can use more RAM hence load more mods. You could try using the windows 64x build, but be prepared for frequent crashes, bugs and errors. Until the windows 64x build is fixed (which is not a SQUAD problem btw, it is unity), the only USEABLE 64x build is on the Linux system. So yea, if you don't want Linux, your stuck between a rock and a hard place.

Link to comment
Share on other sites

Thanks to the OP for this tip! Can finally use all the mods I want without having ugly textures. :P

Been doing quite a bit of testing with this over the last few weeks and it works well. Only things I've noticed is the KSC flag doesn't animate and it perhaps working the video card a bit harder than DirectX mode does (only judging by the amount of fan noise).

Also figured out a few tidbits that may help others so I thought I'd share...

- I kept getting out of memory errors at only 1.5GB usage initially, with the game crashing at the menu. I fixed this by increasing the page file (was set really small due to having an SSD).

- Active texture management will use more memory (about 200-300MB more). However, it also fixes missing textures issue (where you just get a white model). I think the missing textures is due to the format used because only some mods were effected for me. So it might be worth running without it if you want to save more memory, or running with it if you keep getting textureless parts.

- If you absolutely can't get OpenGL mode to run right, you might want to try LoadOnDemand. In my tests it isn't as dependable as forcing OpenGL, but it may be worth trying for some. It loads textures on demand, so you can still get situations where it goes over the memory limit (for example, by having too many command pods so it crashes on load of the SPH/VAB).

- If you get shadows showing through models, it might be down to Kronal Vessel Viewer or any similar mods. I also got it in DirectX mode sometimes.

Hope that helps somebody. :)

Edited by Fourjays
Link to comment
Share on other sites

I'm having the same issues. Shadows show up through models, and it looks awful sometimes.

But without OpenGL, I simply can't play the game due to the sheer number of mods I have. So I'll have to come to terms with it, it seems. Any workarounds?

It doesn't seem like it. I'll not lie--I don't care enough about this particular version of the KSP Alpha to create a partition with Linux just so I can run a 64-bit client--doubly so if 0.25 64-bit in Linux retains the inability to use previous careers, which was at the top of 64-bit's problems easily. I don't begrudge anyone who does (or who was already using Linux, naturally), and if I played KSP as much as I used to, it might be a different story.

So, just make do--and maybe check out the LOD Mod. It's easy to forget that KSP is still in alpha, and still incredibly unfinished (though I'd be the first to say I got my $13 worth out of it over the last few years!).

Playing the game in DirectX 11 might help you out (or it might not)--shaders aren't properly handled (mostly those burn streaks on the launch pad, I think?) and there's a glitch where your vessel will appear pink (yeah, it's...hard to describe). On the flipside, the transparency issues aren't there, nor is that annoying "Spaceport Missing" big. I had the same performance issues (text on screen was somewhat separated, but completely readable). Give it a try, especially since it doesn't seem to have OpenGL's catastrophic memory leaks for the handful of people who tried it. Warning: you will be lumped into the "M$" crowd if you do so. :D

Edited by Synthesis
Link to comment
Share on other sites

- If you get shadows showing through models, it might be down to Kronal Vessel Viewer or any similar mods. I also got it in DirectX mode sometimes.

Hope that helps somebody. :)

Wow! You're my hero!

I never thought it could be related to KVV, but it is! I did some Googling, and yep, buncha people are having this issue with KVV. I uninstalled KVV, and it fixed it. Thank you so much!

Link to comment
Share on other sites

Wow! You're my hero!

I never thought it could be related to KVV, but it is! I did some Googling, and yep, buncha people are having this issue with KVV. I uninstalled KVV, and it fixed it. Thank you so much!

Wow, very informative, thank you! Too bad, KVV is a great tool nonetheless.

Link to comment
Share on other sites

Just remove -force-opengl from your startup shortcut.

ATi 7970 user here, saved about 1.1GB memory footprint according to TM, fps is fine, running in fullscreen window mode it flashes my 2nd monitor when I switch focus but otherwise is behaving, EXCEPT - I have no shadows at all. Read the entire thread & saw a couple more people with this problem but no solutions, so... anyone solved it?

Link to comment
Share on other sites

Just remove -force-opengl from your startup shortcut.

ATi 7970 user here, saved about 1.1GB memory footprint according to TM, fps is fine, running in fullscreen window mode it flashes my 2nd monitor when I switch focus but otherwise is behaving, EXCEPT - I have no shadows at all. Read the entire thread & saw a couple more people with this problem but no solutions, so... anyone solved it?

As far as I am aware, shadows not rendering is an internal issue with how openGL, well.... renders. At this point in time, I do not believe there is a fix for that.

Sorry, forgot to clarify; Mac user here. Just flat-out launching KSP, according to KSP.log and Player.log, is using OpenGL and I can't figure out what the argument to change it is.

You could attempt "-force-Direct3D". I'm not sure of what the rendering is exactly called on Mac, so if it has a fit... :P

Hope this helps guys,

ToTheMun

Link to comment
Share on other sites

Unfortunately, I can't seem to find any sort of -force-blah (blah being direct3d, d3d, dx, directx, d3d9, direct3d9, and pretty much everything else I can think of) that gets it to switch back to D3D.

EDIT: Er ... a bit of research suggests it might be that KSP uses OpenGL on OS X by default and doesn't support Direct3D ... sorry for wasting peoples' time.

Edited by Whovian
Link to comment
Share on other sites

Unfortunately, I can't seem to find any sort of -force-blah (blah being direct3d, d3d, dx, directx, d3d9, direct3d9, and pretty much everything else I can think of) that gets it to switch back to D3D.

EDIT: Er ... a bit of research suggests it might be that KSP uses OpenGL on OS X by default and doesn't support Direct3D ... sorry for wasting peoples' time.

Ah, that is a good point. DirectX is Microsoft. Microsoft is not apple. So, apple uses a open source renderer (being OpenGL) by default. That's fine, I only just clicked too xD

Link to comment
Share on other sites

Simple copy&paste as I`m tired as hell to type it all over again...

Gave 64bit another attempt and seeing EL not working made me cry abit.

As I`m clueless to how to recompile, a question to anyone who is bored or still attempting to run 64.

I went from a horrible crashfest 0.25 64bit to a rock solid +12 hours game play yesterday with 1 crash due to slamming a 200+ part into the runway (ksp exploded along)

Using amd cards and CCC:

Add a standard profile for the 64bit executable: disable crossfire for it.

Ksp: disable full screen

Shortcut add after the path: -popupwindow -force-d3d11-no-singlethreaded

Adding the forced no-singlethreaded in windowed mode fixed all crashes, please note, for me.

I have posted it in several places but so for not a single reply.

I also sent it to Rowsdower as *maybe* this might help finding the cause or underlying problems besides just saying "it`s Unity", if this *could* add to the crashfest, it would be simple for them to add it in the code for stability *if* it really helps improve it.

I have no idea what that command line argument does and why it works great with disabled crossfire, but it works for me.

If anyone has a clue where else to post where people are still looking for solutions I would gladly hear it, just want to share my personal findings for my system that seem to work so far :)

Interrested to know if this *might* help for anyone else or if it`s just magic for my pc.

Link to comment
Share on other sites

has anyone been able to get the -force-opengl and borderless window mode for a steam based launch? Raptr overlay doesn't show up unless I launch through steam, and i need that to use gvr. but the bordered windowed mode is being real annoying.

Link to comment
Share on other sites

It's called me. Google search "me". No, don't actually do that. I have done several benchmarks in the past on a variety of games benchmarking their performance with rendering as DX and OpenGL. I have done these benchmarks on KSP and whilst using OpenGL, CPU usage is increased and simulation time was about 1/3 more. As I said in my post, it all depends on your system. What hardware you have, what DX version you are running, what OpenGL version you are running, and what OS you have. There is a combination of the 4 that allows OpenGL rendering with no extra impact on simulation times, or physical lag, however I am yet to find this combination. Linux looks promising for it though, so far having only a 19% increase on simulation time while running OpenGL compared to the Windows benchmark which was a 37% increase in simulation time. Both DX versions were the same release, both OpenGL versions were the same release and both OSes were tested on the same hardware.

Intresting. I'm afraid you were right about the cutting processing in half under OpenGl. Although OpenGl initialy didn't Lag my game, when I started lauching bigger rockets I ran into serious Lag. I was only able to play with dynamic speed set to half. The Slowdown on speed is very frustrating, to the point that I seriously thinking about returning back to Direct3D (windows 7). That means I have to make sacrifices to my mod list I'm afraid :(

Edited by FreeThinker
Link to comment
Share on other sites

Intresting. I'm afraid you were right about the cutting processing in half under OpenGl. Although OpenGl initialy didn't Lag my game, when I started lauching bigger rockets I ran into serious Lag. I was only able to play with dynamic speed set to half. The Slowdown on speed is very frustrating, to the point that I seriously thinking about returning back to Direct3D (windows 7). That means I have to make sacrifices to my mod list I'm afraid :(

Until the x64 build is more stable, reducing your only mod list is really the only option, otherwise you sacrifice a lot of performance by using OpenGL, especially when launching bigger crafts (as you have now seen first hand). To be perfectly honest, Linux is probably the best way to go if you want lots of mods. The x64 build on Linux is actually stable. The issue with Linux though is the drivers for graphics cards, which are not always as efficient as the Windows variants. Because Linux is open-source, I also believe that D3D is not available as a renderer on Linux. I am not completely sure about that, but it makes sense as OpenGL is open source, D3D is not, etc.

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