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

Hmmmm, I'm on Linux so I hadn't updated yet as I knew it wasn't likely going to work properly, but I decided that I'd have a play and see if I could fix any issues and I've come across something strange.

I was mucking about with the settings trying to work out what does what, hitting Rebuild Ocean after each change, but I've noticed reverting each setting individually and rebuilding doesn't actually return it to the original artefacts. So then I tried just clicking "Rebuild Ocean" without changing anything and it seems to rebuild with different artefacts each time. Usually around 7/8 rebuilds gives the most artefact free ocean and one time I got a completely artefact free ocean, although I have also had the best ocean either initially or after 2 or 3 rebuilds. Usually around 17+ rebuilds things get more violent (larger blocky waves) but it also breaks into a series of grids and other funky things. It doesn't seem to recover but I haven't tried beyond about 35 rebuilds.

In addition, pressing either Load Ocean* or Load Backup and Rebuild doesn't repair the damage. Exiting the scene and re-entering seems to revert the ocean allowing for another test.

* Loading the ocean shouldn't be messed up as I haven't pressed Save Ocean at all.

/edit:  And here is a picture boys and girls:

Pn5uQuG.png

Edited by GrugInAus
Added dodgy picture as example
Link to comment
Share on other sites

21 minutes ago, GrugInAus said:

Hmmmm, I'm on Linux so I hadn't updated yet as I knew it wasn't likely going to work properly, but I decided that I'd have a play and see if I could fix any issues and I've come across something strange.

I was mucking about with the settings trying to work out what does what, hitting Rebuild Ocean after each change, but I've noticed reverting each setting individually and rebuilding doesn't actually return it to the original artifacts. So then I tried just click "Rebuild Ocean" without changing anything and it seems to rebuild with different artifacts each time. Usually around 7/8 rebuilds gives the most artifact free ocean and one time I got a completely artifact free ocean, although I have also had the best ocean either initially or after 2 or 3 rebuilds. Usually around 17+ rebuilds things get more violent (larger blocky waves) but it also breaks into a series of grids and other funky things. It doesn't seem to recover but I haven't tried beyond about 35 rebuilds.

In addition, pressing either Load Ocean* or Load Backup and Rebuild doesn't repair the damage. Exiting the scene and re-entering seems to revert the ocean allowing for another test.

* Loading the ocean shouldn't be messed up as I haven't pressed Save Ocean at all.

/edit:  And here is a picture boys and girls:

When you press rebuild ocean it saves your current settings, it says that in the UI. Sometimes you may press laod backup and still get a messed-up ocean, well I don't really know what happens, GPUs are complicated, each one is different and there are many variables in play that affect the rendering, plus the ocean and the rendering technique used are complicated as **** (it's the price of good performance) and there's a lots of space for stuff to go wrong. Hopefully in time I will figure this out.

Edited by blackrack
Link to comment
Share on other sites

3 minutes ago, GrugInAus said:

@blackrack Is the rebuilt ocean stored anywhere other than RAM, and would it be possible/useful to analyse it when I get one without artefacts?

Not sure what you want "stored" exactly, the settings? The ocean in itself only "exists" in the GPU, it's generated there from the settings you supply and animated there.

Link to comment
Share on other sites

21 minutes ago, blackrack said:

When you press rebuild ocean it saves your current settings, it says that in the UI. Sometimes you may press laod backup and still get a messed-up ocean, well I don't really know what happens, GPUs are complicated, each one is different and there are many variables in play that affect the rendering, plus the ocean and the rendering technique used are complicated as **** (it's the price of good performance) and there's a lots of space for stuff to go wrong. Hopefully in time I will figure this out.

Yes, I realise that it saves the settings. My point is without changing any settings, just loading the dialog and pressing the Rebuild button (without changing anything from the defaults) I get different artefacts every time and usually around the 7th time (although sometimes the 2nd or 3rd) I get an ocean without artefacts. After rebuilding it around 17+ times it goes completely funky (as per pic) and never recovers.

This makes me think that there is a variable that is being retained rather than the Rebuild being freshly from the settings supplied in the config.

7 minutes ago, blackrack said:

Not sure what you want "stored" exactly, the settings? The ocean in itself only "exists" in the GPU, it's generated there from the settings you supply and animated there.

Yeah, I was meaning the computed ocean. Was wondering about the possibility of parsing the computed ocean to try to establish why the artefacts exist some times but not others from the same input values, but if its only runtime in the GPU then of course that won't work.

Link to comment
Share on other sites

48 minutes ago, GrugInAus said:

Yes, I realise that it saves the settings. My point is without changing any settings, just loading the dialog and pressing the Rebuild button (without changing anything from the defaults) I get different artefacts every time and usually around the 7th time (although sometimes the 2nd or 3rd) I get an ocean without artefacts. After rebuilding it around 17+ times it goes completely funky (as per pic) and never recovers.

This makes me think that there is a variable that is being retained rather than the Rebuild being freshly from the settings supplied in the config.

Yeah, I was meaning the computed ocean. Was wondering about the possibility of parsing the computed ocean to try to establish why the artefacts exist some times but not others from the same input values, but if its only runtime in the GPU then of course that won't work.

Yep it won't work. But there are no variables being retained, each time you press rebuild the once is completely destroyed and a new one is rebuilt from the saved settings (this is why it saves your ocean every time), settings are saved in oceanSettings.cfg but you won't find anything of interest in it. It's just a random bug.

Link to comment
Share on other sites

19 hours ago, Hyomoto said:

While everyone eagerly awaits some more voodoo wizardry I think it's worth pointing out you can roll back to 21c and turn off the oceans to pretty much enjoy scatterer in it's original form.

Sound advice at least for Linux/OpenGL users. Thanks.

The .021 version is good also in that it seems to load faster than .0191 (which was the previous one that worked correctly for me), or is at least much better at hiding the loading delay. It seems that with .021, pop-in of the scattering effects at scene changes occurs much less if at all, which makes me happy :)

On a side note, on .0215, I'm getting the glitchy "half planet clouds" in orbit with the new EVE (the issue mentioned and screenshotted by visivante some pages back), but on .021 this glitch does not occur. Posting this in hopes it may help in narrowing down the cause.

The same version observation applies to the sunflare being rendered in orbit even though it is well behind the lithosphere, but I think this issue being new in .0215 has already been confirmed by others.

Finally, as another data point for an already reported bug, for me the ocean fails to render if the craft (actually camera?) is higher than ~20m from the sea level (as per the stock altimeter), and even then most of the screen area covered by the ocean renders as black. Playing around with the settings (including m_resolution) had no effect. KSP 1.0.5 Linux 64-bit, OpenGL, NVidia. Just throwing this out there, because the maximum altitude seems unusually low (I've been following this thread for a while and I think I've only seen one report with such low altitude), as does having most of the screen area of the ocean covered by one large artifact (instead of the more common "seaweed" type which consists of separate black strips).

So, going with .021 for now, although I have to say the atmo scale feature of .0215 is very nice. The new rescaled atmosphere looks excellent, especially with clouds from EVE. The darker blue region above the cloud layer (as per new EVE defaults) in the new version of Scatterer is just wonderful.

Link to comment
Share on other sites

4 minutes ago, Technologicat said:

.0215, I'm getting the glitchy "half planet clouds" in orbit with the new EVE (the issue mentioned and screenshotted by visivante some pages back), but on .021 this glitch does not occur. Posting this in hopes it may help in narrowing down the cause.

This is an EVE issue. Should have a new release with a fix soon.

Link to comment
Share on other sites

What is the command to put into PlanetsList to save a change in the ocean render queue? I tried oceanrenderqueue = but that doesn't work. I saw it on a page a while ago but can't find it now. The search function in these forums is useless (or maybe I am). 

Edit: Ignore this, its definitely me that's useless.

It's oceanRenderQueue just in case anyone else is wondering.

Edited by mreadshaw
Link to comment
Share on other sites

On 12/7/2015, 9:55:21, blackrack said:

Disabling it is definitely not an option anymore for me.

Perhaps not :P  but for the rest of us it's either that or close our eyes and pretend real hard like, or maybe I'm the only one who prefers the stable part of the mod!  I mean, I didn't even bother trying the mod out until 21 because as pretty as it is, a stable and consistent play experience is far more valuable to me than the extra visual effects.  KSP is super fun to play but what it lacks in graphics, it lacks double, maybe triple in soundscape.  I have more mods for adding sound to the game than I do visual improvements at this point.  To me, Collision FX has done just as much to improve the visuals as EVE or Scatterer but it most certainly gets nowhere near the recognition, and it adds much needed audio to boot!

I think I may have drifted a bit there.  The atmospheric scattering in 21 seems to work to a degree that means I can leave it on without experiencing horrible experience thrashing bugs, and while the ocean shaders are nothing short of beautiful, they have a ways to go before they are good for much more than pimping screenshots.  Mind this is no complaint, I'm glad I can finally try out scatterer.

Link to comment
Share on other sites

Hey Blackrack, so been testing ocean shader on RSS and when it works it's unbelievably gorgeous; seeing textuyre fidelity that high in RSS is truly refreshing and really makes you feel like you're flying fast and high! However, the shader only work intermittently, I get the black checker/grid bug thing usually on load, everytime I rebuild the ocean shader in the GUI the amount of this bug changes, sometimes it is totally gone. I tried adjusting the load queue but this didn't seemt o influence it.

Also I love the foam effect, but when I increase it so it looks right below POV it builds up incredibly suddenly in the distance producing a white wall around you. I see there are some variables that influence the anistropic filtering for foam but I couldn't figure if these were helping or not? Here's a screen shot: 

wQIv4TG.png

Not sure if you know about this already, but just thought I'd let you know.
Also thanks for all the new variables for controlling the atmosphere and for mitigating opengl bugs! :)

 

EDIT: Reading through previous posts and OP I see the ocean black bug has already been mentioned my bad!

Edited by pingopete
Link to comment
Share on other sites

11 hours ago, blackrack said:

Just put hasOcean=false in all the planet settings

Spoiler

m_foamAnsio = 9
m_foamMipMapBias = -2
m_whiteCapStr = 0.1
WAVE_CM = 0.23
WAVE_KM = 370
AMP = 1
m_ansio = 2
m_windSpeed = 5
m_omega = 0.84
m_fourierGridSize = 128
m_varianceSize = 2
m_oceanUpwellingColor = 0.001,0.0039,0.01178
m_oceanLevel = 0
m_resolution = 4
oceanAlpha = 0.95
oceanDisableAltitude = 70000
hasOcean=false

But this in every oceansettings file and still get oceans :(

 

Using v 215

Link to comment
Share on other sites

2 hours ago, pingopete said:

Hey Blackrack, so been testing ocean shader on RSS and when it works it's unbelievably gorgeous; seeing textuyre fidelity that high in RSS is truly refreshing and really makes you feel like you're flying fast and high! However, the shader only work intermittently, I get the black checker/grid bug thing usually on load, everytime I rebuild the ocean shader in the GUI the amount of this bug changes, sometimes it is totally gone. I tried adjusting the load queue but this didn't seemt o influence it.

Also I love the foam effect, but when I increase it so it looks right below POV it builds up incredibly suddenly in the distance producing a white wall around you. I see there are some variables that influence the anistropic filtering for foam but I couldn't figure if these were helping or not? Here's a screen shot: 

wQIv4TG.png

Not sure if you know about this already, but just thought I'd let you know.
Also thanks for all the new variables for controlling the atmosphere and for mitigating opengl bugs! :)

 

EDIT: Reading through previous posts and OP I see the ocean black bug has already been mentioned my bad!

For the foam I'm very well aware of this problem and I get the foam wall myself, sadly the settings don't really help against this, I'm looking into it and will try to fix it.

 

10 minutes ago, Aegrim said:
  Hide contents

m_foamAnsio = 9
m_foamMipMapBias = -2
m_whiteCapStr = 0.1
WAVE_CM = 0.23
WAVE_KM = 370
AMP = 1
m_ansio = 2
m_windSpeed = 5
m_omega = 0.84
m_fourierGridSize = 128
m_varianceSize = 2
m_oceanUpwellingColor = 0.001,0.0039,0.01178
m_oceanLevel = 0
m_resolution = 4
oceanAlpha = 0.95
oceanDisableAltitude = 70000
hasOcean=false

But this in every oceansettings file and still get oceans :(

 

Using v 215

Sorry, I meant in the planetsList file.

Link to comment
Share on other sites

1 hour ago, blackrack said:

For the foam I'm very well aware of this problem and I get the foam wall myself, sadly the settings don't really help against this, I'm looking into it and will try to fix it.

 

Sorry, I meant in the planetsList file.

awesome thanks!

Link to comment
Share on other sites

4 hours ago, blackrack said:

For the foam I'm very well aware of this problem and I get the foam wall myself, sadly the settings don't really help against this, I'm looking into it and will try to fix it.

IMO the easiest potion would be to  stop rendering it after certain distance. Ocean color may need to be adjusted tho to be slightly whiter.

Link to comment
Share on other sites

3 hours ago, sashan said:

IMO the easiest potion would be to  stop rendering it after certain distance. Ocean color may need to be adjusted tho to be slightly whiter.

What I'm hoping is that the fancy rendered ocean can be replaced by something similar to the map view ocean. As is the planet looks a little strange between 70000-140000ish m where there's just nothing. I think it basically should probably switch over to a prerendered(?) version somewhere around 40000m.

Link to comment
Share on other sites

39 minutes ago, mreadshaw said:

What I'm hoping is that the fancy rendered ocean can be replaced by something similar to the map view ocean. As is the planet looks a little strange between 70000-140000ish m where there's just nothing. I think it basically should probably switch over to a prerendered(?) version somewhere around 40000m.

It's planned, let me finish fiddling with something else first.

Edited: Btw I hope you guys have quad-core CPUs.

Edited by blackrack
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...