Jump to content

[WIP][1.9.x-1.12.x] Scatterer-atmospheric scattering (0.0838 - 14/08/2022) Scattering improvements, in-game atmo generation and multi-sun support


blackrack

Recommended Posts

19 minutes ago, R-T-B said:

I would actually advise giving dxvk and wine a try.  It performs...  pretty damn well with it's DX11 layer.

That it does. I run a bunch of stuff with DXVK (and vkbasalt, and TK-Glitch's patched wine ;)).

However:
* I get intermittent drops to ~5FPS on scene change (particularly switching between craft), which peg the GPU and bring the rest of the system down to ~5FPS with it. This is fixed by changing scenes again or changing AA setting (in any direction). No other games seem to exhibit this behaviour in DXVK, nor does KSP without scatterer.
* CPU-bound performance (and loading times) appear to be impacted by WINE overhead, which in a game like KSP is not at all good.
* Scatterer still massively nerfs performance, though nowhere near as badly as on OpenGL.

 

26 minutes ago, R-T-B said:

The OpenGL implementation in Kerbal at the moment has been badly neglected in the stock game.

Indeed. The GNU/Linux and MacOS builds appear to be neglected in general.

 

30 minutes ago, R-T-B said:

The only driver configuration that seems to run KSP OpenGL mode acceptably is AMD's full open source stack

I don't know what AMD is doing differently then, but I can say that Nvidia's OpenGL stack performs just fine for everything else... Given that the only application I have that performs this poorly on OpenGL is KSP, you can probably guess who I'm going to blame.

 

32 minutes ago, R-T-B said:

For now, use dxvk, extract 90% of native performance, and blame squad.

For now I'm just going to not use scatterer. What it brings isn't worth the additional hassle and CPU overhead of running KSP in WINE, and even there it's still a performance hog.
Stock game performance, while far from ideal, is still pretty acceptable on OpenGL. A 60+FPS hit for atmospheric scattering and fancy water just isn't.

Link to comment
Share on other sites

29 minutes ago, steve_v said:

I don't know what AMD is doing differently then

It's more that AMD is woefully incompetent at linux and finally admitted it and just open sourced their driver.  The linux community had it outperforming the windows binary drivers at OpenGL within a year.

But that's OT, really.  Sorry I can't be of more help.

For your needs, you may try EVE atmospheres, for a basic (very basic) atmospheric effect.  I think Spectra implements them.  EVE works in 1.9 with my builds, I've heard.  I'm no longer maintaining them since I joined Kopernicus, but you can still fetch them here:

http://glacialsoftware.net/scattererBuilds/PATCHED_EVE_BUILDS/

Source is also on github, and in archive IIRC.  Same license as original EVE.

29 minutes ago, steve_v said:

For now I'm just going to not use scatterer. What it brings isn't worth the additional hassle and CPU overhead of running KSP in WINE, and even there it's still a performance hog.

I don't blame you, but that 5FPS penalty every scene change sounds like a bug of some kind that maybe you could report and I'd at least take a brief look at it if not blackrack.  Do you have any interesting log files from around then?  If it's an easy fix I doubt blackrack would say no to a pull request.  Granted, the CPU overhead may make DXVK a nogo anyways.

Edited by R-T-B
Link to comment
Share on other sites

3 minutes ago, R-T-B said:

AMD is woefully incompetent at linux and finally admitted it and just open sourced their driver.

I know, right? AMD's GNU/Linux driver went from garbage fire to head of the pack within months of open sourcing it.
At this rate my next GPU purchase will probably be AMD, and that's something I haven't even considered for decades. Bring on big navi, and we'll see.
 

1 minute ago, R-T-B said:

Sorry I can't be of more help.

All good, and thanks for trying. It sure beats the dismissive and antagonistic attitude to OpenGL and GNU/Linux I got last time.
Maybe we should have, ya know, some kind of warning in the OP? Like maybe "This mod runs like utter garbage on OpenGL, don't try it, don't mention it, OpenGL is a dirty word here"?

Link to comment
Share on other sites

4 minutes ago, steve_v said:

All good, and thanks for trying. It sure beats the dismissive and antagonistic attitude to OpenGL and GNU/Linux I got last time.

Maybe we should have, ya know, some kind of warning in the OP? Like maybe "This mod runs like utter garbage on OpenGL, don't try it, don't mention it, OpenGL is a dirty word here"?

I could do with better phrasing, but yeah, it might not be a bad idea to warn about the performance issues.

It's tough for me because I sympathize with blackrack too, OpenGL is an utter mess right now on KSP.  And it's not really the API's fault as much as squads and to some extent, Unity, but meh...  End user hurts the same, you know?

4 minutes ago, steve_v said:

Bring on big navi, and we'll see.

Ironically, navi's done better for me in linux than windows.  In windows their driver is an unstable mess.  lollerskates.

Edited by R-T-B
Link to comment
Share on other sites

48 minutes ago, R-T-B said:

For your needs, you may try EVE atmospheres, for a basic (very basic) atmospheric effect.  I think Spectra implements them.

Way ahead of you on Spectra. :PEVE 1.8.0 appears to run well enough on KSP 1.10.1, but I'll give that patched build a poke in a minute and see if I can spot the difference.
 

48 minutes ago, R-T-B said:

that 5FPS penalty every scene change sounds like a bug of some kind that maybe you could report

It's not every scene change, and it's not a 5FPS penalty either... it's a drop to 5FPS, sustained, and a 5FPS desktop if I tab out of the game as well. Like something has the GPU's panties in a tangle.
IIRC pretty consistently if I launch to pad -> return to space centre -> switch back to craft == solid 5FPS in flight scene until I change AA setting to something else, with other scenes (VAB etc.) still running fine.
I didn't see anything interesting in the log myself (i.e no errors, nothing different in output from scatterer), and I wasn't real inclined to report anything at the time either given the reception my OpenGL related query got, so I didn't persist in trying to narrow down exact repro steps.

I can likely try it again as I still have the WINE install I was testing, but it'll have to be tomorrow at this point, if I CBF at all that is. Given the lack of interesting logs or corroborating reports I'd say it's likely WINE/DXVK related, and frankly I'm not all that interested in running my native game in WINE just for scatterer.


 

Edited by steve_v
Link to comment
Share on other sites

On 8/9/2020 at 3:22 AM, KermitKiller said:

For me, Scatterer has an issue where it doesn't work and causes the oceans to disappear. I have several other mods installed like Environmental Visual Enhancements but I am sure Scatterer is the cause of this. I am playing in 1.10.1 on Windows 10. If someone could help, that would be amazing. Thank you!

This usually means scatterer didn't load, check configs and log for issue, look in the OP for how to make a full report.

On 8/9/2020 at 3:35 PM, Athur Dent said:

Hey guys, does anybody know what value in a scatterer config file could cause the night sky of a planet to have a bright rim like this?

I'm playing around with scatterer configs and I do not seem to find the value that turns this off, and lets the dark side of this planet be realistically black.

Thanks for any hints.

It's realistic, there is atmosphere on the edges that is technically experiencing sunset and scattering light towards the viewer.

On 8/9/2020 at 11:29 PM, JWag said:

I'm seeing a bunch of NREs also. I haven't found a way to reproduce it yet. Everything works great for a while, until suddenly the night side of any body becomes completely black except for the skybox and whatever part is highlighted. The log shows a bunch of NREs.

Here's my modlist, log, and a copy of the save from today's incident: https://drive.google.com/file/d/1y03gegllBMr_k3TWN5R3ZvbC59-SvInw/view?usp=sharing

Add mods installed with CKAN, though I temporarily relaxed the version limiting so that I could get Kerbal Alarm Clock installed. I don't believe I've changed any Scatterer configurations; I've been running with it as-installed via CKAN.

Have not tried yet without other mods installed, but that's mostly because I have no way of knowing when/if the NRE spam or Black Night problems will happen and I've got enough going on that playing without KAC is tough. :)

I will try to look into this.

On 8/10/2020 at 6:26 AM, AnFa said:
KSP: 1.10 Windows 64bit

Problem: Unlit side of kerbin is black

Mods installed:

Scatterer 0.0621b

EnvironmentalVisualEnhancements 1.8.0.2

KSPRC 0.7 Prerelease 3

Texture Replacer 4.2.2

Spectra 1.4.0

KS3P - V6.1

Reproduction steps:

N/A

Log:

https://www.dropbox.com/s/lyt0mflg9dg75i8/Player.log?dl=0

The unlit side of every planet and moon looks like this, a black hole. What do I do?

Try disabling "disable scaled space ambient light" option from the UI.

3 hours ago, R-T-B said:

I would actually advise giving dxvk and wine a try.  It performs...  pretty damn well with it's DX11 layer.  Provided NVIDIAs vulkan driver is ok (it works by translating DX11 calls to vulkan ones).

PM me if you need help with that.  The results are surprisingly good.

While I don't agree with @blackrack's linux/OpenGL general dislike, I do agree that there's not much he can do to fix it.  The OpenGL implementation in Kerbal at the moment has been badly neglected in the stock game.  There isn't much modders can do about that.  Ie, it runs like crap on Windows, too.  The only driver configuration that seems to run KSP OpenGL mode acceptably is AMD's full open source stack, and even it is questionable and riding on the advancements of open source rather than the cards themselves.

For now, use dxvk, extract 90% of native performance, and blame squad.

I don't dislike either linux or OpenGL, I just know that's not where the good performance is with KSP (not that you're going to get "good" performance with KSP anywhere). Anyway, maybe try steam's proton thing? I heard good things about it but haven't heard of anyone trying it with KSP.

Edited:

Here is what the first report on KSP on protondb says:

experience on par with windows user

sometimes crashes like windows version (~50 mods used)

On vanilla, no difference between native and proton. But with mods native version runs between 1-5fps, whereas on proton it runs smooth (like windows), so i use proton to play with mods.

KSP version 1.9.1 and Proton 5.0-9

Not sure if that means it's translating dx11 though

Edited by blackrack
Link to comment
Share on other sites

25 minutes ago, blackrack said:

with mods native version runs between 1-5fps, whereas on proton it runs smooth

Perhaps those "mods" are scatterer then? It's the thing I've encountered that would even come close to explaining that performance gap (AVP + EVE + KS3P still yields decent perf on OpenGL here). But the reporter doesn't say, and gives very little detail... In fact it's really quite useless as far as performance information goes, beyond "I clearly have mod issues".
 

29 minutes ago, blackrack said:

Not sure if that means it's translating dx11 though

It does. The reason everyone raves about proton is DXVK + esync. DX11 in vanilla WINE is extremely slow (when you can get it to work at all), and KSP/OpenGL in WINE runs noticeably slower than the native build even unmodded.

IME, KSP in WINE+DXVK / Proton runs better when GPU limited and worse when CPU limited WRT the native build, but benching it properly is far too time consuming for my liking.

Link to comment
Share on other sites

5 hours ago, blackrack said:

I don't dislike either linux or OpenGL, I just know that's not where the good performance is with KSP (not that you're going to get "good" performance with KSP anywhere). Anyway, maybe try steam's proton thing? I heard good things about it but haven't heard of anyone trying it with KSP.

Proton is just steams wrapper for the tools i suggested (dxvk and wine, I think it adds esync too).

At any rate, glad you do not carry bias.  I found it hard to believe you would, considering the level of effort you put into backwards compatibility with the whole dual camera thing! ;)

4 hours ago, steve_v said:

Perhaps those "mods" are scatterer then? It's the thing I've encountered that would even come close to explaining that performance gap (AVP + EVE + KS3P still yields decent perf on OpenGL here). But the reporter doesn't say, and gives very little detail... In fact it's really quite useless as far as performance information goes, beyond "I clearly have mod issues".

I mean, scatterer is a graphics mod.  Even on DX11 it hurts performance, that's just it's nature.  It gets worse with dual camera though, and that's largely squads (or maybe even Unity's) fault because they have not implemented single camers in OpenGL codepath yet.

I hear you.  For the end user, this is the same ol "but it don't work good!" story.  Sadly, not much we can do right now.

Edited by R-T-B
Link to comment
Share on other sites

1 minute ago, R-T-B said:

Proton is just steams wrapper for the tools i suggested (dxvk and wine, I think it adds esync too).

At any rate, glad you do not carry bias.  I found it hard to believe you would, considering the level of effort you put into backwards compatibility with the whole dual camera thing! ;)

I don't, I just don't like people who complain that my free mod is not to their "liking" ;)

Link to comment
Share on other sites

4 minutes ago, blackrack said:

I don't, I just don't like people who complain that my free mod is not to their "liking" ;)

Heh, I didn't read it that way.  If that's what you feel he's doing though, that is completely understandable.  I've always modded for my own game first, others second.  I imagine you are the same.

I would ask you to remember linux-culture can just get a bit silly around windows sometimes (bite your tongue, steve_v, lol), and I think he was just trying to see if there was a bug to report.  But beyond that I'll shut up.

Edited by R-T-B
Link to comment
Share on other sites

On 8/9/2020 at 2:22 AM, KermitKiller said:

For me, Scatterer has an issue where it doesn't work and causes the oceans to disappear. I have several other mods installed like Environmental Visual Enhancements but I am sure Scatterer is the cause of this. I am playing in 1.10.1 on Windows 10. If someone could help, that would be amazing. Thank you!

That would sometimes happen to me in other versions.Get into the Scatterer control panel (ALT+F12) if Scatterer has no icon to click on, and go into the Ocean tab and at the bottom select 'Rebuild Ocean'. It usually brings it back immediately.

Link to comment
Share on other sites

3 hours ago, TimKerbin said:

That would sometimes happen to me in other versions.Get into the Scatterer control panel (ALT+F12) if Scatterer has no icon to click on, and go into the Ocean tab and at the bottom select 'Rebuild Ocean'. It usually brings it back immediately.

Be careful. If you rebuild the ocean on JNSQ with that button, the cfg file will lose its JNSQ tags and bad things will happen on next KSP launch.

Link to comment
Share on other sites

43 minutes ago, Hohmannson said:

Be careful. If you rebuild the ocean on JNSQ with that button, the cfg file will lose its JNSQ tags and bad things will happen on next KSP launch.

JNSQ? Forgive me, I'm not a programmer so I haven't a clue what you mean, but it sounds serious and I will be careful.:P Though, I've done that in the past a few times and can't recall any crashes, etc.

Link to comment
Share on other sites

4 hours ago, TimKerbin said:

JNSQ? Forgive me, I'm not a programmer so I haven't a clue what you mean, but it sounds serious and I will be careful.:P Though, I've done that in the past a few times and can't recall any crashes, etc.

JNSQ is a planet pack mod.  If you don't know what it is, you don't have it installed and it's not a problem for you.

Link to comment
Share on other sites

On 8/9/2020 at 9:29 PM, JWag said:

I'm seeing a bunch of NREs also. I haven't found a way to reproduce it yet...

It *seems* like it happens after I've been using the Tracking Station a lot, especially if I'm bouncing between several craft and checking out Asteroids or Comets. Sorry I can't be any more particular yet.

It just happened again. When I went into the Tracking Station it was night on Kerbin, but you could make out the various buildings. After the bug hit, all of the land and buildings are perfectly black, and all that's visible is the lights in the windows.

Link to comment
Share on other sites

14 hours ago, JWag said:

It *seems* like it happens after I've been using the Tracking Station a lot, especially if I'm bouncing between several craft and checking out Asteroids or Comets. Sorry I can't be any more particular yet.

It just happened again. When I went into the Tracking Station it was night on Kerbin, but you could make out the various buildings. After the bug hit, all of the land and buildings are perfectly black, and all that's visible is the lights in the windows.

Yep, I'm getting this, too.  Running Scatterer, but no other visual f/x mods.

Link to comment
Share on other sites

7 hours ago, jjansen said:

Few things:

1. People are saying that Scatterer is causing white atmosphere. https://www.reddit.com/r/KerbalSpaceProgram/comments/i93gnc/so_i_got_this_glitch_im_in_1101_using_only/

2. I tried dropping in the new version from Github and got this:

cEmltxB.png

3. My KSP has been using 0.0610 successfully since June with no issues.

The one on github has been zipped with some third-party utility windows doesn't understand.  Something like winrar or 7zip can open it.  Or you can grab it from one of the other hosts and it should open as he used a more normal zip there.

Edited by R-T-B
Link to comment
Share on other sites

8 minutes ago, R-T-B said:

The one on github has been zipped with some third-party utility windows doesn't understand.  Something like winrar or 7zip can open it.  Or you can grab it from one of the other hosts and it should open as he used a more normal zip there.

With regards to the reddit thread, that's one of many with the same exact issue.

I think the issues are related, and that very few users are going to come here to find that particular solution.

Link to comment
Share on other sites

2 minutes ago, jjansen said:

With regards to the reddit thread, that's one of many with the same exact issue.

I think the issues are related, and that very few users are going to come here to find that particular solution.

I'm not on reddit much so can't really help there.  But I can assure you the zip format is not related to the issue with white atmospheres.  It's just how he chose to compress his file.

I'd be willing to bet some cards could be having an issue with the latest scatterer causing white atmospheres though.  That would certainly be a bug worth looking into.

Edited by R-T-B
Link to comment
Share on other sites

2 minutes ago, R-T-B said:

I'm not on reddit much so can't really help there.  But I can assure you the zip format is not related to the issue with white atmospheres.  It's just how he chose to compress his file.

I'd be willing to bet some cards could be having an issue with the latest scatterer causing white atmospheres though.  That would certainly be a bug worth looking into.

What would the mod look like without the .dll?

Link to comment
Share on other sites

13 hours ago, jjansen said:

Few things:

1. People are saying that Scatterer is causing white atmosphere. https://www.reddit.com/r/KerbalSpaceProgram/comments/i93gnc/so_i_got_this_glitch_im_in_1101_using_only/

2. I tried dropping in the new version from Github and got this:

3. My KSP has been using 0.0610 successfully since June with no issues.

I fixed the .dll on github. For the white atmosphere make a full bug report, check for duplicate scatterer installs and try to remove other mods and retest.

Link to comment
Share on other sites

5 hours ago, blackrack said:

I fixed the .dll on github. For the white atmosphere make a full bug report, check for duplicate scatterer installs and try to remove other mods and retest.

Also try my EVE builds.  I feel like the white atmosphere thing could be from an outdated EVE install bugging out.

Link to comment
Share on other sites

Ok, I'm reporting the same white atmosphere bug in 1.9.1.  I'm using @R-T-B's 1.9.1 version of EVE and Scatterer 0.0621b and I get this: https://www.dropbox.com/s/0qudtoe55f5q1tl/Buggy atmosphere.PNG?dl=0

Log files:

https://www.dropbox.com/s/setczljb69wtv8y/Player.log?dl=0

https://www.dropbox.com/s/0hx0sr1tkc6vsu0/output_log.txt?dl=0

I'm using EVE, Scatterer, RVE64k, and RSS.  Just go to any planet (except Earth) with an atmosphere and the bug will appear.

Link to comment
Share on other sites

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