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

18 minutes ago, StoneWolfPC said:

I have some minor texture issues over KSC at times during launch for brief seconds where a strange flicker will occur then stop.  Not at all sure why.

Probably scatterer terrain shadows?  Turn them off from the main KSC view if you have them on with the toolbar... or if you have them off, then that's a mystery to me.  They should be off right now as they are just buggy enough to work, but mess with you.  Besides, stock KSP has basic terrain shadows in the standard settings now anyways, so they sort of aren't needed.

 

The atmosphere transition is because literally the "Far away" space trackingcenter camera and the camera your ship uses are the same now.  We have to kind of ease into that new idea graphically speaking, and it's tough to get the transition from "near"  to " far" right without two seperate cameras like we had before.  It can appear jarring where it tries to switch the clouds over, which is what you are seeing at 200,000m or so.  I may try improving that a little later, but not right now, I'm pretty happy with the result as far as being safe enough to use (and yes, I "eat my own dogfood," been playing with this all day lol).

 

I'd say overall though yes, it's a lot better than -force-d3d12, that's for sure!  And yes, the unified camera does improve FPS. :)

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

Unoffical Release 1.2 just dropped:

This is a minor bugfix update to the 1.0 unofficial 1.9 release series of Scatterer. To install simply extract to your KSP install.

What was changed / added since Unofficial Release 1.1?

1.) Fixed RSS Mode, which was broken by a regression caused by a over-optimistic optimization. Now it works again, and we still have pretty much the same level of optimization for those who don't use it.

If you aren't experiencing any of the above bugs, this is a fairly minor release and I'd not worry about it.

Usual places:

Github:

https://github.com/R-T-B/Scatterer/releases

My Server:

http://glacialsoftware.net/ScattererBuilds/

Thank you all and enjoy!

-RTB

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

Hello everyone,

@R-T-B thanks for picking up the slack and providing a working version for 1.9 :) it is fine for me if you post binaries directly for users (I think the forum rule is to always include source code with it though but you already do that).

I will add your builds to the OP so people use them instead of fiddling with DX12.

I started looking at the code, the old unified-camera branch was my attempt to force the game to use one camera before they were officially unified, so it is indeed a good starting point.

However I plan to support both unified-camera and dual camera modes though (ie OpenGL).

As for stock terrain shadows, I tried them briefly and it seemed like while terrain does cast shadows, they are not visible from far away, ie in scenes like this you don't see the mountains casting long shadows while you are flying over them, you only see them when sitting directly in the shadow: http://i.imgur.com/vfOJUhM.png .Also I consider long-distance shadows important because I plan to use them for another feature (hint: it's a feature that was removed before from scatterer because it was badly done).

I still only looked briefly at the merge request, so I will probably ask some questions and you can fill me in ;) 

Now, I am in home confinement and working remotely like many people in the world right now... Which means that although the situation is not Ideal, I have more free time and peace :) 

So I expect to get back into modding and spend some serious time on it.

Link to comment
Share on other sites

Excellent to have you back, blackrack.

 

My pull request is a bit disorganized (honestly I did not expect it to well... work), but I think you'll probably want it all other than the last commit, which comments out the shadow code.  If you can make that work again, I'm all for it!  It was just beyond my skills.  Ask away, remember:  this is still your baby.  If anything I did seems wrong, father probably knows best as I was stumbling in the dark a bit. ;)

 

My advice for opengl builds is simple:  Use a seperate branch with either a full codebase, or even better, a simple patchset you maintain.  That's how I'd tackle it anyhow for the shortterm, unless we don't think they are going to merge cameras on OpenGL soon (I imagine they are, why wouldn't they?)

 

45 minutes ago, blackrack said:

Now, I am in home confinement and working remotely like many people in the world right now...


As a resident of Washington State USA, one of the hardest hit states, I feel you.  At least I'm rural so lockdown isn't so bad.

If you have any questions or concerns, write here or PM me.  I have to remote in to work (yes, they still demand digital attendance I guess) so I may take an hour or so to reply, but I will do my best.

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

2 hours ago, R-T-B said:

My advice for opengl builds is simple:  Use a seperate branch with either a full codebase, or even better, a simple patchset you maintain.  That's how I'd tackle it anyhow for the shortterm, unless we don't think they are going to merge cameras on OpenGL soon (I imagine they are, why wouldn't they?)

So,  Originally KSP implemented this split cameras rendering mode to get around depth buffer precision limitations. Recently, Unity introduced a reverse depth buffer in Dx11 which has much better precision than a normal depth buffer (https://developer.nvidia.com/content/depth-precision-visualized), however other graphics APIs don't benefit from this improved depth buffer.

This means that while KSP can have a unified Camera in Dx11, OpenGL will stay on split Cameras for now, possibly until Unity updates the other video modes. For this reason I would like to support both modes, and directly in the code (probably with a bunch of checks) and in the same code branch so I don't have to worry about making and releasing multiple builds, just a single build for everybody.

If you feel like like it, maybe you can look into it as well, otherwise no pressure ;) I plan to get back into things over the coming days.

Link to comment
Share on other sites

1 hour ago, blackrack said:

For this reason I would like to support both modes, and directly in the code (probably with a bunch of checks) and in the same code branch so I don't have to worry about making and releasing multiple builds, just a single build for everybody.

I personally would have no problem with separate Scatterer versions for each renderer. Honestly you should do what is easiest for you to implement. It's your mod after all.

Edited by Delay
Link to comment
Share on other sites

2 hours ago, blackrack said:

So,  Originally KSP implemented this split cameras rendering mode to get around depth buffer precision limitations. Recently, Unity introduced a reverse depth buffer in Dx11 which has much better precision than a normal depth buffer (https://developer.nvidia.com/content/depth-precision-visualized), however other graphics APIs don't benefit from this improved depth buffer.

This means that while KSP can have a unified Camera in Dx11, OpenGL will stay on split Cameras for now, possibly until Unity updates the other video modes. For this reason I would like to support both modes, and directly in the code (probably with a bunch of checks) and in the same code branch so I don't have to worry about making and releasing multiple builds, just a single build for everybody.

If you feel like like it, maybe you can look into it as well, otherwise no pressure ;) I plan to get back into things over the coming days.

Oh, I see!  I can look into it for sure, especially if OpenGL is staying that way.  I have some ideas of how to do it.  I can get you a head start if you'd like.

BTW everyone, we rolled back to RC4.  This means shadows are back!

Why?  Because it turns out tweaking the normal bias a bit seems to make them work right.  I'd like to test that and see if we can actually keep dem Terrain shadows in scatterer. :)

Please, if you are having shadow issues/flicker with RC4, play with the values at the KSC titled "shadow bias" and see if you can't find a happy spot to make it work (the ones I'm distributing now work pretty well though)

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

49 minutes ago, alberro+ said:

Will a proper 1.9.1 update be put out? I can totally understand if not.

Blackrack and I are working on it now.  You can test my "earlybird" builds from the link in the OP, keeping in mind they are unofficial and beta.

 

So yes, there'll be one.  Likely soon.  I just got scatterer's build system to work on both OpenGL and DirectX targets with the same source:

 

Observe these two images of my pretty red dwarf Kerbolar system from the KSC:

77592398-4c7fd680-6eaf-11ea-8300-c3597dc

77592411-543f7b00-6eaf-11ea-8d5e-3a3b015

 

One is on OpenGL/linux, the other DirectX/windows.  Same build, all on 1.9, despite OpenGL and DirectX featuring entirely different camera setups.  NIce eh?  You can't even tell the difference quality wise, but the bottom one is actually dual camera/opengl, while the top is the new unified camera.  It auto sets the mode so you don't have to think about it.

 

So yes *nixites, this means the next RC will probably support you guys too. :)

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

1 minute ago, R-T-B said:

Observe these two images of my pretty red dwarf Kerbolar system from the KSC:

77592398-4c7fd680-6eaf-11ea-8300-c3597dc

77592411-543f7b00-6eaf-11ea-8d5e-3a3b015

Speaking of which! Do you plan on releasing this VM as a mod in itself? Maybe i'm just out of the loop, but it looks so freaking cool, and i'd love to try it out.

Link to comment
Share on other sites

1 minute ago, alberro+ said:

Speaking of which! Do you plan on releasing this VM as a mod in itself? Maybe i'm just out of the loop, but it looks so freaking cool, and i'd love to try it out.

It relies on a Kopernicus patch, and I'm not sure I'm allowed to release an early Kopernicus for 1.9.  Got yelled at last time I tried to do that during the 1.8 update, so no, but maybe soon? ;)

 

You can kind of emulate it with scatterer though.  Set your sunflare color and it will try to match up the atmopshere a bit.  It's a lot of fun, honestly.  I do plan to one day release the whole shebang.

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

Just now, R-T-B said:

It relies on a Kopernicus patch, and I'm not sure I'm allowed to release an early Kopernicus.  Got yelled at last time I tried to do that, so no, but maybe soon? ;)

Quite a shame really. I'd love to try it out as soon as Kopernicus for 1.9.1 drops! Props to you, my good sir, for making such a good looking VM!

Link to comment
Share on other sites

2 minutes ago, alberro+ said:

Quite a shame really. I'd love to try it out as soon as Kopernicus for 1.9.1 drops! Props to you, my good sir, for making such a good looking VM!

Astrononmers Visual Pack did most of it.  You can find their awesome visual pack around here somewhere.  I just integrated a bunch of red-dwarf coloration things into it.

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

Just now, R-T-B said:

Astrononmers Visual Pack did most of it.  You can find their awesome visual pack around here somewhere.  I just integrated a bunch of coloration things into it.

So, when everything finally works for 1.9.1, I've got to install AVP, Kopernicus, EVE, and Scatterer? 

Seriously though, it looks absolutely stunning.

Link to comment
Share on other sites

21 minutes ago, alberro+ said:

So, when everything finally works for 1.9.1, I've got to install AVP, Kopernicus, EVE, and Scatterer? 

Seriously though, it looks absolutely stunning.

Yep.  And though I am not officially a member of the Kopernicus team (so I have no say so in this), I can safely say that if I were in charge, Kopernicus would be considered ready.  But I'm a  more bleeding edge type, so...  hehe, I get why they wait.

 

...Anyways:

RC6 is out with the following changes:

1.) OpenGL/dual camera mode support has been restored. That means *nix users can enjoy 1.9 scatterer, now, too.

Please specify your OS when posting bug reports, as always.

Now new bugs or performance impacts on Windows should result from this. File a report if you find any.

Grab at the usual spots:

https://github.com/R-T-B/Scatterer/releases

or my server:

http://glacialsoftware.net/ScattererBuilds/

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

1 hour ago, alberro+ said:

Is there any possibility of anything going wrong by installing? Will performance be affected too much with this? Sorry, it's just that after I tried the DX12 gizmo, my KSP bogged down. 

Scatterer in general is a performance hit, but running in DX12 is a far bigger one than scatterer.  Doing both is murder on your PC.  If you just swap the folders with my builds, and get rid of dx12, I think you'll find it runs far smoother than the old workaround.

Link to comment
Share on other sites

1 hour ago, R-T-B said:

Scatterer in general is a performance hit, but running in DX12 is a far bigger one than scatterer.  Doing both is murder on your PC.  If you just swap the folders with my builds, and get rid of dx12, I think you'll find it runs far smoother than the old workaround.

If you think i'm using DX12, you're insane. I tried it once and literally couldn't bare it. Moving on from that mess, I hope your fix turns out better.

What am I supposed to do to get this working? I see 6 things that say Release Candidate.

 

 

 

 

maybe im just dumb

Link to comment
Share on other sites

36 minutes ago, alberro+ said:

If you think i'm using DX12, you're insane. I tried it once and literally couldn't bare it. Moving on from that mess, I hope your fix turns out better.

What am I supposed to do to get this working? I see 6 things that say Release Candidate.

 

 

 

 

maybe im just dumb

Heh, newest release candidate is the best (I think we're at 6 now).  Release Candidate is a fancy way of saying beta, and newer = better.  We're pretty close to release-grade now.  The only buggy thing is terrain shadows.  You might want to turn those off (KSP provides it's own anyhow).

 

Just drop the folder in and merge with gamedata like any mod.  Delete any old scatterer first though, just to be safe.

 

EDIT:  OH!  Are you clicking "assets?"  Github hides the downloads on prereleases until you click that.

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

20 minutes ago, R-T-B said:

Heh, newest release candidate is the best (I think we're at 6 now).  Release Candidate is a fancy way of saying beta, and newer = better.  We're pretty close to release-grade now.  The only buggy thing is terrain shadows.  You might want to turn those off (KSP provides it's own anyhow).

 

Just drop the folder in and merge with gamedata like any mod.  Delete any old scatterer first though, just to be safe.

Why would I have the old Scatterer? :D  

I suppose i'd prefer waiting for the final release, I am quite a patient fellow. 

Link to comment
Share on other sites

36 minutes ago, alberro+ said:

Why would I have the old Scatterer? :D  

I suppose i'd prefer waiting for the final release, I am quite a patient fellow. 

If you want a bug free experience, there's no safer way to go.  Right now scatterers own terrain shadows glitch out like crazy, I just had to temporarily disable them (they can still be turned back on for testing, but most wouldn't want them) until we can fix them.  Glad KSP 1.9 at least offers SOME terrain shadows stock to replace them!

But yeah, the best experience will come officially.

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

I just released RC8.  Usual sources (github or my server).  Changelog follows.

RC8 is out with the following changes:

1.) Scatterer-shadows have been reenabled due to a new novel fix that renders them nearly completely bug free and far more performant than before! This fix involves adjusting the near clipping plane (basically you clip through walls slightly sooner, if you understand what that mean)... if this bothers you, you can always manually overrride it in your KSC settings, but it should be worth it to lose a tiny bit of foreground viewing space for fully functional shadows again.

Please specify your OS when posting bug reports, as always.

This is likely my last RC as I think that's the last bug. Prove me wrong! If you don't, I'll promote this to release on my feed soon!

 

Link to comment
Share on other sites

1 hour ago, R-T-B said:

I just released RC8.  Usual sources (github or my server).  Changelog follows.

RC8 is out with the following changes:

1.) Scatterer-shadows have been reenabled due to a new novel fix that renders them nearly completely bug free and far more performant than before! This fix involves adjusting the near clipping plane (basically you clip through walls slightly sooner, if you understand what that mean)... if this bothers you, you can always manually overrride it in your KSC settings, but it should be worth it to lose a tiny bit of foreground viewing space for fully functional shadows again.

Please specify your OS when posting bug reports, as always.

This is likely my last RC as I think that's the last bug. Prove me wrong! If you don't, I'll promote this to release on my feed soon!

 

I just wanna say thanks for your hard work. RC4 was working well for me but I didn't get to say anything before these new updates. I'm about to try RC8, but I'm not expecting any issues. 

The only issue I had was my sunflares of maar flare was not working at all in RC4. It was mostly working in the first dev build, only failing to appear when focused on my very large space station, but then it stopped working all together. I was playing around with the install a bit to fix it, so maybe I borked it, but Kabrams flares work fine, so IDK.

I will update with results from the latest build shortly.

EDIT: I definitely borked the maar flares. They have their own path. I may have just had a conflict with the scatterer flares. We'll see if I can get everything working correctly.

Edited by WallHaxx
bork
Link to comment
Share on other sites

Good news. I made a custom flare by using the maar textures and the kabrams config, and it seems to be working everywhere, including my problematic station.

I'm so happy :cool:

 

I still have a bit of odd flickering angular shadows on the ocean near the edge of the screen, and a bit of black terrain near the horizon at high altitudes. But I'm really not complaining. It's pretty standard fare for KSP at this point.

I'll try to get some pics.

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