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

Yeah.  To be clear, this is a really hacky build.  I'm sure blackrack can do better.  I'm just trying to give us something in the interim to keep the needy people off his back.

It lacks caustics, too.  But again, it's better than what we had for 1.9.

Link to comment
Share on other sites

The DX12 workaround, at least for me, is practically useless. I value my frames and my visuals. The workaround ruins both my frames and visuals, so i'd rather wait for an update. However, I'm gonna try RTB's solution, and see how it goes.

Link to comment
Share on other sites

2 minutes ago, alberro+ said:

The DX12 workaround, at least for me, is practically useless. I value my frames and my visuals. The workaround ruins both my frames and visuals, so i'd rather wait for an update. However, I'm gonna try RTB's solution, and see how it goes.

Keep in mind I've only posted the source code.  The reasoning for this is so people who download it really have to think it out and know what they are getting into.

Pending either blackrack's approval or A LOT more testing, I may provide a binary.

Link to comment
Share on other sites

6 hours ago, R-T-B said:

For those who want to follow my source, and/or build it, I'd advise watching my pullrequest against blackracks work here:

https://github.com/LGhassen/Scatterer/pull/87

Can you or anyone else point me at the most basic explanation of how to compile this? I'm no stranger to fiddling with various code, but I'm no programmer and I've never compiled anything. Everything I've seen so far seems rather complicated up to the point that you click a 'compile' button. It's getting to that point that is eluding me. I've been waiting for this to be working properly for a month now and I'm starting to get a little crazy about it.

Link to comment
Share on other sites

1 hour ago, WallHaxx said:

Can you or anyone else point me at the most basic explanation of how to compile this? I'm no stranger to fiddling with various code, but I'm no programmer and I've never compiled anything. Everything I've seen so far seems rather complicated up to the point that you click a 'compile' button. It's getting to that point that is eluding me. I've been waiting for this to be working properly for a month now and I'm starting to get a little crazy about it.

At this point, I need testers, and I may just give you a binary.  PM me for a link with an understanding that I'd rather binaries not be distributed without blackracks expessive permission.

I need about oh...  say 10 testers to do this right. I have just one now, so 9 seats.  PM me to apply.

 

You'll be downloading this on the "pinky swear" promise to report bugs for my pull request to blackrack, and acknowledging they are very beta.  Sound good?

 

Current known bugs.)

1.)  Engine lighting mods cause weird light and shadow effects on planets, this may not be a scatterer bug at all but it happens with that mod combo.

2.) Nothing else yet?  I even got caustics and the old configs working (no config file hackery).

 

PS: If you really want to compile my code, the starting point would be on windows, to download visual studio community edition 2019, and give it the right reference paths to your KSP install.  Then, it should just compile.

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

6 hours ago, R-T-B said:

At this point, I need testers, and I may just give you a binary.  PM me for a link with an understanding that I'd rather binaries not be distributed without blackracks expessive permission.

I need about oh...  say 10 testers to do this right. I have just one now, so 9 seats.  PM me to apply.

 

You'll be downloading this on the "pinky swear" promise to report bugs for my pull request to blackrack, and acknowledging they are very beta.  Sound good?

 

Current known bugs.)

1.)  Engine lighting mods cause weird light and shadow effects on planets, this may not be a scatterer bug at all but it happens with that mod combo.

2.) Nothing else yet?  I even got caustics and the old configs working (no config file hackery).

 

PS: If you really want to compile my code, the starting point would be on windows, to download visual studio community edition 2019, and give it the right reference paths to your KSP install.  Then, it should just compile.

PM sent. And thanks for the tip. That actually sounds fairly simple. I'll keep it in mind if I need to compile something else.

Link to comment
Share on other sites

1 hour ago, Shadowscale said:

I'm still not allowed to pm anybody on this forum or do anything even though I've been here for years now -- can I get a compile of the fix for personal use?

You needed to post more. :)  You should now be past that anti-spam measure, though. 

Link to comment
Share on other sites

1 hour ago, Shadowscale said:

I'm still not allowed to pm anybody on this forum or do anything even though I've been here for years now -- can I get a compile of the fix for personal use?

PM will be sent in a second.  Same basic requests (report bugs to me, don't redistribute etc)

 

Not legally enforcable, just requests.

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

3 hours ago, R-T-B said:

PM will be sent in a second.  Same basic requests (report bugs to me, don't redistribute etc)

 

Not legally enforcable, just requests.

Alright, I'm still having the same sort of problems as before. No ocean on load, and the atmosphere disappears after switching to a ship in orbit. No sunflare in flight, yet it's there in map view, oddly. And in addition, kerbin looks extremely brown/tan in orbit (+no atmo) which I think is new/specific to your build.

I had managed to get the dll from your branch at first and I tried dropping it in my install and I had the same issues. I figured I needed some other part that wasn't compiled and reverted to the original. Oh, one other detail, when I tried that dll the ocean DID render, but it was almost completely black. It was clear in the shallows so I think it was just reflecting the totally black sky.

I tested the new build with and without eve, sve, and planetshine, but it didn't fix anything. I have way too many mods, so it could be a conflict. I will try and do a test on a new unmodded save shortly. Let me know if I can provide any more info.

Here's the brownness:

dcaaxfY.png

EDIT: My sunflare is not showing up on OpenGL in orbit either. Still shows in the map. I'm gonna try changing flares.

Edited by WallHaxx
new info
Link to comment
Share on other sites

33 minutes ago, WallHaxx said:

My sunflare is not showing up on OpenGL in orbit either.

You should not be using OpenGL or anyhting but DirectX 11 with these unified camera builds (this is the default in windows).  The old builds should work with OpenGL, in theory, but these will not.

I know, it sucks, but squad makes us use effectively two codepaths for OpenGL and DirectX now with the one/two camera system, and I can only personally manage to update this one.

As for your other bugs, I have not experienced them but there is an atmosphere transition issue I did see.  Please see what happens with a clean install when you get the chance, in DirectX 11 otherwise the report is useless (just remove any commandline things about OpenGL or directX12 and use the included configs in the zip to test).  Sorry I can't offer more but I'm doing the best I can with limited resources and understanding of the work here. :)

 

Also, these builds require no config fixes.  They should work with the stock config.  The only reason I can think of for that brownish terrain is that you are either using opengl or somehow have a config patch from earlier that is breaking something.

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

Ok people, I am happy with the state of things with my builds to the point that I feel I can temporarily support them and at least do some ahead-of-time bug gathering for blackrack.

I by no-means want to hijack his work.  He's still in charge:  I just want to help out while he's away.  He's free to reject all this later and start over if he wants, but I think we have a quality product here.  My beta testers have mainly reported issues with atmospheric transitions and shadow corruption in the near view, which I have been steadily trying to squash.  Please pay extra attention to visual defects you may spot in low Kerbin orbit or in near field shadows.  I think they are mostly eliminated but we want it just identical to the previous build if possible.

 

I'd like to open it to more testers.  With the understanding this is just beta, probably safe (no promises), but certainly not blackrack-release-grade, I am publically releasing my first release candidate.  Please post issues here as you please.

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

My Server: http://glacialsoftware.net/ScattererBuilds/

 

Understand, these are unified camera builds.  That means they will function in the Windows default mode of DirectX 11 ONLY.  No linux/mac builds at this time.  Honestly, the old scatterer should work there with my config fix, anyways.  If you are on windows, just don't force any weird things like opengl or d3d12 and you'll be fine.

Also, with these builds, my config fix is no longer needed.  Use normal configs!

EDIT:  RC2 is out with the following changes:

1.) Rather than statically setting the far clip plane, we set it based on planet radius using a scatterer facility.  This seems to not mess with shadows when zoomed out as much as on RC1, and eliminates that bug as far as I can tell.

Links updated.

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

5 hours ago, R-T-B said:

Ok people, I am happy with the state of things with my builds to the point that I feel I can temporarily support them and at least do some ahead-of-time bug gathering for blackrack.

I by no-means want to hijack his work.  He's still in charge:  I just want to help out while he's away.  He's free to reject all this later and start over if he wants, but I think we have a quality product here.  My beta testers have mainly reported issues with atmospheric transitions and shadow corruption in the near view, which I have been steadily trying to squash.  Please pay extra attention to visual defects you may spot in low Kerbin orbit or in near field shadows.  I think they are mostly eliminated but we want it just identical to the previous build if possible.

 

I'd like to open it to more testers.  With the understanding this is just beta, probably safe (no promises), but certainly not blackrack-release-grade, I am publically releasing my first release candidate.  Please post issues here as you please.

Download from my github:

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

Or my personal server:

http://glacialsoftware.net/scatterer0055RTBDEVRC2.zip

Understand, these are unified camera builds.  That means they will function in the Windows default mode of DirectX 11 ONLY.  No linux/mac builds at this time.  Honestly, the old scatterer should work there with my config fix, anyways.  If you are on windows, just don't force any weird things like opengl or d3d12 and you'll be fine.

Also, with these builds, my config fix is no longer needed.  Use normal configs!

EDIT:  RC2 is out with the following changes:

1.) Rather than statically setting the far clip plane, we set it based on planet radius using a scatterer facility.  This seems to not mess with shadows when zoomed out as much as on RC1, and eliminates that bug as far as I can tell.

Links updated.

Thank you so so so much for this!

I'm having some graphical glitches, it seems, however...

AURvjNO.png

As you can see, the shadows around the vessel look weird... Everything also looks particularly dark... The sky/water, however, look amazing!
Shadows are also jumpy...

I'm in 1.9.1 and using TU, AVP, EVE, DistantObject, EngineLightRelit, KopernicusExpansion, KS3P, PlanetShine, RealPlume, SmokeScreen, SunflaresOfMaar, and TR.

Edited by Vicinian
Link to comment
Share on other sites

21 minutes ago, Vicinian said:

Thank you so so so much for this!

I'm having some graphical glitches, it seems, however...

AURvjNO.png

As you can see, the shadows around the vessel look weird... Everything also looks particularly dark... The sky/water, however, look amazing!
Shadows are also jumpy...

I'm in 1.9.1 and using TU, AVP, EVE, DistantObject, EngineLightRelit, KopernicusExpansion, KS3P, PlanetShine, RealPlume, SmokeScreen, SunflaresOfMaar, and TR.

Seems there are still some issues with the near clip plain.  That's what causes the shadows glitch (in particular jumpiness).  Darn, I thought I had that hammered out.  Oh well.

I will look into it.  Standby for another Release Candidate, until then you can simply disable scatterer shadows and it is less noticeable.  Kerbal itself will still do its thing with shadows.

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

13 minutes ago, R-T-B said:

Seems there are still some issues with the near clip plain.  That's what causes the shadows glitch (in particular jumpiness).  Darn, I thought I had that hammered out.  Oh well.

I will look into it.  Standby for another Release Candidate, until then you can simply disable scatterer shadows and it is less noticeable.  Kerbal itself will still do its thing with shadows.

Sorry, how does one go about disabling Scatterer shadows? :confused: I know one can open the Scatterer menu with Alt+F10, but I cannot find an option for shadows...

As for how it looks for me right now without KS3P (which was causing the previous dark look and weird shadows around the craft), the only issue now is this flickering (both on the craft itself with its shadows, it seems, and in the background there).

EDIT: Never mind, option is only visible when in the KSC. :)

Edited by Vicinian
Link to comment
Share on other sites

RC3 is out with the following changes:

1.) Adjust the near/far clip plane ratio to attempt to fix near field shadow corruption (flickering and jumping). Please test and report. Also low atmospheric scenes should be tested, as adjusting these clip planes are known to affect low atmospheric flights in bad ways sometimes even if it fixes something else.

Links updated in orgin post and at github.  Also can grab at the following links (please use the latest and report what version when reporting bugs):

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

My Server: http://glacialsoftware.net/ScattererBuilds/

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

33 minutes ago, R-T-B said:

RC3 is out with the following changes:

1.) Adjust the near/far clip plane ratio to attempt to fix near field shadow corruption (flickering and jumping). Please test and report. Also low atmospheric scenes should be tested, as adjusting these clip planes are known to affect low atmospheric flights in bad ways sometimes even if it fixes something else.

Links updated in orgin post and at github.  Also can grab at the following links (please use the latest and report what version when reporting bugs):

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

My Server: http://glacialsoftware.net/scatterer0055RTBDEVRC3.zip

You're amazing. Thank you for doing this while Blackrack is away. :)

The flickering of the craft was fixed, but it seemed to still be happening on the buildings in the back. However, after I (exploded and then) reloaded, it somehow seemed to stop!

Either way, thank you!!! :D:wub:

Link to comment
Share on other sites

28 minutes ago, Vicinian said:

You're amazing. Thank you for doing this while Blackrack is away. :)

The flickering of the craft was fixed, but it seemed to still be happening on the buildings in the back. However, after I (exploded and then) reloaded, it somehow seemed to stop!

Either way, thank you!!! :D:wub:

Seems like that put us on the border of the fix, if not a complete fix.  I'll mess with it some more.  I need to ensure first it hasn't messed with low altitude transitions (this would occur as "cloud clipping" around 70,000m on Kerbin, you'll know it when you see it).

 

Thank you for testing!  This will only help blackrack work on more fun stuff when he gets back. :)  Afterall, I'm just doing an update, he knows the black magic that makes it pretty.

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

Hello all.  Another build.  RC4 is out.  This will probably be my last build until blackrack gets back barring a major buck report.

Here's the release log:

For DirectX 11 Windows Unified Camera mode only! (ksp default on windows)

RC4 is out with the following changes:

1.) Fix a rare cloud-clipping bug at high angles in low atmosphere.

Known bugs in this release (Will not fix without PR):

1.) The built in Scatterer shadows are jumpy/buggy, and disabled by default. Despite my best efforts I can only reduce this problem, not eliminate it, so I advise leaving them off. As KSP now provides it's own Terrain shadows, this is not such a big deal (actually, that may even be the source of the bug). The default settings are set to disable scatterer terrain shadows and I do not support changing that at this time.

Test and report back.

Download at github:

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

or from my server (grab the highest number)

http://glacialsoftware.net/ScattererBuilds/

Thanks all for the help debugging.  It's pretty usable now, minus the shadow glitch noted above, which I consider minor considering KSP implements terrain shadows now.

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

2 hours ago, R-T-B said:

Thanks all for the help debugging. 

Ok, I'm not in the audience for this one, but here's one for you : Thank you so much for your efforts and great job on this one !! <3

You, sir, deserve a statue next to the medical staff during our apocalypse ! (#secondDegree, even though I'm truly grateful for your work, and probably for your general awesomeness!)

Link to comment
Share on other sites

5 hours ago, R-T-B said:

Hello all.  Another build.  RC4 is out.  This will probably be my last build until blackrack gets back barring a major buck report.

 

Dude, it works like a dream.  I'm hitting more stable fps than I was in 1.8.1 or 1.7.3, or even 1.9.1 stock!  Stable.... not better..... just more steady.  lol.  I'm averaging 80 fps.... slowly adding my mods back besides this one to test their interaction and so far, I've got spectra, Eve, planetshine, real real physics extended, distant objects enhanced, and then a long list of others (total of 108).  80+ fps on average on ULTRA settings!  And the images are INSANE!  There are "minor" bugs I'm noticing but they aren't dipping my fps and they are mostly just there, not a big deal.  #1, when I hit about 200km above kerbin the clouds start to fade out and then a few hundred meters farther and it all loads properly again but it's the out of atmosphere map view type clouds after.  I'm pondering if that's either real physics, or extended range though honestly.  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.  I tried to screen capture it but they're short lived, and I didn't get a good enough view without a video.  I'm calling this golden.... I'm switching my career over to KSP 1.9.1 pending Kopernicus and quite happy.  I mean......... honestly I might do it tomorrow because I have yet to go past Jool.................. I'm en route to Laythe......... have yet to get far enough to warrant using the outer planets mod, which is sad but........... realistically it's going to be a while............ I can't for the life of me get past jool with any remaining delta V, and have not made it home from yet.............. don't tell me tricks, I've youtubed and I'll get there.  I have to learn this on my own sooner or later lmao.

Anyway, HUGE thanks.  Here's a teaser, my favorite view I've had in KSP to date just a few minutes ago....... AUGI5dE.png

The gallery for those images............. I'll add to it later on but for now..................................... Imagur, with the title saying everything needed to know about these images.

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