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

You should reproduce the problem again. Then get your output_log.txt file (NOT ksp.log)

put it up for download (zip it up if necessary)

post the link here

Here is the link. I didn't see anything obvious in the log.

Edited by skykooler
forgot link
Link to comment
Share on other sites

Do you start getting those artifacts before 200km altitude?

I am running KSP 64bit on Linux Mint 17 and was getting something similar on my system. I also get the pink box on start up.

I have a i7-4790k, Nvidia Geforce 780. I'm using the Nvidia proprietary drivers with AA turned on driver side (since it doesn't work game side).

Link to comment
Share on other sites

I've been keeping a very close eye on this. It's excellent work all-round. Atmospheric scattering is something I've thought KSP was missing for a very long time. It gives you a really good sense of scale and just looks super good in general.

My only problem (aside from the obvious bugs) with it is that it looks a little odd at some angles. It looks great when you're at low altitude or on the ground, but from orbit it starts to get weird looking like in Climberfx's pictures with mountains rising above the atmosphere.

I wonder if it comes from the fact that Kerbin is at 1/10th scale and the atmosphere is equally weirdly represented on Kerbin and screwing up with the equations that assume a real life atmosphere. It's like the atmosphere ends a lot lower than it should, which maybe physically in the game it does, but it looks very weird having all those really dark mountain tops.

I guess it sort of can happen in real life, but it still doesn't look as jarring or dark as it does in KSP and the mod.

It also very dark overall, which is something that I think applies to basically all of Kerbal Space Program. I think I remember you saying that you were going to add some kind of configurable brightness modifier though, which should be fine.

Link to comment
Share on other sites

Quick, how do I disable the stock water? They're drawing on top of each other.

Q0GHXnh.jpg

- - - Updated - - -

I've been keeping a very close eye on this. It's excellent work all-round. Atmospheric scattering is something I've thought KSP was missing for a very long time. It gives you a really good sense of scale and just looks super good in general.

My only problem (aside from the obvious bugs) with it is that it looks a little odd at some angles. It looks great when you're at low altitude or on the ground, but from orbit it starts to get weird looking like in Climberfx's pictures with mountains rising above the atmosphere.

I wonder if it comes from the fact that Kerbin is at 1/10th scale and the atmosphere is equally weirdly represented on Kerbin and screwing up with the equations that assume a real life atmosphere. It's like the atmosphere ends a lot lower than it should, which maybe physically in the game it does, but it looks very weird having all those really dark mountain tops.

I guess it sort of can happen in real life, but it still doesn't look as jarring or dark as it does in KSP and the mod.

It also very dark overall, which is something that I think applies to basically all of Kerbal Space Program. I think I remember you saying that you were going to add some kind of configurable brightness modifier though, which should be fine.

You have it right, kerbin's scale is what's messing it up, compared to earth, kerbin is so small that it starts to curve before anything in the distance has gotten any blue and you can't see it anymore. So to get a similar effect on smaller distances the effect is turned up and the atmosphere has to be thicker. In the future I'll get around this by using a different config from otbit and fading between the two.

About the mountains sticking out of the atmosphere, that's because I've taken a 1:1 earth atmosphere and scaled it down and applied to kerbin, so what used to be an atmosphere height of 50 kms is now just 5kms, which means mountains are actually higher than the atmosphere. I've made a few other configs with a higher atmosphere and I guess I'll include one of them in the next version, they look the same from the ground and they still look too thick from orbit, but climbing up it feels like the atmosphere is higher and mountains no longer stick out of it. They have a few problems with "banding", where it looks like the colors aren't a smooth transition but form bands, which is why I didn't want to include them.

Edited by blackrack
Link to comment
Share on other sites

This! This mod is fantstic! I hope to see it worked on some more. A couple of things, it partially works in 1.0 the atmosphere shader disappears, and other shaders don't seem to work. I love the realistic lighting this gives.

Link to comment
Share on other sites

This! This mod is fantstic! I hope to see it worked on some more. A couple of things, it partially works in 1.0 the atmosphere shader disappears, and other shaders don't seem to work. I love the realistic lighting this gives.

I haven't checked if it works with 1.0 yet, I'm still working on the water shader and it has plenty of problems, so I wanted to first deal with those before adding another set of problems on top.

Link to comment
Share on other sites

Quick, how do I disable the stock water? They're drawing on top of each other.

http://i.imgur.com/Q0GHXnh.jpg

- - - Updated - - -

You have it right, kerbin's scale is what's messing it up, compared to earth, kerbin is so small that it starts to curve before anything in the distance has gotten any blue and you can't see it anymore. So to get a similar effect on smaller distances the effect is turned up and the atmosphere has to be thicker. In the future I'll get around this by using a different config from otbit and fading between the two.

About the mountains sticking out of the atmosphere, that's because I've taken a 1:1 earth atmosphere and scaled it down and applied to kerbin, so what used to be an atmosphere height of 50 kms is now just 5kms, which means mountains are actually higher than the atmosphere. I've made a few other configs with a higher atmosphere and I guess I'll include one of them in the next version, they look the same from the ground and they still look too thick from orbit, but climbing up it feels like the atmosphere is higher and mountains no longer stick out of it. They have a few problems with "banding", where it looks like the colors aren't a smooth transition but form bands, which is why I didn't want to include them.

I've done things like removing the mesh renderer:


if ( oceanMaterial != null && pqs.ChildSpheres.Length > 0)
{
PQS ocean = pqs.ChildSpheres[0];

pqsOceanContainer = new GameObject("PQSTangentAssigner");
pqsOceanContainer.transform.parent = ocean.transform;

keywords = ocean.surfaceMaterial.shaderKeywords;
originalOceanShader = ocean.surfaceMaterial.shader;

You might be able to disable it more (get rid of the vertex's entirely, but I'm not entirely sure how you'd go about doing that. I'd just replace the mesh renderer's shader with the one you are using with your ocean geometry and get rid of your geometry. That is what I do.

Link to comment
Share on other sites

I've done things like removing the mesh renderer:


if ( oceanMaterial != null && pqs.ChildSpheres.Length > 0)
{
PQS ocean = pqs.ChildSpheres[0];

pqsOceanContainer = new GameObject("PQSTangentAssigner");
pqsOceanContainer.transform.parent = ocean.transform;

keywords = ocean.surfaceMaterial.shaderKeywords;
originalOceanShader = ocean.surfaceMaterial.shader;

You might be able to disable it more (get rid of the vertex's entirely, but I'm not entirely sure how you'd go about doing that. I'd just replace the mesh renderer's shader with the one you are using with your ocean geometry and get rid of your geometry. That is what I do.

I figured I'll get rid of the stock water geometry since there seems to be something wrong with it and it's a huge performance hog, but I'll try both, thanks!

Link to comment
Share on other sites

I figured I'll get rid of the stock water geometry since there seems to be something wrong with it and it's a huge performance hog, but I'll try both, thanks!

Yeah, those vertex's are annoying. I tried (unsuccessfully) to rid myself of the geometry but couldn't. I think in 1.0 there has been some serious optimization though. I'd have to check, but I am almost certain that the ocean has been overhauled to reduce vertex count.

Link to comment
Share on other sites

I figured I'll get rid of the stock water geometry since there seems to be something wrong with it and it's a huge performance hog, but I'll try both, thanks!

You could try sending a private message to KasperVLD (community manager), or maybe even a developer directly

You may even get a feature down the line like Ferram got for the aero where a mod has a flag for the game which disables the native system entirely.

Link to comment
Share on other sites

I haven't checked if it works with 1.0 yet, I'm still working on the water shader and it has plenty of problems, so I wanted to first deal with those before adding another set of problems on top.

I Tried it in 1.0 It works but it has some artefacts. It seems that the atmosphere cut straight to black ( space ) around 30K or a bit higher. The loading is a Pink Square thing.

It seems that there is some sort of Wireframe skybox that form a 3d ball that is visible through everything. I haven't noticed anything else yet.

It's pretty cool though. Nice job!

Link to comment
Share on other sites

Some screenshots from tonight. I mostly avoided taking screenshots of areas with high mountains because aside from those it looks fantastic at all altitudes I was playing at tonight. I'm running PlanetShine and a SweetFX config to brighten up the game a bit from its normally strange dark lighting.

Javascript is disabled. View full album

This is one of my favorite mods in development right now. I can't give OP enough praise for how much better this makes the game look.

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