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

Scatterer

Scatterer is a graphical mod created primarily to add realistic atmospheric scattering to Kerbal Space Program.

The mod was subsequently extended with other graphical effects that add to the game's atmosphere and now covers the following:

  • Atmospheric scattering
  • Ocean shaders (with transparency, sky reflections, foam, refractions and underwater effects)
  • Better sunflare rendering
  • Godrays and terrain shadows
  • Visible eclipse shadows
  • Integration with EVE (clouds mod) to display effects and color changes on clouds

ceKm0WY.jpg

 

Images:

  Reveal hidden contents

Videos:

  Reveal hidden contents

Dev posts:

  Reveal hidden contents

UI:

UI can be toggled with Alt-F11 or Alt-F10

If that doesn't work try shift-alt-F10 or shift-alt-F11 

Documentation (work in progress):

https://github.com/LGhassen/Scatterer/wiki/GeneralConfig

https://github.com/LGhassen/Scatterer/wiki/PlanetsConfig

https://github.com/LGhassen/Scatterer/wiki/SunflaresConfig

Config tool:

  Reveal hidden contents

How to report Issues (important, please read if you want your issue taken into consideration):

  Reveal hidden contents

Known issues (important, please read before reporting/investigating issues):

  Reveal hidden contents

Changelogs:

  Reveal hidden contents

I do this in my spare time, if you like what I do you can support me here:

Patreon:

20TIHMv.png

Paypal:

hOMpXM5.gif

Download link:

http://spacedock.info/mod/141/scatterer

Alternate: https://github.com/LGhassen/Scatterer/releases

Config Tool links (for pre-0.0824 versions):

Windows: https://raw.githubusercontent.com/LGhassen/Scatterer/c17fe61a316d8e0e03b769ebc64741e1755ab2c4/configTool.zip

Linux: https://github.com/LGhassen/Scatterer/releases/download/0.1-mac-conftool/ConfigToolLinux.zip

Mac: https://github.com/LGhassen/Scatterer/releases/download/0.1-mac-conftool/MacConfTool.app.zip

Source:

https://github.com/blackrack/Scatterer

License:

GPLv3 plugin.

CC BY-NC-ND 4.0 shaders and configs.

Fanart corner:

  Reveal hidden contents

 

 

 

Edited by blackrack
Link to comment
Share on other sites

There are some atmospheric scattering effects in EVE (you can see them in Astronomer's pack), but this one looks promising because EVE will be dead in 1.0 most likely, as RBray is no longer interested in updating it it seems.

Link to comment
Share on other sites

  Ziw said:
There are some atmospheric scattering effects in EVE (you can see them in Astronomer's pack), but this one looks promising because EVE will be dead in 1.0 most likely, as RBray is no longer interested in updating it it seems.

*cough*unless Squad hired Rbray to stockify EVE for 1.0*cough*

Oh my.. sorry. Allergies. Tis the season.

Seriously though this is awesome. I hope the two can one day be combined.

Link to comment
Share on other sites

I found a temporary fix for the line artifacts, simply bump the visual settings down to "fast", this doesn't seem to affect KSP's visuals much but it disables shadows.

  Motokid600 said:
Seriously though this is awesome. I hope the two can one day be combined.

I don't see a reason why this wouldn't happen, I've already seen someone combining this with clouds.

Edited by blackrack
Link to comment
Share on other sites

  Thomas P. said:
Which components of the Atmosphere do you want to deactivate exactly? With this little function I threw together, you can deactivate the mesh-renderer for the atmosphere, but that results in a black "atmosphere" in the PQS-view.


public void DeactivateAtmosphere(string name)
{
Transform t = ScaledSpace.Instance.transform.FindChild(name);
for (int i = 0; i < t.childCount; i++)
{
if (t.GetChild(i).gameObject.layer == 9)
{
// Deactivate the Athmosphere-renderer
t.GetChild(i).gameObject.GetComponent<MeshRenderer>().gameObject.SetActive(false);

// Reset the shader parameters
Material sharedMaterial = t.renderer.sharedMaterial;
sharedMaterial.SetTexture(Shader.PropertyToID("_rimColorRamp"), null);
sharedMaterial.SetFloat(Shader.PropertyToID("_rimBlend"), 0);
sharedMaterial.SetFloat(Shader.PropertyToID("_rimPower"), 0);

// Stop our script
i = t.childCount + 10;
}
}
}

If you just want to modify the color of the rim (horizon), you have to manipulate the CelestialBody component. If you have questions, PM me :)

Thanks a lot, I'll try this code and experiment with it later today.

Right now my atmosphere renders as pitch black during the night, I can make it transparent below a certain threshold in order to be able to see the stars and the moon at night but the stock atmosphere effects end up messing with it during sunrise/sunset. I didn't know the stock atmosphere had components but I'll probably disable them all.

Anyway, if you're familiar with meshes, if I use a meshrenderer for my atmosphere I have a huge performance drop, everything starts running at 5 fps. What's the deal with this? I'm currently rendering my atmosphere with graphics.drawmesh to get around this. Also, there are the line artifacts described in the OP which go away when i drop the visual settings of the game to fast.

Link to comment
Share on other sites

I had posted about this in the texture replacer mod thread once, but it didn't seem like it would be possible via that mod.

I'm looking for a mod that can make less of the skybox visible while on the surface of a body with atmosphere and you are on the night side. My original idea was to use texture replacer to add a second skybox behind the first. The first one would contain gas clouds, nebulas, galaxies and other phenomenon that are not normally visible from within atmosphere. That layer would have it's alpha level dropped as you plunge into atmosphere, and vice versa. It should never reach 100% either, so that you can always see the same stars behind/through it.

Seems that my idea would require a plugin of it's own, which I have no idea how to write. Perhaps this is a feature you may want to explore.

Link to comment
Share on other sites

  Kartoffelkuchen said:
blackrack, could you please upload your preview version to another hoster? I can't reach MEGA for whatever reason.. :(

Here you go, I trimmed off the fat so this version should have better performance than the first.

http://s000.tinyupload.com/index.php?file_id=55191279612670720347

  Errol said:
I had posted about this in the texture replacer mod thread once, but it didn't seem like it would be possible via that mod.

I'm looking for a mod that can make less of the skybox visible while on the surface of a body with atmosphere and you are on the night side. My original idea was to use texture replacer to add a second skybox behind the first. The first one would contain gas clouds, nebulas, galaxies and other phenomenon that are not normally visible from within atmosphere. That layer would have it's alpha level dropped as you plunge into atmosphere, and vice versa. It should never reach 100% either, so that you can always see the same stars behind/through it.

Seems that my idea would require a plugin of it's own, which I have no idea how to write. Perhaps this is a feature you may want to explore.

I guess this is feasible, though I'm not personally interested in it I guess I could make it an optional feature or a separate mod once I'm done polishing up this one.

  Thomas P. said:
Im not really familiar with the meshes, but with the structure of the atmospheric components. :)

For the black pitch during night: Did you replaced the material with a material from scratch? If yes, renderQueue could be the problem. (Sorry, can't look at the source atm)

I just rendered a completely new mesh with it's own shader and material that occldue the old sky but didn't set any alpha transparency. I did this now but sill have to remove/tweak the old atmosphere and my messed up dx9 shader.

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