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

On 12/19/2021 at 10:24 PM, miklkit said:

Checked ckan today and got some updates.  Mostly Scatterer and I think one EVE.  The update went normally and KSP runs ok.  The thing is that now the dark side of Kerbin is white.  Just wondering if this is a holidays theme.

I thought this too initially, but then it didn't make sense because the day side isn't covered with snow.

Link to comment
Share on other sites

4 hours ago, physius said:

I thought this too initially, but then it didn't make sense because the day side isn't covered with snow.

Yeah, I was trying to be tongue-in-cheek.   I just have basic mods like Scatterer, EVE, and Waterfall.

Link to comment
Share on other sites

14 minutes ago, miklkit said:

Yeah, I was trying to be tongue-in-cheek.   I just have basic mods like Scatterer, EVE, and Waterfall.

18 hours ago, SolarShield said:

There is currently a bug with the shader where the log spams missing "_MainTex" whenever Jool is loaded. I have tracked it down to the latest update. To replicate just zoom into jool on the Tracking Station.

Aaand fixed

 

Link to comment
Share on other sites

I am Running the latest scatterer build based on some AVP configs and distant objects.
I just noticed something I never actively saw before. Maybe it was always there but I only notice it now because the atmosphere seems to be larger or it is something that changed. Eve seems to be drawn on top of the atmosphere instead of behind it.

Is this caused by distant objects or scatterer? Can I do something about it?

 

tP1Ku6p.png

(you can also see Moho closer to the sun)

Edited by Alioth81
Link to comment
Share on other sites

@blackrack, it says on the Wiki that:

Generating precomputed atmospheric scattering tables

Since version 0.0824 you can just generate the atmosphere directly in-game, from the atmosphere tab in the UI.

Previous versions need to use the config tool to export atmosphere files.

... however, I presume that if you're implementing a Scatterer atmosphere on a new body, you still have to go through the process of generating the textures with the Proland tool, then prepopulating configs for the body to allow for the in-game GUI to then pick up a 'base' atmosphere for it to then adjust? Also, with the Proland tool textures now not being handled as they were previously, now being held in the ScattererAtmosphereCache folder, how do we distribute the custom textures for bodies?

Edited by Poodmund
Link to comment
Share on other sites

21 minutes ago, Poodmund said:

@blackrack, it says on the Wiki that:

Generating precomputed atmospheric scattering tables

Since version 0.0824 you can just generate the atmosphere directly in-game, from the atmosphere tab in the UI.

Previous versions need to use the config tool to export atmosphere files.

... however, I presume that if you're implementing a Scatterer atmosphere on a new body, you still have to go through the process of generating the textures with the Proland tool, then prepopulating configs for the body to allow for the in-game GUI to then pick up a 'base' atmosphere for it to then adjust? Also, with the Proland tool textures now not being handled as they were previously, now being held in the ScattererAtmosphereCache folder, how do we distribute the custom textures for bodies?

Hmm I detailed this in the changelog but didn't in the config tool section. So basically you don't need to pregenerate a texture or distribute any of the atmosphere cache files and you can completely forget about the proland tool.

For a new atmo you just create/ship the atmosphere .cfg and the .half is generated when needed on the end user's machine directly and reused from there. A unique .half is generated from the atmosphere params and indexed with a hash, so even if you rename a planet or modify the atmo .cfg externally it will always generate or use the right file.

Check out the .zip file scatterer comes in, there are no .half files included.

Edited by blackrack
Link to comment
Share on other sites

6 minutes ago, Poodmund said:

I thought as much. That's handy for distribution. :D

I guess that the easiest way to create new Scatterer atmospheres for bodies is to copy a default, rename the body identifier and then edit in game(?)

Pretty much, I copy kerbin's atmo then go ham

Link to comment
Share on other sites

On 12/21/2021 at 5:13 PM, Alioth81 said:

I am Running the latest scatterer build based on some AVP configs and distant objects.
I just noticed something I never actively saw before. Maybe it was always there but I only notice it now because the atmosphere seems to be larger or it is something that changed. Eve seems to be drawn on top of the atmosphere instead of behind it.

Is this caused by distant objects or scatterer? Can I do something about it?

 

tP1Ku6p.png

(you can also see Moho closer to the sun)

i have the same issue i thought it was me 

Link to comment
Share on other sites

18 hours ago, blackrack said:

Pretty much, I copy kerbin's atmo then go ham

I've noticed that when in the in-game GUI in the Atmosphere tab, when I change the 'Thicken' values and click 'Go', it adjusts the Rayleigh and Mie scattering RGB values respectively. Is this button just a multiplier box to make adjusting those values easier if you want to increase or decrease all the RGB values together?

Link to comment
Share on other sites

1 hour ago, Poodmund said:

I've noticed that when in the in-game GUI in the Atmosphere tab, when I change the 'Thicken' values and click 'Go', it adjusts the Rayleigh and Mie scattering RGB values respectively. Is this button just a multiplier box to make adjusting those values easier if you want to increase or decrease all the RGB values together?

Yep, and there is a rescale button which increases the height scales but decreases the colors accordingly to rescale while keeping the same overall thickness.

Link to comment
Share on other sites

I see. Whats the best way to reduce the opacity of the Scatterer atmosphere whilst retaining the brightness of the body below? I think I ran into this issue last time wherein as you tried to reduce the effect, for a very thin atmosphere, it would artificially darken the body a lot.

Link to comment
Share on other sites

21 minutes ago, Poodmund said:

I see. Whats the best way to reduce the opacity of the Scatterer atmosphere whilst retaining the brightness of the body below? I think I ran into this issue last time wherein as you tried to reduce the effect, for a very thin atmosphere, it would artificially darken the body a lot.

Got any screenshots of the body you're working on and your settings?

Just use thicken with a value below 1 until you're happy. But remember that a very thin atmo can't have nice sunset colors.

For stock planets like Kerbin and Laythe I found that the base scaled textures don't have enough brightness or contrast to look good out of the box even with a thinner atmo, I added some controls to fix that ingame, don't remember what I called them but you'll find them in the last big changelog.

Edited by blackrack
Link to comment
Share on other sites

Anybody has issues with custom Sunflares ?  Trying to use the Sunflares of Maar  but somehow I do not see it in the game at all.   And when I click alt+F10  to check in game via Scatterer the sunflare settings there is nothing to edit...

Ok I am using AVP , I checked it from top to bottom and there is no config that is messing with sunflares.   Moved to check the Sunflares of Maar config and I think, could there be missing the file name like Sunflare.png or someting like this in the config ?     Or maybe, I read in the Sunflares of Maar topic that somebody had problems with Scatterer and B9PartSwitch, but as far as I know this was fixed already. 

@Scatterer_sunflare:AFTER[scatterer]
{
	author = JadeOfMaar
	// Config for Canaan sunflare
	@Sun
	{
		%assetPath = SunflaresOfMaar/Stock/Canaan
		%flareSettings = 0.6,1,0.6
		%spikesSettings = 0.5,1,0.4
		%sunGlareFadeDistance = 500000
		
		!ghost1SettingsList1 {}
		!ghost1SettingsList2 {}
		!ghost2SettingsList1 {}
		!ghost2SettingsList2 {}
		!ghost3SettingsList1 {}
		!ghost3SettingsList2 {}
		
		ghost1SettingsList1
		{
			Item = 0.3,0.56,0.92,0.95
		}
		
		ghost2SettingsList1
		{
			Item = 0.4,1,36,-0.3
			Item = 0.4,1,48,0.3
			Item = 0.1,1,24,0.4
			Item = 0.15,1,6,0.6
		}
		
		ghost2SettingsList2
		{
			Item = 0.1,1,12,1.45
		}
		
		ghost3SettingsList1
		{
			Item = 0.3,1,24,-0.45
			Item = 0.3,1,48,-0.33
			Item = 0.3,1,48,0.33
			Item = 0.15,1,24,0.45
		}
		
		ghost3SettingsList2
		{
			Item = 0.15,1,6,0.75
			Item = 0.1,1,12,1.5
		}
	}
}

 

OK somehow I was able to see now in game the Scatterer settings for sun and looks like it is not loading the files from SunflaresOfMaar/Stock/Canaan but from normal scatterer folder hmm :

Sun
{
	syntaxVersion = 2
	flareColor = 1.0,1.0,1.0
	assetPath = SunflaresOfMaar/Stock/Canaan
	flareSettings = 0.6,1,0.6
	spikesSettings = 0.5,1,0.4
	sunGlareFadeDistance = 500000
	flares
	{
		Item
		{
			texture = scatterer/config/Sunflares/Sun/sunFlare.png
			displayAspectRatio = 1
			scaleCurve
			{
				key = 1 5 0 -0.200
				key = 55 1.05 -0.007 -0.0012
				key = 2500 0.2 0 0
			}
			intensityCurve
			{
				key = 2 0.0 0 0
				key = 11 0.6 0 0
			}
		}
		Item
		{
			texture = scatterer/config/Sunflares/Sun/sunSpikes.png
			displayAspectRatio = 1
			scaleCurve
			{
				key = 1 5 0 -0.200
				key = 55 1.05 -0.007 -0.0012
				key = 2500 0.0 0 0
			}
			intensityCurve
			{
				key = 2 0.0 0 0
				key = 11 0.6 0 0
			}
		}
	}
	ghosts
	{
		Item
		{
			texture = scatterer/config/Sunflares/Sun/Ghost1.png
			intensityCurve
			{
				key = 2 0.0 0 0
				key = 11 1 0 0
				key = 500 1 0 0
				key = 2500 0 0 0
			}
			instances
			{
				Item
				{
					intensityMultiplier = 0.54
					displayAspectRatio = 0.65
					scale = 0.434
					sunToScreenCenterPosition = 0.5
				}
				Item
				{
					intensityMultiplier = 0.54
					displayAspectRatio = 1
					scale = 0.166
					sunToScreenCenterPosition = 0.7
				}
			}
		}
		Item
		{
			texture = scatterer/config/Sunflares/Sun/Ghost2.png
			intensityCurve
			{
				key = 2 0 0 0
				key = 11 1 0 0
				key = 500 1 0 0
				key = 2500 0 0 0
			}
			instances
			{
				Item
				{
					intensityMultiplier = 0.135
					displayAspectRatio = 1
					scale = 0.333
					sunToScreenCenterPosition = 0.9
				}
				Item
				{
					intensityMultiplier = 0.054
					displayAspectRatio = 1
					scale = 0.125
					sunToScreenCenterPosition = 1.1
				}
				Item
				{
					intensityMultiplier = 0.054
					displayAspectRatio = 1
					scale = 0.25
					sunToScreenCenterPosition = 1.3
				}
				Item
				{
					intensityMultiplier = 0.054
					displayAspectRatio = 1
					scale = 0.2
					sunToScreenCenterPosition = 1.5
				}
			}
		}
	}
	ghost1SettingsList1
	{
		Item = 0.3,0.56,0.92,0.95
	}
	ghost2SettingsList1
	{
		Item = 0.4,1,36,-0.3
		Item = 0.4,1,48,0.3
		Item = 0.1,1,24,0.4
		Item = 0.15,1,6,0.6
	}
	ghost2SettingsList2
	{
		Item = 0.1,1,12,1.45
	}
	ghost3SettingsList1
	{
		Item = 0.3,1,24,-0.45
		Item = 0.3,1,48,-0.33
		Item = 0.3,1,48,0.33
		Item = 0.15,1,24,0.45
	}
	ghost3SettingsList2
	{
		Item = 0.15,1,6,0.75
		Item = 0.1,1,12,1.5
	}
}

 

Edited by Jovzin
update
Link to comment
Share on other sites

20 hours ago, blackrack said:

Got any screenshots of the body you're working on and your settings?

Info in spoiler :D 

Spoiler

Without Scatterer atmosphere:

3Ux1wn9.png

With Scatterer atmosphere:

nsw4JTg.png

xZlII7V.png

Bbld12P.png

Scatterer_atmosphere
{
	Atmo
	{
		name = Thatmo
		atmosphereStartRadiusScale = 1
		HR = 3
		HM = 0.8
		m_betaR = 0.0027,0.006,0.014
		BETA_MSca = 0.02,0.02,0.02
		m_mieG = 0.1
		averageGroundReflectance = 0.2
		Rg = 286000
		Rt = 320000
		RL = 320001
		multipleScattering = True
		godrayStrength = 0.7
		flattenScaledSpaceMesh = 0
		rimBlend = 20
		rimpower = 600
		specR = 20
		specG = 20
		specB = 30
		shininess = 50
		cloudColorMultiplier = 1
		cloudScatteringMultiplier = 0.5
		cloudSkyIrradianceMultiplier = 0.4
		volumetricsColorMultiplier = 1
		EVEIntegration_preserveCloudColors = False
		adjustScaledTexture = False
		scaledLandBrightnessAdjust = 1
		scaledLandContrastAdjust = 1
		scaledLandSaturationAdjust = 1
		scaledOceanBrightnessAdjust = 1
		scaledOceanContrastAdjust = 1
		scaledOceanSaturationAdjust = 1
		configPoints
		{
			Item
			{
				altitude = 0
				skyExposure = 0.1
				skyAlpha = 0.4
				skyExtinctionTint = 0.5
				scatteringExposure = 0.06
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.65
				extinctionTint = 0
			}
		}
	}
}


Link to comment
Share on other sites

@Jovzinthose configs are outdated, ask in the associated thread, and please spoiler that wall of config next time.

4 hours ago, Poodmund said:

Info in spoiler :D 

  Reveal hidden contents

Without Scatterer atmosphere:

3Ux1wn9.png

With Scatterer atmosphere:

nsw4JTg.png

xZlII7V.png

Bbld12P.png

Scatterer_atmosphere
{
	Atmo
	{
		name = Thatmo
		atmosphereStartRadiusScale = 1
		HR = 3
		HM = 0.8
		m_betaR = 0.0027,0.006,0.014
		BETA_MSca = 0.02,0.02,0.02
		m_mieG = 0.1
		averageGroundReflectance = 0.2
		Rg = 286000
		Rt = 320000
		RL = 320001
		multipleScattering = True
		godrayStrength = 0.7
		flattenScaledSpaceMesh = 0
		rimBlend = 20
		rimpower = 600
		specR = 20
		specG = 20
		specB = 30
		shininess = 50
		cloudColorMultiplier = 1
		cloudScatteringMultiplier = 0.5
		cloudSkyIrradianceMultiplier = 0.4
		volumetricsColorMultiplier = 1
		EVEIntegration_preserveCloudColors = False
		adjustScaledTexture = False
		scaledLandBrightnessAdjust = 1
		scaledLandContrastAdjust = 1
		scaledLandSaturationAdjust = 1
		scaledOceanBrightnessAdjust = 1
		scaledOceanContrastAdjust = 1
		scaledOceanSaturationAdjust = 1
		configPoints
		{
			Item
			{
				altitude = 0
				skyExposure = 0.1
				skyAlpha = 0.4
				skyExtinctionTint = 0.5
				scatteringExposure = 0.06
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.65
				extinctionTint = 0
			}
		}
	}
}

 

I think you should probably get rid of that configPoint, the values are mismatched and all over the place for scattering and extinction, and they garble what you can do with the generation. Just copy the configPoint of stock Kerbin as it's neutral, your atmo will suddenly look thicker, then use the thicken modifier in atmo tab to make it thinner until you're happy, that should get you what you want.

I'd recommend no longer modifying the configpoint settings now but keeping them at the neutral/default settings, as these are not physically correct and will get janky results, only use when absolutely necessary ;)

Edited by blackrack
Link to comment
Share on other sites

  • 2 weeks later...
On 1/10/2022 at 1:48 AM, Big Katz said:

Any word on a fix for jool/lindor for JNSQ? I know that a previous release of scatterer works but then you lose some other features. Don't know if its a scatterer problem or JNSQ problem.  Thankyou for this great mod regardless.

tt

It’s a JNSQ problem - the configs aren’t updated for the new scatterer version, though someone has in either this thread or the JNSQ one posted basic configurations that are.

Link to comment
Share on other sites

Just pushed a small update restoring compatibility with 1.9.x 1.10.x 1.11.x, alongside 1.12.x, as well as compatibility with systems not supporting 3D textures (mostly old integrated graphics).

14 hours ago, Stolas said:

how do I change the color of the kerbin?

Alt-f11 -> Atmosphere tab, and no need to write in a big font

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