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

8 minutes ago, MrMeeb said:

Really love the mod, but I've been using quite an old version of it (pre ocean shaders and multi planet support) because I much prefer the shading it adds to the continents, as you can see in the album (second photo is from the version I use). I've tried tweaking every value I can see and I've also had a small look at making my own atmosphere, but I couldn't seem to be able to make the changes I wanted. Is there a way to get back that old shading? 

Thanks :)

What exactly is this "old shading" you're talking about? The only difference I can see is that the second screenshot has a lower extinction or extinction tint value, maybe experiment with those?

 

11 hours ago, sashan said:

Iv'e just noticed that setting SCREENSHOT_SUPERSIZE = 2 in settings file of the game disables ocean in screenshots. Is it possible to fix? The screenshots look so nice with that setting.

No fix for this currently, and tbh probably there won't be.

 

On 1/15/2016 at 6:44 AM, Talavar said:

 @blackrack Not exactly sure why, maybe this has been addressed before, but when I get close to jool, I drop to 1 frame per 4 seconds. Removed scatterer, and no problems. Any solution to this?

Ah yes, I haven't got around to attempt to fix this. This is causes by gas giants, just disable jool from the planetsList file and everything will be back to normal.

 

On 1/14/2016 at 11:33 AM, Sigma88 said:

@blackrack I have a question for you, is it possible to change the settings of scatterer using Module Manager?

I have a rescale mod and a couple of recolor mods that I would like to make compatible with scatterer, if that's even possible

It's not possible right now. I'm thinking about it or a similar system though.

 

On 1/13/2016 at 3:08 PM, sashan said:

Found one more bug, if you happen to have a part with flag transform underwater then the flag itself is visible through water, i.e. drawn on top of it. At least under dx11. Very nasty looking bug. I guess you're drawing ocean in the same layer as the craft or with same properties?

Also, atmosphere effects start 5 pixels above the horizon. Looks really weird. 

It may just seem to me, or is the scatterer "fog" not drawn over its ocean?

You can see all the bugs here, right bottom for flag and left for horizon.
 

For the 5 pixels above the horizon, there's a setting in the UI, it's called experimental view offset or seomthing like that, play with it. For the flag, I will fix it later. The fog is indeed drawn over the ocean though, you can toggle postprocessing on and off and see how it is.

 

On 1/13/2016 at 2:14 AM, Noblejms said:

I am having a problem with this mod (it is nonetheless fantastic though, can't play without it now!). When flying up, I can see horizontal thin black lines at the edge of the horizon.  It's like a thin border.  Digging through old posts here, people seem to refer to it as the "antialising problem".  The thing is that there are too many different feedbacks on this problem.  Some say it can't be fixed, some say to enable DirectX 11, some say to use stock anti-aliasing, and some say enable Nvidia anti-aliasing and disable stock anti-aliasing.  

What is the most updated solution to the think black line caused by anti-aliasing?  Thank you guys!

There are multiple causes for this, in some video modes it may go away over terrain but still remains on the edge between ocean and horizon. Doesn't really have a fix for now that won't cause other problems. Though in the future I'm planning to build the scattering effects directly in the terrain shader, and other than some other new effects this should allow, it should fix the black lines on the edges.

Link to comment
Share on other sites

19 minutes ago, blackrack said:

What exactly is this "old shading" you're talking about? The only difference I can see is that the second screenshot has a lower extinction or extinction tint value, maybe experiment with those?

That's what will make the continents go more browny? Okay, I'll have a look :)

Thanks!

Link to comment
Share on other sites

52 minutes ago, MrMeeb said:

That's what will make the continents go more browny? Okay, I'll have a look :)

Thanks!

It should be, originally I introduced extinction with no way to tweak it, then I introduced extinction tint but it had a bug and was working differently, after that I fixed the bug and it's been the version included since then.

Edited: Hmm, what's this? Possible planetshine/multiple light sources?

 

 

Sorry for bad compression.

Edited by blackrack
Link to comment
Share on other sites

1 hour ago, blackrack said:

It's not possible right now. I'm thinking about it or a similar system though.

thank you,

if you are open to suggestions, the best thing (at least for me) would be having a way to check the parameters and change them easily.

like the new EVE config structure.

this way I can avoid putting files in my mod that will overwrite yours or stuff like that

Link to comment
Share on other sites

Possible water reflections on laythe's nightside/twilight:

 

 

Notice I'm now getting the water artifacts everyone has been complaining about for a while, maybe now I could debug and fix them.

 

5 minutes ago, Sigma88 said:

thank you,

if you are open to suggestions, the best thing (at least for me) would be having a way to check the parameters and change them easily.

like the new EVE config structure.

this way I can avoid putting files in my mod that will overwrite yours or stuff like that

I will take a look at EVE's config structure, I admit I haven't been putting much thought into usability or ease of access so far.

Link to comment
Share on other sites

17 minutes ago, blackrack said:

I will take a look at EVE's config structure, I admit I haven't been putting much thought into usability or ease of access so far.

well, I've taken a look at your configs, and I think it should be enough to do something like this:

Spoiler

SCATTERER
{
	Body
	{
		name = Kerbin
		Settings
		{
			forceOFFaniso = False
			displayInterpolatedVariables = True
			experimentalAtmoScale = 2
			sunglareScale = 1
			mapExtinctionMultiplier = 3
			mapExtinctionTint = 0.5
			mapSkyExtinctionRimFade = 1
			MapViewScale = 0.998
			postProcessMaxAltitude = 160000
			mapExposure = 0.09
			mapSkyRimExposure = 0.13
			mapAlphaGlobal = 1
			Rg = 600000
			Rt = 608490.4
			RL = 608632.1
			atmosphereGlobalScale = 1
			AVERAGE_GROUND_REFLECTANCE = 0.1
			HR = 10
			HM = 1.2
			BETA_MSca = 0.004,0.004,0.004
			m_betaR = 0.0058,0.0135,0.0331
			m_mieG = 0.78
			rimBlend = 20
			rimpower = 600
			specR = 85
			specG = 85
			specB = 85
			shininess = 75
			configPoints
			{
				Item
				{
					altitude = 200
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.12
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 20
					edgeThreshold = 0.1
					viewdirOffset = -0.012
				}
				Item
				{
					altitude = 1000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.15
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 200
					edgeThreshold = 0.3
					viewdirOffset = 0
				}
				Item
				{
					altitude = 5000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.2
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
				Item
				{
					altitude = 55000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.5
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 1
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
				Item
				{
					altitude = 160000
					skyAlpha = 1
					skyExposure = 0.11
					skyRimExposure = 0.15
					postProcessAlpha = 0.95
					postProcessDepth = 2.4
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 3
					skyExtinctionTint = 0.5
					skyextinctionRimFade = 1
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
			}
		}
		Ocean
		{
			m_foamAnsio = 9
			m_foamMipMapBias = -2
			m_whiteCapStr = 0.1
			m_farWhiteCapStr = -0.2
			choppynessMultiplier = 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 = 4
			m_oceanUpwellingColor = 0.001,0.0039,0.01178
			m_oceanLevel = 0
			m_resolution = 4
			oceanAlpha = 0.9
			alphaRadius = 1000
			fakeOceanAltitude = 15000
		}
	}
}

I don't know anything about coding, so doing this may be more difficult than I imagine, or there might be better way to do it.

but I think you get the general idea :)

 

thank you for taking the time to answer me :)

Edited by Sigma88
Link to comment
Share on other sites

6 minutes ago, Sigma88 said:

well, I've taken a look at your configs, and I think it should be enough to do something like this:

  Hide contents



SCATTERER
{
	Body
	{
		name = Kerbin
		Settings
		{
			forceOFFaniso = False
			displayInterpolatedVariables = True
			experimentalAtmoScale = 2
			sunglareScale = 1
			mapExtinctionMultiplier = 3
			mapExtinctionTint = 0.5
			mapSkyExtinctionRimFade = 1
			MapViewScale = 0.998
			postProcessMaxAltitude = 160000
			mapExposure = 0.09
			mapSkyRimExposure = 0.13
			mapAlphaGlobal = 1
			Rg = 600000
			Rt = 608490.4
			RL = 608632.1
			atmosphereGlobalScale = 1
			AVERAGE_GROUND_REFLECTANCE = 0.1
			HR = 10
			HM = 1.2
			BETA_MSca = 0.004,0.004,0.004
			m_betaR = 0.0058,0.0135,0.0331
			m_mieG = 0.78
			rimBlend = 20
			rimpower = 600
			specR = 85
			specG = 85
			specB = 85
			shininess = 75
			configPoints
			{
				Item
				{
					altitude = 200
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.12
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 20
					edgeThreshold = 0.1
					viewdirOffset = -0.012
				}
				Item
				{
					altitude = 1000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.15
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 200
					edgeThreshold = 0.3
					viewdirOffset = 0
				}
				Item
				{
					altitude = 5000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.2
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 0
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
				Item
				{
					altitude = 55000
					skyAlpha = 1
					skyExposure = 0.25
					skyRimExposure = 0.25
					postProcessAlpha = 0.95
					postProcessDepth = 0.5
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 1
					skyExtinctionTint = 1
					skyextinctionRimFade = 1
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
				Item
				{
					altitude = 160000
					skyAlpha = 1
					skyExposure = 0.11
					skyRimExposure = 0.15
					postProcessAlpha = 0.95
					postProcessDepth = 2.4
					postProcessExposure = 0.23
					skyExtinctionMultiplier = 3
					skyExtinctionTint = 0.5
					skyextinctionRimFade = 1
					openglThreshold = 800
					edgeThreshold = 0.5
					viewdirOffset = 0
				}
			}
		}
		Ocean
		{
			m_foamAnsio = 9
			m_foamMipMapBias = -2
			m_whiteCapStr = 0.1
			m_farWhiteCapStr = -0.2
			choppynessMultiplier = 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 = 4
			m_oceanUpwellingColor = 0.001,0.0039,0.01178
			m_oceanLevel = 0
			m_resolution = 4
			oceanAlpha = 0.9
			alphaRadius = 1000
			fakeOceanAltitude = 15000
		}
	}
}

I don't know anything about coding, so doing this may be more difficult than I imagine, or there might be better way to do it.

but I think you get the general idea :)

 

thank you for taking the time to answer me :)

Does this make it compatible with module manager?

Link to comment
Share on other sites

26 minutes ago, blackrack said:

Possible water reflections on laythe's nightside/twilight:

Looks really nice,  but could you make them more subtle?  IMO they are too bright.
Also, does it mean it would be possible to have reflections from every light source in game, like searchlights?

4 minutes ago, blackrack said:

Does this make it compatible with module manager?

Yes, it does - MM can edit such nodes.

Link to comment
Share on other sites

7 minutes ago, sashan said:

Looks really nice,  but could you make them more subtle?  IMO they are too bright.
Also, does it mean it would be possible to have reflections from every light source in game, like searchlights?

This is just for testing right now so they are pretty bright, but of course they'll be configurable. Though I imagine light from Jool should still be relatively bright.

Every light source in game, not sure if it's feasible or if it's worth it performance-wise right now.

Edited by blackrack
Link to comment
Share on other sites

25 minutes ago, blackrack said:

Does this make it compatible with module manager?

I'm not sure how it works, MM can definitely edit those values, but I don't know if you need to load them in a different way than you do now...

Edited by Sigma88
Link to comment
Share on other sites

1 minute ago, Sigma88 said:

I'm not sure how it works, MM can definitely edit those values, but I don't know if you need to load them in a different way than you do now...

give me a sec I'll check out something

I was just talking about the format that MM can edit. Alright, looks easy enough.

Link to comment
Share on other sites

3 minutes ago, Thomas P. said:

MM can edit everything that is loaded as a ConfigNode from GameDatabase. (GameDatabase.Instance.GetConfigs()) :) The best thing is to use generic node names, and put all variables into the node. (So not KERBIN { <stuff> } but BODY { name = Kerbin <stuff> }).
You need to write a parser for the nodes, since unlike the XML stuff from KSP.IO, they have no generic loading, and they aren't reflection based (so a List<T> isn't converted to a seperate node automatically. You could either do everything on your own, or use the Kopernicus Parser (https://github.com/Kopernicus/Kopernicus/tree/master/Kopernicus/Configuration/Parser) - or any other way you come up with.

- Thomas

Thanks, I'll probably just use the Kopernicus Parser. Thanks a lot!

 

12 minutes ago, Proot said:

Multiple lights/reflections is like finally put KSP at the graphical height of SpaceEngine.

Congratulations Blackrack, is a truly remarcable hit!!

I still have many more ideas in mind, so wait for it ;)

Edited by blackrack
Link to comment
Share on other sites

23 hours ago, blackrack said:

Possible water reflections on laythe's nightside/twilight:

 

 

Notice I'm now getting the water artifacts everyone has been complaining about for a while, maybe now I could debug and fix them.

 

I will take a look at EVE's config structure, I admit I haven't been putting much thought into usability or ease of access so far.

Holy freaking moses!! Don't stop bro!! :o :D

Link to comment
Share on other sites

Seem to be experiencing a bug where this large blue thing appears. It seemed to be brought on by timewarping (using Better Timewarp's Hyperwarp), but then persisted when I stopped. It only happened when in the corner of view, and when it became more centred it was then fixed

 

 

Link to comment
Share on other sites

7 minutes ago, MrMeeb said:

Seem to be experiencing a bug where this large blue thing appears. It seemed to be brought on by timewarping (using Better Timewarp's Hyperwarp), but then persisted when I stopped. It only happened when in the corner of view, and when it became more centred it was then fixed

I think you are experiencing the bug @Poodmund described here

On 16/1/2016 at 1:19 AM, Poodmund said:

To expand on my report listed further up, I have done the following.

Reproduced on Vanilla install with only latest EVE build installed and with 1 Cloud Layer around Kerbin. I set up a single Mk1 Pod module at around 165,000m altitude on a Sub-Orbital trajectory, quit then re-loaded the game, this is when the logs start from.

The craft is at 165km and the cloud layer is visible, hits 160km and it disappears, then continues until 55km when it pops back into view again. I let the pod crash down, returned to Space Center then quit out of the game.

Logs: http://pastebin.com/iMnhiBWp

I think the "blue" thing you are seeing is the kerbin texture (and it's blue because there is only ocean under that)

Link to comment
Share on other sites

2 minutes ago, Sigma88 said:

I think you are experiencing the bug @Poodmund described here

I think the "blue" thing you are seeing is the kerbin texture (and it's blue because there is only ocean under that)

I reproduced that bug with *ONLY* EVE installed however, Scatterer was not installed.

Link to comment
Share on other sites

6 minutes ago, Poodmund said:

I reproduced that bug with *ONLY* EVE installed however, Scatterer was not installed.

that was my point, I don't think it has nothing to do with scatterer.

EVE clouds disappear inside a certain altitude range.

what I think you see in @MrMeeb pics is the camera being at different altitudes compared to different points of the planet (if that makes any sense)

so the right part of the planet is closer than the disappearing range so the clouds are rendered, the left part is more far away than the disappearing range.

the blue part is inside the distance range where the clouds disappear, so you don't see them

Link to comment
Share on other sites

32 minutes ago, Sigma88 said:

that was my point, I don't think it has nothing to do with scatterer.

EVE clouds disappear inside a certain altitude range.

what I think you see in @MrMeeb pics is the camera being at different altitudes compared to different points of the planet (if that makes any sense)

so the right part of the planet is closer than the disappearing range so the clouds are rendered, the left part is more far away than the disappearing range.

the blue part is inside the distance range where the clouds disappear, so you don't see them

Would that occur with the old version of EVE, pre-overhaul? 

Link to comment
Share on other sites

On 16.01.2016 at 2:28 PM, blackrack said:

Notice I'm now getting the water artifacts everyone has been complaining about for a while, maybe now I could debug and fix them.

I also get them from time to time, rebuilding ocean always helps.

 

Also, I'm getting this bug. Notice how large part of seabed is painted blue but it reverts back to usual color in the distance.
YU4HSRe.png

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