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

For your information only, just to make you aware these exist.

KSP: 1.3.1.1891

Problem: error messages still present

Mods installed: 120+

Reproduction steps: run game, errors appear just after selecting which game to resume from game fresh start.

Log: https://www.dropbox.com/s/d6mdhz80b63rj0s/saves for Scatterer.1.output_log.txt?dl=0

error messages:

Spoiler

InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.First[LandClassScatter] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.First[LandClassScatter] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
  at Kopernicus.Components.Scatter.Start () [0x00000] in <filename unknown>:0
 

Spoiler

Scatterer celbody Laythe
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

IndexOutOfRangeException: Array index is out of range.
  at scatterer.Core.removeStockOceans () [0x00000] in <filename unknown>:0
  at scatterer.Core.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelLoaded(Int32)
AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

Spoiler

[Scatterer] Error calling clouds2d.reassign() on planet: Kerbin Exception returned: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[System.Object]].get_Item (System.String key) [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.toggleScaledMode () [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0
  at scatterer.Manager.Update () [0x00000] in <filename unknown>:0
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0
 

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.UpdateStuff () [0x00000] in <filename unknown>:0
  at scatterer.UpdateOnCameraPreCull.OnPreCull () [0x00000] in <filename unknown>:0

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.toggleScaledMode () [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0
  at scatterer.Manager.Update () [0x00000] in <filename unknown>:0
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0

 

Link to comment
Share on other sites

15 hours ago, TheKurgan said:

Please disregard, it isn't caused by any of the above mods, it is being caused by something with Physics range extender and vessel mover... when I move a vessel or even cover terrain fast in a fast jet, this flickering happens... the effects just seem to be amplified by the mods I mentioned above.

good to know, I was wondering the same but never took the time to really hunt it down

Link to comment
Share on other sites

1 hour ago, Drew Kerman said:

good to know, I was wondering the same but never took the time to really hunt it down

So you have seen this before? I was still wondering if something on my end may be causing it... everyone I mod test with use BDArmory with Physics Range Extender and Vessel Mover, but they do not seem to suffer from the same flickering.

It's driving me crazy... with Scatterer, SVE, EVE, and SVT installed, the effect is severely pronounced.

With no visual mods installed, it's noticable, but not like in the vid I posted.

Edited by TheKurgan
Link to comment
Share on other sites

3 hours ago, TheKurgan said:

So you have seen this before? I was still wondering if something on my end may be causing it... everyone I mod test with use BDArmory with Physics Range Extender and Vessel Mover, but they do not seem to suffer from the same flickering.

It's driving me crazy... with Scatterer, SVE, EVE, and SVT installed, the effect is severely pronounced.

With no visual mods installed, it's noticable, but not like in the vid I posted.

20 hours ago, TheKurgan said:

Anyone know what could be causing my flickering?

Newest versions of SVE, Scatterer SVT, EVE, and Kopernicus.

This doesn't look like it's caused by scatterer. Possibly the effect is more pronounced when you have a higher framerate.

19 hours ago, Unturned_Fighter said:

KSP: 1.3.1.1891

Problem: The planet always appears as a white ball with 0 texture on the main menu and in map mode.

Mods installed: Scatterer + Galileo's Planet Pack (+ other possibly unrelated mods)

Reproduction steps: Unknown - this was not an issue on a previous install. Best possible steps are to install GPP + Scatterer

Log: At this link

 

EDIT: It appears this white sphere completely replaces the planetary texture.

EDIT NO. 2: It appears this sphere also replaces the texture of every  body. This includes the star (Ciro).

Please provide versions for scatterer and GPP, maybe also test without scatterer and search for any duplicate scatterer.dll files in your GameData folder. Scatterer doesn't load any effects in the main menu and shouldn't impact it in any way.

10 hours ago, Apaseall said:

For your information only, just to make you aware these exist.

KSP: 1.3.1.1891

Problem: error messages still present

Mods installed: 120+

Reproduction steps: run game, errors appear just after selecting which game to resume from game fresh start.

Log: https://www.dropbox.com/s/d6mdhz80b63rj0s/saves for Scatterer.1.output_log.txt?dl=0

error messages:

  Reveal hidden contents

InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.First[LandClassScatter] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.First[LandClassScatter] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
  at Kopernicus.Components.Scatter.Start () [0x00000] in <filename unknown>:0
 

  Reveal hidden contents

Scatterer celbody Laythe
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

IndexOutOfRangeException: Array index is out of range.
  at scatterer.Core.removeStockOceans () [0x00000] in <filename unknown>:0
  at scatterer.Core.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelLoaded(Int32)
AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

  Reveal hidden contents

[Scatterer] Error calling clouds2d.reassign() on planet: Kerbin Exception returned: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[System.Object]].get_Item (System.String key) [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0

  Reveal hidden contents

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.toggleScaledMode () [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0
  at scatterer.Manager.Update () [0x00000] in <filename unknown>:0
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0
 

  Reveal hidden contents

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.UpdateStuff () [0x00000] in <filename unknown>:0
  at scatterer.UpdateOnCameraPreCull.OnPreCull () [0x00000] in <filename unknown>:0

  Reveal hidden contents

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.SkyNode.toggleScaledMode () [0x00000] in <filename unknown>:0
  at scatterer.SkyNode.UpdateNode () [0x00000] in <filename unknown>:0
  at scatterer.Manager.Update () [0x00000] in <filename unknown>:0
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0

  Reveal hidden contents

NullReferenceException: Object reference not set to an instance of an object
  at scatterer.Core.Update () [0x00000] in <filename unknown>:0

 

Unless your game is affected, ignore these.

Link to comment
Share on other sites

1 hour ago, blackrack said:

This doesn't look like it's caused by scatterer...

Yes, I realized this through the systematic removal of all mods until I found the culprits.

Initially I thought it may have been related to scatterer, but when I figured out that it was not, I replied with:

Quote

Please disregard, it isn't caused by any of the above mods, it is being caused by something with Physics range extender and vessel mover... when I move a vessel or even cover terrain fast in a fast jet, this flickering happens... the effects just seem to be amplified by the mods I mentioned above.

Just wondering if maybe some of you experts may have some insight... swear it's going to give me seizures. 

 

Link to comment
Share on other sites

22 hours ago, Unturned_Fighter said:

KSP: 1.3.1.1891

Problem: The planet always appears as a white ball with 0 texture on the main menu and in map mode.

Mods installed: Scatterer + Galileo's Planet Pack (+ other possibly unrelated mods)

Reproduction steps: Unknown - this was not an issue on a previous install. Best possible steps are to install GPP + Scatterer

Log: At this link

 

EDIT: It appears this white sphere completely replaces the planetary texture.

EDIT NO. 2: It appears this sphere also replaces the texture of every  body. This includes the star (Ciro).

You need to replicate this with a minimal install. Basic GPP and it’s included visual pack. I would do a fresh install before you go testing. This means removing all mods and starting from scratch. 

Also, you are using contracts packs that do not work with GPP, like Giving Airplanes a Purpose. This is causing ALOT of null ref spam in your logs. I noticed you have some SETI mods installed as well. I didn’t read enough to see if you gave SETI contracts, but it does not work with GPP either. Read the GPP Info linked in the OP to find out which contract packs are compatible.

it also looks like you are using multiple life support mods. That’s a no no, as they are using the same resources in some cases and have different rates of use. 

Edited by Galileo
Link to comment
Share on other sites

4 minutes ago, Dafni said:

Thanks again for this awesome mod @blackrack I appreciate it a lot.

For certain screenshots that lens flare bothers me a bit though. Is there a way to disable just this lens effect without getting rid of the whole sun flare?

Thanks in advance

-Daf

Just create 3 black textures and replace the ghost textures with them. They can be 1x1 px 

Edited by Galileo
Link to comment
Share on other sites

3 minutes ago, Galileo said:

Just create 3 black textures and replace the ghost textures with them. They can be 1x1 px 

Thank you @Galileo. It sounds so easy when you say it :D

px is pixel, I assume. So you say I take a black pixel from somewhere, find those ghost textures in the scatterer texture folder, and replace them with my pixel? I could try to do this indeed, just a bit hesitant as I never created textures or messed with the internals of any mod in any way yet.

What would happen if we just delete those ghost textures?

And, wouldnt a black texture in this place give me still some sort of ghosted out black planes?

Thanks again for your help, it is greatly appreciated

Link to comment
Share on other sites

14 minutes ago, Dafni said:

Thank you @Galileo. It sounds so easy when you say it :D

px is pixel, I assume. So you say I take a black pixel from somewhere, find those ghost textures in the scatterer texture folder, and replace them with my pixel? I could try to do this indeed, just a bit hesitant as I never created textures or messed with the internals of any mod in any way yet.

What would happen if we just delete those ghost textures?

And, wouldnt a black texture in this place give me still some sort of ghosted out black planes?

Thanks again for your help, it is greatly appreciated

Yep you can just find any black texture on google if it helps. Just make 3 copies and rename them to match the 3 ghost textures and replace them in the sun flare folder

Link to comment
Share on other sites

Hey lads, i can confirm aswell that weird shadow flickering is caused by ''Physics range extender''. Deleted the mod and problem dissapeared. Ain't sure about above mentioned ''vessel mover'', haven't tried.

P.S hope someone can find solution to the problem and share :) All the best

Link to comment
Share on other sites

I fixed a minor but long-standing issues where trees appear behind the postprocessing and underwater "fog" doesn't apply to fairings.

 

Trees before:

v07ZVP2.jpg

Trees after:

NNOu5dS.jpg

Fairings before:

r6HG2RN.jpg

Fairings after:

ciFTqrq.jpg

 

For any brave kerbonauts wanting to try the fix early here is the dev version:

These files are meant to be applied on top of the latest release files.

Link to comment
Share on other sites

Not particularly but as the trees were scatter based objects I was just curious as to whether it was a fix that affected all of them or just trees specifically. I guess the only other mass scatters I can think of that would be of note are large rocks on Vall and the weird tree things on Pol (of which wouldn't be affected as they don't have atmospheres... but in the case that they did).

Edited by Poodmund
Link to comment
Share on other sites

2 hours ago, Pliuple said:

Hey lads, i can confirm aswell that weird shadow flickering is caused by ''Physics range extender''. Deleted the mod and problem dissapeared. Ain't sure about above mentioned ''vessel mover'', haven't tried.

P.S hope someone can find solution to the problem and share :) All the best

Yeah, it doesn't have anything to do with Scatterer, but I wasn't sure in my initial post. It also don't really have anything to do with Vessel Mover either, but the effects are more noticeable when you move a vessel a long distance fast using Vessel Mover... you can get the same effect flying a fast jet a long distance.

Again, sorry, it has zero to do with Scatterer. 

Link to comment
Share on other sites

Hi blackrack! Thank you very much for the new release! :D Unfortunately, i have to file a bug report. Relative information follows:

Spoiler

KSP Version: 1.3.1.1891 (using x64 binaries)

OS Version: Windows 7 x64

Renderer Version: DX9, DX11 and OpenGL

Issue: Scatterer fails to draw the effects in the flight view on large system rescales (x10) and low orbital altitudes

Mod List:

  • Module Manager 3.0.1
  • Kopernicus 1.3.1-3
  • ModularFlightIntegrator 1.2.4.0
     
  • Sigma Dimensions 0.9.6 (x10.625 stock rescale)
  • Galileo Rescale 1.0.2.8 (x10.625 stock rescale)
  • RealSolarSystem 13.0 (RSS "rescale")

Reproduction steps:

  • Install all dependencies (as listed above), Sigma Dimensions and the x10.625 Galileo rescale config.
  • Launch a new vessel into a low orbit by either conventional means or by Alt+F12 orbital editing (less than 100 km for Sigma rescales - less than 200 km for RSS or the x10.625 rescale).
  • Observe that no Scatterer effects are visible in the flight view (map view works as expected).
  • If the camera distance from the active vessel is increased at a maximum value (by scrolling out with the mouse wheel) then the effects will suddenly become visible.
  • If the camera viewpoint is moved around, then the Scatterer effects will appear as a cube around the active vessel.
  • It the orbital altitude of the active vessel is increased above the limits specified, then the effects will work as expected.
     
  • The above issue can be also observed when using RSS (same scaling factor as the x10.625 Galileo rescale config) and any stock rescale config above x3.2.
  • The above issue is not manifested in stock KSP or, generally, for stock rescales less than x3.2.
  • The above issue is not manifested by using the previous v0.0320b Scatterer release.
  • The above issue is manifested by using either the v0.0322 Scatterer release or the v0.0325 dev assembly.
  • Various renderers (DirectX 9, DirectX 11, OpenGL 4.5) were tested. No differences between them were observed.

 

I believe @Theysen also came across this issue so i will tag him in order to also provide information if/as required.

Edited by Phineas Freak
Link to comment
Share on other sites

6 hours ago, blackrack said:

I fixed a minor but long-standing issues where trees appear behind the postprocessing

OMG yes thank you! I had to come up with a technique to handle this myself when posting photos like this one

Aloft!

I had to take two photos, one with post-processing disabled, then layer them and cutout the effect from the trees and paste them into separate layers depending on their distance so I could then control the transparency to match them up to the actual background haze level. Looking forward to just snapping a shot and posting it straight away! :P

Link to comment
Share on other sites

On 2/1/2018 at 11:13 PM, Phineas Freak said:

Hi blackrack! Thank you very much for the new release! :D Unfortunately, i have to file a bug report. Relative information follows:

  Hide contents

KSP Version: 1.3.1.1891 (using x64 binaries)

OS Version: Windows 7 x64

Renderer Version: DX9, DX11 and OpenGL

Issue: Scatterer fails to draw the effects in the flight view on large system rescales (x10) and low orbital altitudes

Mod List:

  • Module Manager 3.0.1
  • Kopernicus 1.3.1-3
  • ModularFlightIntegrator 1.2.4.0
     
  • Sigma Dimensions 0.9.6 (x10.625 stock rescale)
  • Galileo Rescale 1.0.2.8 (x10.625 stock rescale)
  • RealSolarSystem 13.0 (RSS "rescale")

Reproduction steps:

  • Install all dependencies (as listed above), Sigma Dimensions and the x10.625 Galileo rescale config.
  • Launch a new vessel into a low orbit by either conventional means or by Alt+F12 orbital editing (less than 100 km for Sigma rescales - less than 200 km for RSS or the x10.625 rescale).
  • Observe that no Scatterer effects are visible in the flight view (map view works as expected).
  • If the camera distance from the active vessel is increased at a maximum value (by scrolling out with the mouse wheel) then the effects will suddenly become visible.
  • If the camera viewpoint is moved around, then the Scatterer effects will appear as a cube around the active vessel.
  • It the orbital altitude of the active vessel is increased above the limits specified, then the effects will work as expected.
     
  • The above issue can be also observed when using RSS (same scaling factor as the x10.625 Galileo rescale config) and any stock rescale config above x3.2.
  • The above issue is not manifested in stock KSP or, generally, for stock rescales less than x3.2.
  • The above issue is not manifested by using the previous v0.0320b Scatterer release.
  • The above issue is manifested by using either the v0.0322 Scatterer release or the v0.0325 dev assembly.
  • Various renderers (DirectX 9, DirectX 11, OpenGL 4.5) were tested. No differences between them were observed.

 

I believe @Theysen also came across this issue so i will tag him in order to also provide information if/as required.

Hello, I tried to reproduce this but I get a slightly different issue. I tried with Sigma Dimensions and the x10.625 Galileo rescale config. Tried with orbits of 90-100 km, all the effects are visible BUT only when scrolling out with the mouse wheel to a maximum do the effects disappear. I noticed that altitudes where the camera is between 160km and around 360km the effects disappear and when around 360 km you can see the atmosphere mesh intersecting.

I'm investigating this of course, however if you could provide images of the issue or a video it would help, especially for this point:

Quote

If the camera viewpoint is moved around, then the Scatterer effects will appear as a cube around the active vessel.

Edited:

So if this issue is the same as I reproduced (see above), I'm making new developments that will change how the scaledSpace effects are rendered and how the layers are handled and it should fix this issue as well. But it will take some time, meanwhile I added this issue on github for tracking: https://github.com/LGhassen/Scatterer/issues/32

Thanks for the detailed report and please check my details above.

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