Giter Club home page Giter Club logo

scatterer's Introduction

Scatterer

Atmospheric scattering graphical effects for Kerbal Space Program.

This project contains the plugin source which is under the following license:

GNU GENERAL PUBLIC LICENSE Version 3

This repo does not contain shaders for versions higher than 0.0772 and they are not necessary to compile/load the plugin. Shaders are loaded dynamically from asset bundles and can be replaced by custom shaders.

Copyright (c) 2015-2022 Ghassen Lahmar

scatterer's People

Contributors

blowfishpro avatar lghassen avatar linuxgurugamer avatar r-t-b avatar soulsource avatar tarsolya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scatterer's Issues

Window Postion on Startup Should Be Persistent

The Scatterer features selection window that is displayed on startup consistently appears in the upper left hand corner of the KSP start screen. When it conflicts with other mod windows it can be moved. The position is not remembered, however. I suggest that the window position be persistent between game sessions.

Feature Request: OpenGL support

Currently, as far as I know, only Direct3D 11 is supported.

Because of limitations, Direct3D 9 cannot be easily supported without massive performance penalties, and loss of quality. I understand this.

However, almost all of the extensions in Direct3D 11 are can be implemented in the common OpenGL extension set.

If you would like me to look into options I can.

Scatterer Texture upside-down

KSP:
1.4.1.2089 Windows 64 Bit
Problem:
Scatterer Effect Overlay is flipped
Mods installed:
-ModuleManager 3.0.5
-Scatterer 0.0326
-KSP Making History
Reproduction steps:
Just launch a vehicle and look for the outline of the Scatterer effect. You notice that it's flipped. It becomes more obvious when you look around
Log:
http://www.mediafire.com/file/766coy7lsr6cvm7/KSP.log
Screenshots:
https://imgur.com/gallery/7ntmb

Thanks for the great mod! It worked fine in 1.3.1 and I usually use more Mods but they don't have an effect.

[Bug] Atmosphere/ocean config loading via GUI (v0.04dev)

Description:

It is not possible to load externally customized atmosphere/ocean configuration files via the Scatterer interface. Any changes to these files will be overridden by the currently loaded config(s). Current scene does not seem to matter, since i tested it in Space Center, Flight/Map and Tracking Station views.

Notes:

After opening a fresh KSP instance i proceeded to open and modify some common atmosphere parameters inside the Kerbin "atmo.cfg" file via Notepad++. I then saved and closed the file.

Back in KSP i tried to load the modified file via the GUI. No changes where observed. I then saved the file via the GUI. All custom external changes were immediately overwritten.

Test Environment:

Tested in a new KSP 1.5.1.2335 installation with just Scatterer 0.04 Dev installed.

Tested Scatterer parameters include experimentalAtmoScale, skyAlpha, skyExposure and scatteringExposure. I also tested some ocean parameters but i observed the same results.

Kerbin is black when loading a game in orbit

Kerbin looks completely black except for a few clouds probably from EVE or something. I've tried disabling my other mods and it's definitely Scatterer that's causing this. Loading from the surface of Kerbin is fine, and travelling to space is also fine. It only happens when I load a game in space.
Love the mod! But this is kinda preventing me from using it.

KSP 1.4.1.2089 Linux
Scatterer v0.0325dev (the settings window in-game says v0.0325dev, but it's from the release tagged v0.0326)
ModuleManager 3.0.6
Other mods:

  • CollisionFX
  • DistantObject
  • EngineLight
  • EnvironmentalVisualEnhancements
  • GSF
  • Kopernicus
  • MechJeb2
  • ModularFlightIntegrator
  • NavyFish
  • PlanetShine
  • scatterer
  • StockVisualEnhancements
  • SVT
  • TextureReplacer

Config:

Scatterer_config
{
	autosavePlanetSettingsOnSceneChange = False
	disableAmbientLight = False
	integrateWithEVEClouds = True
	mainMenuWindowLocation = 0,0
	inGameWindowLocation = 147,64
	nearClipPlane = 0.0500000007
	forceDisableDefaultDepthBuffer = True
	useOceanShaders = True
	oceanSkyReflections = True
	oceanRefraction = False
	oceanPixelLights = False
	drawAtmoOnTopOfClouds = True
	oceanCloudShadows = True
	fullLensFlareReplacement = True
	showMenuOnStart = True
	scrollSectionHeight = 350
	useGodrays = True
	useEclipses = True
	useRingShadows = True
	terrainShadows = False
	shadowNormalBias = 0.720000029
	shadowBias = 0.5
	shadowsDistance = 50000
	guiModifierKey1String = LeftAlt
	guiModifierKey2String = RightAlt
	guiKey1String = F10
	guiKey2String = F11
	m_fourierGridSize = 128
}

I can provide logs too if you need them, but I don't know where to find them.

Ocean Lights feature produces giant visual artifacts

Latest Scatterer (via CKAN) causes craft lighting to produce a giant visual artifact when ocean light reflection is on, and the craft lights are on --depending on viewing angle. The lights are also not reflected on the surface.

KSP: 1.5.1 Windows 64bit

Problem: Ship lighting glitch when ocean lighting enabled

Mods installed:

Scatterer 0.0336 (via CKAN) ((only mod))

Reproduction steps:

With ocean lighting enabled, default scatterer settings: Launch a ship from KSP, turn on craft lights; depending on angle, the craft light source creates a visual glitch that floods the screen (depending on angle).

Log:
https://www.dropbox.com/s/3tc1brse90v686c/output_log.txt?dl=0

Sunflare is bugged with KScale64

I've attempted with the Eden Sunflare, Astroniki Sunflare, and normal scatterer sunflare, but the sunflare is never the right thing... (I am forcing dx11 btw)

Normal scatterer sunflare:
normalsunflare

Astroniki:
astronikiflare

Differing CB and scaled/PQS names

Hi @LGhassen
As may or may not have been mentioned in the thread, RSS has a rather special situation: due to certain things in KSP being hardcoded to require the homeworld be Kerbin, RSS only changes the name of the CelestialBody to Earth; it leaves the scaledversion transform/gameobject named Kerbin, and it leaves the PQSs named Kerbin and KerbinOcean. Can Scatterer handle such a situation?

Artifacts when using with Trajectories mod

Hello, i'm not sure how to properly report about issue, so i'm writing here.

When i install this mod with Trajectories together i have artifacts in map view when there is trajectory prediction - game start flicker with ocean or atmosphere. If there is no prediction for atmosphere entering there is no artifacts.

Here is screenshots:
https://imgur.com/a/pSq0W

I'm not sure what exactly wrong and in what addon is incompatibility, so writing to both addons.
neuoy/KSPTrajectories#119

Mirror image of planet and vessel while in atmosphere

KSP: 1.4.2 Windows 64bit
Problem:A mirrored ghost image of planet and ship while flying in atmosphere(Image: https://imgur.com/a/5R1wuMn )

Mods installed:
Scatterer 0.0331b
EnvironmentalVisualEnhancements 1.4.0-1
Stock Visual Enhancements 1.3.0.4
Stock Visual Terrain 2.1.4
DistantObjectEnhancement 1.9.1
PlanetShine 0.2.6.1
Kopernicus 1.4.3-1

Reproduction steps:

I have these settings(Deactivated some things to help my computer not fry): https://imgur.com/a/gF9YuS8
From there just launch a ship and it should start showing the mirrored ghost image. It gets more visible as you get higher up.

Log:

https://www.dropbox.com/s/srjwrexdb4htu0s/output_log.txt?dl=0

Black sky at night below 200m

KSP: 1.4.3 64bit dx9

Problem: Skybox is not rendered at night when below 200m. Using default scatterer configs and SVE EVE configs (SVE_Scatterer folder deleted)

Mods installed:
mods.txt

Reproduction steps:

  1. Launch from KSP runway at night, refraction shaders enabled
  2. Sky is black
  3. Climb past 200m
  4. Sky is not black

Log:
output_log.txt

Ocean Z- fighting

The ocean fights with the land and does really weird things, any ideas ??

underwater fog

I have released a mod that provides a stock alike alternative to your ocean shader. It's for those who experience a performance hit with scatterers shaders. Scatterer is by far superior, but its a nice alternative I find. I only have a single issue, though. My mod disables Scatterer's shader, and while everything looks right above the ocean surface, Scatterer seems to disable the "fog" or underwater effect of the stock game. Here is an example

Hope this has a simple solution! thanks for looking into it!

Sky box is completely black

When I start a game (new or resume), after a couple of seconds, the sky becomes black as if there was no atmosphere on kerbin.
See include screenshot.
screenshot0
screenshot1

Ocean shaders not working on Linux and Mac OS X (KSP 1.2)

There seems to be an issue with the ocean shaders, the surface of the ocean is completely transparent (the rover in the 2nd picture is floating, not flying):

20161016093609_1
20161016093908_1
20161016093922_1
20161016093953_1

In the last screenshot is visible a console error that is getting printed several time per second.

I'm running KSP 1.2 (build id 01586) and the only mods installed are Scatterer (v0.0255forKSP1.2) and Module Manager (2.7.2).

System info:

System:    Host: x87-deluxe Kernel: 4.4.0-43-generic x86_64 (64 bit)
           Desktop: Unity 7.4.0  Distro: Ubuntu 16.04 xenial
Machine:   System: ASUS product: All Series
           Mobo: ASUSTeK model: Z87-DELUXE v: Rev 1.xx
           Bios: American Megatrends v: 2103 date: 08/15/2014
CPU:       Quad core Intel Core i7-4770K (-HT-MCP-) cache: 8192 KB 
           clock speeds: max: 3900 MHz 1: 3500 MHz 2: 3477 MHz 3: 3500 MHz
           4: 3506 MHz 5: 3511 MHz 6: 3316 MHz 7: 3505 MHz 8: 3505 MHz
Graphics:  Card: NVIDIA GM204 [GeForce GTX 980]
           Display Server: X.Org 1.18.4 driver: nvidia
           Resolution: [email protected]
           GLX Renderer: GeForce GTX 980/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 364.19

"Halo" from atmosphere

In directX 11 and OpenGL, Kerbin, Duna and Jool have strange looking atmosphere. It is visible only from sun side.On Laythe and Eve everything is fine.
Bug appears regardless of other mods.
screenshot82
screenshot83
screenshot84

Value rounding

This is a small "feature" request (if you can call it like that): when editing and saving the atmosphere parameters, the actual values are not exact but they present some rounding issues.

Example:

experimentalAtmoScale = 0.800000012
mapExtinctionMultiplier = 2
mapExtinctionTint = 0.400000006
mapSkyExtinctionRimFade = 0.25

Note the values of the "experimentalAtmoScale" (was 0.4) & the "mapExtinctionTint" (was 0.8) parameters.

[Bug] Kopernicus interop (v0.04 dev)

Description:

The Scatterer effects do not appear in any of the KSP scenes (Space Center, Tracking Station, Map & Flight View) when Kopernicus is installed. Upon Kopernicus unistallation everything works as expected. Happens in all renderer options (DX9/DX11/OpenGL) with just Kopernicus (along with it's MM and MFI dependencies) installed.

Notes:

An excerpt from the KSP log file reveals the following NullReference when Scatterer Core is initialized:

[EXC 16:02:47.437] NullReferenceException: Object reference not set to an instance of an object
	scatterer.Core.Init ()
	scatterer.Core+<DelayedInit>d__3.MoveNext ()
	UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)

After i inserted some debug log lines in the Init() routine (Core.cs) i pinpointed the error around the Sun corona RenderQueue patcher (lines 432-438). Temporarily commenting out these lines and recompiling the assembly was enough to allow the Scatterer effects to load/appear (as expected, the Sun flares did not appear).

KSP log file link

Test Environment:

Tested in a new KSP 1.5.1.2335 installation with just the following mods installed:

  • Kopernicus 1.5.1-1
  • Modular Flight Integrator 1.2.6
  • Scatterer 0.04 Dev

[Bug] usesCloudIntegration parameter not applying

Tested this with the aim to keep the EVE cloud integration feature only for the Earth but it seems that it is overriden by the global integrateWithEVEClouds parameter.

  • Set the integrateWithEVEClouds parameter to True.
  • Added the usesCloudIntegration to all applicable bodies (that have Scatterer entries).
  • Set the usesCloudIntegration parameter to read False for every body apart from Earth.

But the final result was that, for the bodies that should have this feature disabled, it was enabled anyway.

PC shuts down when splashing down

Hi,

This one is scary.

Steps:
GIVEN Running on Windows 10, 16GB, i7, GTX 1080Ti

AND (KSP version doesn't matter as I've observed this on 1.3, 1.3.1 and now 1.4.3)

AND Any corresponding version of Scatterer

WHEN splashing down (on Kerbin)

THEN: PC just instantly shuts down.

No logs, no nothing.

Notice: If I disable Scatterer no such behaviour.

alternate SQRT-Fix for Halo stopped working

The alternate sqrt-option for fixing the halo seems to have stopped working for OS X users. There is nothing extraordinary I could find in the logs, but I have made the following tests on KSP 1.3.1:

  • 320b (1st download link on SpaceDock): Sqrt-fix not working, always halo
  • 315 preview (2nd download from top on SpaceDock): Halo is always there, fix is not doing anything on or off
  • 275 preview (3rd download from top on SpaceDock): Fix Works: Halo is gone with alternate sqrt "off". This is the latest version where I can remove the halo using the sqrt-option.

I am using a MacBook Pro Retina from mid 2015, 2.8 Ghz Core i7 on macOS Sierra 10.12.6. This machine has two GPUs: Intel Iris Pro 1536 MB and AMD Radeon R9 M370X

Mark compatible with 1.3

I love this mod, but I'd love it if it was available via CKAN with KSP 1.3 installed.
Could you mark it as working with 1.3?

Effects not visible with some rescale mods between certain altitudes

Submitted by Phineas Freak on KSPforum (https://forum.kerbalspaceprogram.com/index.php?/topic/103963-wip131-scatterer-atmospheric-scattering-v00324-28012018/&do=findComment&comment=3283479)

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.

Wacked out part textures And Invisible Everything

2 Issues here.
Please note i deleted module managers stuff before rebooting KSP and that all settings are default/ same as found in Zip folders.

Issue #1
KSP: 1.4.2 Windows 64bit

Problem: Flickering textures

Mods installed: 

Scatterer (Dev Version)

EVE

SVE

Squad Stock

Squad Expansion

Module Manager 

Reproduction steps:

Move vessel within 2.3 Km second vessel. Wait for textures to start acting up. Seems to be more obvious when at dawn /dusk. Textures on both vessels can become see through, jump around, and seem to turn inside out. (Its fast and flashy so Im not sure what Im seeing.) Closer you get the worse it gets.

Note: Part Clipping is not necessary to cause issue, but does exacerbate it. 

https://youtu.be/V6H-25Jd03M 

^Video of Problem, since screenshots don't really show it.

Log:

I can't seem to find a log despite searching the whole KSP folder. =/ The game didn't crash so maybe thats why. Let me know.

Edit; Found Log https://drive.google.com/file/d/120436Ejwqi_lZWd9_mz2INhtEVT8eN_6/view?usp=sharing

Issue #2
Oh and I found another minor issue with the Dev version. =/

KSP: 1.4.2 Windows 64bit

Problem: Galaxy Died. Woooo!

Mods installed: 

Scatterer (Dev Version)

EVE

SVE

Squad Stock

Squad Expansion

Module Manager 

Reproduction steps:

Click Spacecenter in the esc menu after launching a vessel.

https://i.gyazo.com/d79fd9e1a135c33c92d4ae13fa02740f.png

Log:

Ditto on the log. I rechecked the folder and instructions. 

Edit; Found Log https://drive.google.com/file/d/120436Ejwqi_lZWd9_mz2INhtEVT8eN_6/view?usp=sharing

Hard terrain line

System and KSP information attached, 64-bit executed.

I've installed scatterer alone on a fresh install of KSP, and no matter what settings I use, hard terrain lines can be seen on a planet's surface, and hard navigation like lines can be seen in the air. Atmospheric lines remain once in orbit, however, as far as I can tell, "space" texturing remains unchanged.

Orbital Map issue when landed on Kerbin

I have noticed that when the map is viewed from a craft landed on Kerbin, the entire planet is drawn as ocean. Worse yet, the ocean appears to be drawn in front of most other items such as orbit lines. The issue is not present from orbital craft, nor is it a problem from the tracking station. The issue is resolved when scatterer is disabled.

Is this a configuration problem, or is something else wrong? I have a video demonstrating the issue if need be.

Jittery eclipses

We've encounter a problem in a couple planet packs (GPP & GEP) in which eclipse shadows move in a herky-jerky motion across the planet. The shadow starts out moving slowly to the right as it should, then it suddenly jumps back to the left, then continues moving right. The shadow eventually works its way across the planet, but it does this jump to the left repeatedly. It does this at both regular speed and time warp, though in time warp the jittery behavior is sped up. If you need any more information, I'm happy to provide it.

Corrupted Shaders.

Can you privide full code of shaders?
That uncomliled shaders, that u always commting is corupted.
Realy. Opensource to Opensource.
Thx.

NullReferenceException spam

Getting this on the latest version. I also have EVE/SVE installed but this issue seems to be coming from Scatterer. Using the latest version as of this post.

[EXC 20:19:55.690] NullReferenceException: Object reference not set to an instance of an object
	scatterer.OceanNode.OnPreCull ()
[EXC 20:19:55.690] NullReferenceException: Object reference not set to an instance of an object
	scatterer.OceanNode.OnPreCull ()
[EXC 20:19:55.691] NullReferenceException: Object reference not set to an instance of an object
	scatterer.OceanNode.OnPreCull ()
[EXC 20:19:55.691] NullReferenceException: Object reference not set to an instance of an object
	scatterer.OceanNode.OnPreCull ()

This creates a ~200mb log file every time I play (which isn't too good for my SSD)

Reload/Load issues

Scatterer appears to be toggled during save/reload scenarios on Linux/OpenGL.

Looks like this when it's off.

Toggled Off

Jool visible through its moons

KSP: 1.3.1 osx

Problem:
Jool is completely visible through its moons. (I tried Laythe and Vall). (Sorry if its been reported, I couldn't find it anywhere).

Mods installed:
none besides scatterer. I removed all mods and did a complete reinstall of KSP and a new install of Scatterer.

Reproduction steps:

Default config on scatterer.
KSP default config except for:
-screen res 1280x800
-frame limit 60fps
-render quality: beautiful
-texture quality: full res

Fly a craft to laythe and park it in an equatorial orbit. When it passes in front of Jool, you can see Jool behind Laythe through the whole transit. Same with Vall. Tried it with Kerbin and the Mun but its ok there.

Log:

Player.log

Screenshots:
screenshot0
screenshot1

Proper .gitignore

Some people (namely @eggrobin) on the #RO IRC channel noted, that you uploaded the KSP core .dll files in your Release folder.

Since redistributing them isn't allowed, you should probably:

  • Change your VS copy so that they don't get copied into the folder
  • Add them to .gitignore, just in case they get added again.

Cheers

1.1 tsunami

Hi

just added to 1.1 and result was hilarious, big wave just swallowed entire space centre :)

I've noticed a crash on 32 bit but it might be due to memory.

DisableEffectsForTextureReplacer nullref spam

DisableEffectsForTextureReplacer is firing for a shader mod other than Texture Replacer (shadowmage's textures unlimited)

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Renderer:set_enabled (bool)
at scatterer.DisableEffectsForTextureReplacer.OnPreCull () [0x00000] in :0
UnityEngine.Camera:Internal_RenderToCubemapRT(RenderTexture, Int32)
UnityEngine.Camera:RenderToCubemap(RenderTexture, Int32)
KSPShaderTools.ReflectionManager:renderCubeFace(RenderTexture, Int32, Vector3, Int32, Single, Single)
KSPShaderTools.ReflectionManager:renderFace(RenderTexture, Int32, Vector3, Int32)
KSPShaderTools.ReflectionManager:updateReflections()
KSPShaderTools.ReflectionManager:Update()

I don't even know (I think that's your AA fix)

KSP: 1.4.3 64bit dx9

Problem: Cryptic log message, over and over again:
[ERR 19:59:34.645] Invalid antiAliasing value (must be at least 1)
Even though the AA is set to x2.

Mods installed:
see issue #41

Reproduction steps:

  1. Launch the game
  2. Make sure AA is on
  3. Play

Log:
see issue #41

Game crashes when loading a save at startup

I'm on 1.4

When I select a saved game to load, the game crashes. This only happens if I have scatterer in GameData. This is a new computer / fresh install

The log file is spewing this:

(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'scatterer'.

 
(Filename:  Line: -1)

Setting up 1 worker threads for Enlighten.
  Thread -> id: 101c -> priority: 1 

Effects broken in Jool atmosphere

This is the last one, I promise

KSP: 1.4.3 64bit dx9

Problem: Scatterer (and, to be fair, EVE too) effects are broken in Jool's atmosphere. The sky is black, weird artifacts appear near reference level. Screenshot:
screenshot8
The EVE artifact isn't present here in particular (I don't know tf I did with that screenshot) but that's probably not a Scatterer issue.
I think this is related to #32

Mods installed See #41 NOTE: 0.0331b used in all 3 issues

Reproduction steps

  1. Build an OP craft
  2. Fill it with expendable crew
  3. Try to land on Jool

Log: see #41

PPFX breaks ocean shaders

With PPFX turned on, OpenGL/Linux, ocean shaders refuse to load, displaying a black surface instead.

Ocean Shaders Derp

With PPFX turned off, viewing from the top down causes ocean shaders to unload again, but this goes away when viewed from any angle.

Top Down

Exception thrown when body has EVE cloud layers but no volumetrics enabled for said body

[Scatterer] Volumetric clouds error on planet: KerbinSystem.NullReferenceException: Object reference not set to an instance of an object at scatterer.SkyNode.mapEVEvolumetrics () [0x00000] in <filename unknown>:0
Null Ref is thrown when switching to the Planetarium camera (Tracking Station) when a body has EVE cloud layers set to it but none of those layers have volumetrics enabled.

I think the issue originates from this section from Skynode.cs:

public void mapEVEvolumetrics()
{
Debug.Log ("[Scatterer] Mapping EVE volumetrics for planet: "+parentCelestialBody.name);
EVEvolumetrics.Clear ();
const BindingFlags flags = BindingFlags.FlattenHierarchy | BindingFlags.NonPublic | BindingFlags.Public |
BindingFlags.Instance | BindingFlags.Static;
if (Core.Instance.EVECloudObjects.ContainsKey (parentCelestialBody.name)) //EVECloudObjects contain both the 2d clouds and the volumetrics, here we extract the volumetrics
{
List<object> cloudObjs = Core.Instance.EVECloudObjects [parentCelestialBody.name];
foreach (object _obj in cloudObjs)
{
try
{
object cloudsPQS = _obj.GetType ().GetField ("cloudsPQS", flags).GetValue (_obj) as object;
object layerVolume = cloudsPQS.GetType ().GetField ("layerVolume", flags).GetValue (cloudsPQS) as object;
//TODO take this snippet and use it somewhere else to disable volumetrics when rendering
//GameObject volumeHolder = layerVolume.GetType ().GetField ("VolumeHolder", flags).GetValue (layerVolume) as GameObject;
Material ParticleMaterial = layerVolume.GetType ().GetField ("ParticleMaterial", flags).GetValue (layerVolume) as Material;
ParticleMaterial.EnableKeyword ("SCATTERER_ON");
ParticleMaterial.DisableKeyword ("SCATTERER_OFF");
EVEvolumetrics.Add (ParticleMaterial);
}
catch (Exception stupid)
{
Debug.Log ("[Scatterer] Volumetric clouds error on planet: " + parentCelestialBody.name + stupid.ToString ());
}
}
Debug.Log ("[Scatterer] Detected " + EVEvolumetrics.Count + " EVE volumetric layers for planet: " + parentCelestialBody.name);
}
else
{
Debug.Log ("[Scatterer] No cloud objects for planet: " + parentCelestialBody.name);
}
}

Null Reference Exceptions Spamming log during debug

I was trying to debug another issue with one of my mods however, when running debug mode Scatter spams the logs with null reference exceptions

Sample

 [EXC 12:27:01.691] NullReferenceException: Object reference not set to an instance of an object
scatterer.Manager.getDirectionToSun ()
scatterer.SkyNode.InitPostprocessMaterial (UnityEngine.Material mat)
scatterer.SkyNode.Start ()
scatterer.Manager.Awake ()
scatterer.Core.Update ()

Here is a log - https://www.dropbox.com/s/1t2a99ikn96iems/Scatterer.zip?dl=0

Testing on a build from your latest changes from my fork.

Regards,

NRE spam at Space Center scene and in flight, with unusual Kopernicus config

I'm working on Module Manager patches for Alien Space Programs to accommodate two worlds changing names; the new home world is Duna and Kerbin gets replaced with a stand-in named "Bin." For the most part, this works with Module Manager patches that replace Kerbin with Bin. I'm testing this on KSP 1.3 with Kopernicus 1.3.0-2 until they fix LandControl and get scatter objects working again.

For the Eve and Laythe editions of this hack, this seems to work. For Duna, I get NRE spam at the Space Center scene and any flight scene on Duna:

[EXC 16:07:04.428] NullReferenceException: Object reference not set to an instance of an object
scatterer.RefractionCamera.OnPreCull ()

This stops when I switch to another world, or go to the map or tracking station.

The only thing different between Duna and the rest is the lack of ocean. I tried hacking in a hidden ocean, but this didn't seem to make any difference.

Oddly, the Duna atmosphere still behaves as expected in both flight and map views.

What else can I check for that would help troubleshoot this? Should I make other changes to my configs to avoid this?

@Scatterer_planetsList:NEEDS[scatterer]:AFTER[DunaSpaceProgram]
{		
	@scattererCelestialBodies
	{
		@Item,0 //Kerbin
		{
			%celestialBodyName = Bin
			%transformName = Bin
		}
	}
}

@Scatterer_ocean:NEEDS[scatterer]:AFTER[DunaSpaceProgram]
{
	@Ocean[Kerbin]
	{
		%name = Bin
	}
}

@Scatterer_atmosphere:NEEDS[scatterer]:AFTER[DunaSpaceProgram]
{
	@Atmo[Kerbin]
	{
		%name = Bin
	}
}

Kopernicus identifies these worlds after displayName and cbNameLater take effect:

[LOG 16:06:53]: Found Body: Sun:0 -> SOI = Infinity, Hill Sphere = Infinity
[LOG 16:06:53]: Found Body: Duna:1 -> SOI = 47921949.369738, Hill Sphere = 125063736.748336
[LOG 16:06:53]: Found Body: Mun:2 -> SOI = 2429559.11656475, Hill Sphere = 3170563.33757116
[LOG 16:06:53]: Found Body: Minmus:3 -> SOI = 2247428.3879023, Hill Sphere = 3730392.49065433
[LOG 16:06:53]: Found Body: Moho:4 -> SOI = 9646663.02332811, Hill Sphere = 22060314.8155466
[LOG 16:06:53]: Found Body: Eve:5 -> SOI = 85109364.7382441, Hill Sphere = 185949494.965972
[LOG 16:06:53]: Found Body: Ike:6 -> SOI = 1049598.93931162, Hill Sphere = 1225978.58343315
[LOG 16:06:53]: Found Body: Jool:7 -> SOI = 2455985185.42347, Hill Sphere = 4065824625.34358
[LOG 16:06:53]: Found Body: Bin:8 -> SOI = 84159286.4796305, Hill Sphere = 196414707.77848
[LOG 16:06:53]: Found Body: Vall:9 -> SOI = 2406401.44479404, Hill Sphere = 3893201.55262436
[LOG 16:06:53]: Found Body: Bop:10 -> SOI = 1221060.86284253, Hill Sphere = 2029674.44211376
[LOG 16:06:53]: Found Body: Tylo:11 -> SOI = 10856518.3683586, Hill Sphere = 14757877.6267184
[LOG 16:06:53]: Found Body: Gilly:12 -> SOI = 126123.271704568, Hill Sphere = 142427.423478875
[LOG 16:06:53]: Found Body: Pol:13 -> SOI = 1042138.89230178, Hill Sphere = 2038945.47430365
[LOG 16:06:53]: Found Body: Dres:14 -> SOI = 32832839.5767762, Hill Sphere = 92059713.5005964
[LOG 16:06:53]: Found Body: Eeloo:15 -> SOI = 119082941.647812, Hill Sphere = 266016718.015223
[LOG 16:06:53]: Found Body: Laythe:16 -> SOI = 3723645.81113302, Hill Sphere = 5186318.66159496

Move config cfg files to PluginData

ModuleManger builds up a new cache file on every start when changing config cfg files are not stored in a PluginData folder.

GameData\scatterer\config\Planets\Kerbin\atmo.cfg
GameData\scatterer\config\config.cfg

->

GameData\scatterer\PluginData\Planets\Kerbin\atmo.cfg
GameData\scatterer\PluginData\config.cfg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.