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

28 minutes ago, OrbitalManeuvers said:

what if I had a friend who didn't even know whether KSP was running in dx or opengl mode, and googled how to find out and came up empty? i can tell you that he's running a GTX980 on windows 10 and that he's clearly a noob.

If you're on windows and you're not going out of your way to do anything, you're on Directx 11, otherwise just check your KSP.log file (which is somewhere in the game's folder) and you'll see a line like this

SM: 50 (Direct3D 11.0 [level 11.1])

 

20 hours ago, Beetlecat said:

A quick / idle thought on dealing with the water motion and vessel recovery--- could the conditions be limited to landed/splashed and only slow/no horizontal speed, so a capsule bobbing up and down would still count as stationary? Not sure if that's a moddable game variable.

That's pretty much my current idea and what I'll try to do.

11 hours ago, evileye.x said:

Oh my god, this is amazing. @blackrack, you are amazing!

Everything I could dream of, including rescale fix! And even wiki!

I only hope my GTX1070 will not choke on this. 

I don't really care if vessel recovery from water will not be able at all - Coast Guard rescue for the win!

GTX 1070 should be fine, I'm on a 1080 at 1440p and get between 70-90 fps when not CPU-limited

Link to comment
Share on other sites

@blackrack, do you have any suggestions for using the generator tool to tweak altitudes?

 

im trying to (besides change atmo coloring slightly), get the atmosphere to be around twice the altitude it in in base scatterer.  Ive figured out how to mess with colors to a degree (its not quite what i want end result but ive gotten something close), but what i cannot figure out for the life of me is the altitude tweakeage (if its even possible in scatterer at all).

this is my xml output:

<?xml version="1.0" encoding="utf-8"?>
<config>
    <string name="Planet">Kerbin</string>
    <string name="Rg">6000000</string>
    <string name="Rt">6113206</string>
    <string name="RL">6115094</string>
    <vector3 name="BETA_R">
        <x>0.002</x>
        <y>0.02</y>
        <z>0.045</z>
    </vector3>
    <vector3 name="BETA_MSca">
        <x>0.004</x>
        <y>0.004</y>
        <z>0.004</z>
    </vector3>
    <string name="MIE_G">0.8</string>
    <string name="HR">10</string>
    <string name="HM">1.4</string>
    <string name="AVERAGE_GROUND_REFLECTANCE">0.1</string>
    <string name="atmosphereGlobalScale">1</string>
</config>

this is my kerbin.cfg:

Scatterer_atmosphere
{
	Atmo
	{
		name = Kerbin
		flattenScaledSpaceMesh = 0.600000024
		experimentalAtmoScale = 2
		cloudColorMultiplier = 3
		cloudScatteringMultiplier = 0.200000003
		cloudSkyIrradianceMultiplier = 0.0500000007
		volumetricsColorMultiplier = 1
		Rg = 600000
		Rt = 6113206
		RL = 6115094
		atmosphereGlobalScale = 1
		EVEIntegration_preserveCloudColors = False
		HR = 10
		HM = 1.4
		BETA_MSca = 0.004,0.004,0.004
		m_betaR = 0.002,0.02,0.045
		m_mieG = 0.8
		rimBlend = 20
		rimpower = 600
		specR = 8
		specG = 72
		specB = 65
		shininess = 25
		assetPath = scatterer/config/Planets/Kerbin/Atmo
		configPoints
		{
			Item
			{
				altitude = 200
				skyExposure = 0.25
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.230000004
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.0799999982
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0.0120000001
			}
			Item
			{
				altitude = 1000
				skyExposure = 0.25
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.230000004
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.100000001
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0
			}
			Item
			{
				altitude = 250000
				skyExposure = 0.200000003
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.200000003
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.100000001
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0
			}
		}
	}
}

this is what that setting looks like in the config tool:

I1uEHXp.png

and this is what the thing look like in game (atmosphere is way way way too large now...)

r9hPfM7.png

4G0gqHy.png

Is there any way to expand the size of the atmosphere at all in scatterer, or am i doing it wrong (i just took the default numbers from the generator tool and multiled the end digits by 2 to get twice the dia (in theory). 

 

Also, a bit unrelated, but i have 2 more questions since im working with trying to make my own scatterer atmo styles:

 

If it possible to smooth out the abrupt cloud line at all when integrated with EVE?

QNctY6Y.png

tMspjhr.png

1sExwTP.png

This isnt gamebreaking, but it would be really nice if there was some method to making it less blatantly stand out...

 

Finally, i doubt the answer is yes, but is there any way to make scatterer render a "dark" side layer at all like it could be done with EVE mod? 

y5y1ag1.png

I know its not realistic, but id just absolutely love to make the backside of a planet glow black like in the following screenshot (this was done in the old version of EVE from like 0.24-1.something).  Its an effect i would love to implement in my game (and i wouldnt mind using EVE to do it, but when scatterer cloud integration is enabled (something id love to be able to utilize), it doesnt differentiate between cloud and EVE based scattering fx layers (which are just a cloud layer with a blank texture set to be transparent).  I dont quite have high hopes of pulling this off (while still being able to utilize scaterer's cloud layer color shifting), but if there is a way to exclude certain layers from rendering with scatterer specifically it could be possible to hack it together somehow (assuming there is no method to make the backside of a planet black in scatter itself).

Edited by panzer1b
Link to comment
Share on other sites

51 minutes ago, panzer1b said:

@blackrack, do you have any suggestions for using the generator tool to tweak altitudes?

 

im trying to (besides change atmo coloring slightly), get the atmosphere to be around twice the altitude it in in base scatterer.  Ive figured out how to mess with colors to a degree (its not quite what i want end result but ive gotten something close), but what i cannot figure out for the life of me is the altitude tweakeage (if its even possible in scatterer at all).

this is my xml output:




<?xml version="1.0" encoding="utf-8"?>
<config>
    <string name="Planet">Kerbin</string>
    <string name="Rg">6000000</string>
    <string name="Rt">6113206</string>
    <string name="RL">6115094</string>
    <vector3 name="BETA_R">
        <x>0.002</x>
        <y>0.02</y>
        <z>0.045</z>
    </vector3>
    <vector3 name="BETA_MSca">
        <x>0.004</x>
        <y>0.004</y>
        <z>0.004</z>
    </vector3>
    <string name="MIE_G">0.8</string>
    <string name="HR">10</string>
    <string name="HM">1.4</string>
    <string name="AVERAGE_GROUND_REFLECTANCE">0.1</string>
    <string name="atmosphereGlobalScale">1</string>
</config>

this is my kerbin.cfg:




Scatterer_atmosphere
{
	Atmo
	{
		name = Kerbin
		flattenScaledSpaceMesh = 0.600000024
		experimentalAtmoScale = 2
		cloudColorMultiplier = 3
		cloudScatteringMultiplier = 0.200000003
		cloudSkyIrradianceMultiplier = 0.0500000007
		volumetricsColorMultiplier = 1
		Rg = 600000
		Rt = 6113206
		RL = 6115094
		atmosphereGlobalScale = 1
		EVEIntegration_preserveCloudColors = False
		HR = 10
		HM = 1.4
		BETA_MSca = 0.004,0.004,0.004
		m_betaR = 0.002,0.02,0.045
		m_mieG = 0.8
		rimBlend = 20
		rimpower = 600
		specR = 8
		specG = 72
		specB = 65
		shininess = 25
		assetPath = scatterer/config/Planets/Kerbin/Atmo
		configPoints
		{
			Item
			{
				altitude = 200
				skyExposure = 0.25
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.230000004
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.0799999982
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0.0120000001
			}
			Item
			{
				altitude = 1000
				skyExposure = 0.25
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.230000004
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.100000001
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0
			}
			Item
			{
				altitude = 250000
				skyExposure = 0.200000003
				skyAlpha = 1
				skyExtinctionTint = 1
				scatteringExposure = 0.200000003
				extinctionThickness = 1
				postProcessAlpha = 1
				postProcessDepth = 0.100000001
				extinctionTint = 0.5
				openglThreshold = 10
				viewdirOffset = 0
			}
		}
	}
}

this is what that setting looks like in the config tool:

and this is what the thing look like in game (atmosphere is way way way too large now...)

Is there any way to expand the size of the atmosphere at all in scatterer, or am i doing it wrong (i just took the default numbers from the generator tool and multiled the end digits by 2 to get twice the dia (in theory).

Also, a bit unrelated, but i have 2 more questions since im working with trying to make my own scatterer atmo styles:

If it possible to smooth out the abrupt cloud line at all when integrated with EVE?

This isnt gamebreaking, but it would be really nice if there was some method to making it less blatantly stand out...

Finally, i doubt the answer is yes, but is there any way to make scatterer render a "dark" side layer at all like it could be done with EVE mod?

I know its not realistic, but id just absolutely love to make the backside of a planet glow black like in the following screenshot (this was done in the old version of EVE from like 0.24-1.something).  Its an effect i would love to implement in my game (and i wouldnt mind using EVE to do it, but when scatterer cloud integration is enabled (something id love to be able to utilize), it doesnt differentiate between cloud and EVE based scattering fx layers (which are just a cloud layer with a blank texture set to be transparent).  I dont quite have high hopes of pulling this off (while still being able to utilize scaterer's cloud layer color shifting), but if there is a way to exclude certain layers from rendering with scatterer specifically it could be possible to hack it together somehow (assuming there is no method to make the backside of a planet black in scatter itself).

I've reworked the cloud shading so this wouldn't happen in the next update, although it's appearance will become linked to the altitude of the clouds and the thickness of the atmosphere.

For the config tool, I'm writing a wiki guide but I haven't gotten to that section yet.

For simply rescaling the config, no need to use the config tool, put the original config back, and increase the setting "experimentalAtmoScale" directly in the game's scatterer config, there is an example here in the wiki https://github.com/LGhassen/Scatterer/wiki/PlanetsConfig that should do what you want better than fiddling with the tool.

Rendering a fuzzier darkside by itself is not possible currently.

Edited by blackrack
Link to comment
Share on other sites

Added the ability to override the speed at which ship recovery is possible, to make recovery possible when the waves move the craft

Notice I have access to the recovery button at 5m/s, vs stock's 0.3 m/s

gt0hKCt.jpg

I have also been able to reduce the water's excessive drag, and increase the crash tolerance a bit, making seaplanes workable again, and boating a bit more of a pleasure.

Added proper atmosphere density and optical depth handling to godrays, minimizing this issue with massive craft shadows:

MKCTBG2.jpg

As well overly black godrays when looking to godrays extending to infinity at sunset:

rR6aOci.jpg

ybzcZud.jpg

Just a few more minor issues to solve before release

 

Edited by blackrack
Link to comment
Share on other sites

9 hours ago, mcbmaestro said:

Just keeps looking more and more amazing can't wait to try out the latest version!   Have you ever considered air and water particle effects, i.e. dust particles?

Thank you, I'm actually considering marine snow where individual particles can be lit by lights (this is less performance-intensive than it sounds):

marine%20snow_0.jpg?itok=F-lhU0ou

And an additional, separately configurable fog and dust shader that would be dynamic (ie can change with time, or weather, if I add the weather system for the ocean), kind of like outerra's:

fog3.png

fog5.png

The fog and dust would also support volumetric shadows, in the same way that godrays work. I think that dust like this would work better over the surface than particles.

These are still ideas at this point though.

Edited by blackrack
Link to comment
Share on other sites

Bug report: After updating Scatterer, my log was filled with "[ERR 15:07:10.048] RenderTexture.Create failed: width & height must be larger than 0", while simultaneously the FPS dropped significantly. I got this on the KSC screen and in flight.

log file | mod list

Notable mods: JNSQ, EVE-Redux, Kopernicus BE

KSP Version: 1.10.1

Edited by EchoLima
added mod list
Link to comment
Share on other sites

17 minutes ago, EchoLima said:

Bug report: After updating Scatterer, my log was filled with "[ERR 15:07:10.048] RenderTexture.Create failed: width & height must be larger than 0", while simultaneously the FPS dropped significantly. I got this on the KSC screen and in flight.

log file | mod list

Notable mods: JNSQ, EVE-Redux, Kopernicus BE

KSP Version: 1.10.1

Delete your old scatterer config and use the one included, sounds like you set unifiedCamShadowResolutionOverride to 0 or don't have long-distance shadows on but have godrays on

Edited by blackrack
Link to comment
Share on other sites

24 minutes ago, blackrack said:

Delete your old scatterer config and use the one included, sounds like you set unifiedCamShadowResolutionOverride to 0

I reinstalled Scatterer but got the same issue again. unifiedCamShadowResolutionOverride = 8192

Here's the config:

Quote

Scatterer_config
{
    autosavePlanetSettingsOnSceneChange = False
    disableAmbientLight = True
    integrateWithEVEClouds = True
    overrideNearClipPlane = False
    nearClipPlane = 0.209999993
    useOceanShaders = True
    shadowsOnOcean = True
    oceanSkyReflections = True
    oceanCaustics = True
    oceanLightRays = True
    oceanCraftWaveInteractions = True
    oceanCraftWaveInteractionsOverrideWaterCrashTolerance = True
    buoyancyCrashToleranceMultOverride = 3.5999999
    oceanCraftWaveInteractionsOverrideDrag = True
    buoyancyWaterDragScalarOverride = 1.5
    buoyancyWaterAngularDragScalarOverride = 0.000333300006
    oceanCraftWaveInteractionsOverrideRecoveryVelocity = True
    waterMaxRecoveryVelocity = 5
    oceanPixelLights = False
    fullLensFlareReplacement = True
    sunlightExtinction = True
    underwaterLightDimming = True
    showMenuOnStart = True
    useEclipses = True
    useRingShadows = True
    d3d11ShadowFix = True
    useGodrays = True
    terrainShadows = True
    unifiedCamShadowsDistance = 50000
    unifiedCamShadowNormalBiasOverride = 0
    unifiedCamShadowBiasOverride = 0
    unifiedCamShadowResolutionOverride = 8192
    unifiedCamShadowCascadeSplitsOverride = 0.00150000001,0.0149999997,0.150000006
    dualCamShadowsDistance = 50000
    dualCamShadowNormalBiasOverride = 0.720000029
    dualCamShadowBiasOverride = 0.5
    dualCamShadowResolutionOverride = 0
    dualCamShadowCascadeSplitsOverride = 0.00499999989,0.0250000004,0.125
    useDithering = True
    m_fourierGridSize = 256
}
 

Also, the log spam stops when in the SOI of a non-atmospheric body.

Link to comment
Share on other sites

18 minutes ago, EchoLima said:

I reinstalled Scatterer but got the same issue again. unifiedCamShadowResolutionOverride = 8192

Here's the config:

Also, the log spam stops when in the SOI of a non-atmospheric body.

Are your shadows off or something? In any case I don't know, and you have a lot of mods, so test with stock scatterer only first, and if that works normally put back mods till you find a conflict

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