blackrack

[WIP][1.4.2] Scatterer-atmospheric scattering (v0.0331b - 27/04/2018)

Recommended Posts

10 minutes ago, Galileo said:

They do work. The issue is now Scatterer, it’s how KSP implements their stock sun flare. You can fix it using kopernicus and creating a confit with this in it: 

@Kopernicus:NEEDS[scatterer]
{	   @Body:HAS[@Template:HAS[#name[Sun]]]
	{
		%ScaledVersion
		{
			%Light
			{
				%sunLensFlareColor = 0,0,0,0
			}
		}
    	}
}
 

 

Alright, it works! thanks man.

  • Like 1

Share this post


Link to post
Share on other sites
13 minutes ago, AlexTheNotSoGreat said:

Alright, it works! thanks man.

Glad you were able to figure that out with all of my typos lol geez, I should probably proof read before posting :) 

Share this post


Link to post
Share on other sites
On 4/12/2015 at 9:37 AM, blackrack said:

Hi, when installing scatterer using the 0.0320 version from spacedock (0.0320 for compatibility with RSSVE), the in game window shows 0.0315. The 0.0320b version shows 0.0320b as it should but isn't compatible with RSSVE. Has the wrong version been uploaded to spacedock as 0.0320 or does 0.0320 show an incorrect no version when in game but is actually correct?

Edited by Damien212

Share this post


Link to post
Share on other sites

I'm trying to use scatterer for RSS, there is some strange bug

2ywyJ.png

2ywyH.png

2ywyK.png

On the surface or LEO it works fine, but at high orbits scatterer blue sphere became smaller than Earth and it just dissapear near Moon. What can be wrong?

Share this post


Link to post
Share on other sites

Hello everyone ! 
I just registered because after looking at a looooooot of pages here I didn't get the answer I'm looking for (just as @JBore @Epoxid @Hemml @Rodger) :
I have both problems : 
- The Halo https://ibb.co/jcWCgR

- Blue terminator (instead of red / orange at sunset / sunrise).  https://ibb.co/mPCeT6

Are there any fixes yet ? 

Config: iMac 21,5" 4k Retina 2017 (High end setup: i5 quad 3.4Ghz + 8Gb RAM + Radeon Pro 560 4Gb) running MacOS 10.13 High Sierra

Share this post


Link to post
Share on other sites
10 hours ago, BLN said:

Hello everyone ! 
I just registered because after looking at a looooooot of pages here I didn't get the answer I'm looking for (just as @JBore @Epoxid @Hemml @Rodger) :
I have both problems : 
- The Halo https://ibb.co/jcWCgR

- Blue terminator (instead of red / orange at sunset / sunrise).  https://ibb.co/mPCeT6

Are there any fixes yet ? 

Config: iMac 21,5" 4k Retina 2017 (High end setup: i5 quad 3.4Ghz + 8Gb RAM + Radeon Pro 560 4Gb) running MacOS 10.13 High Sierra

1 hour ago, xXxP0t4t0MStRxXx said:

I'm having the same issue. I use a Macbook Pro that I just bought. I posted a couple weeks back but no one responded.

Images: https://imgur.com/gallery/XD5A7

Nope no fixes yet. The issue is known to the dev, but seeing as he is taking a break (rightly so) there probably wont be a fix for a while. 

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Galileo said:

Nope no fixes yet. The issue is known to the dev, but seeing as he is taking a break (rightly so) there probably wont be a fix for a while. 

 

@BLN Got the tags... but no news or fixes from my side, either. I use the version with the floating tiles, on that version the sqrt-fix option works. The newer versions always halo for me, no matter what. Still using the mac :wink:

Share this post


Link to post
Share on other sites

The mod looks incredible, however, I found an issue when using BD Armory Continued. When I launch a craft equiped with a FLIR Targeting ball (A part from BDA that is a camera) and use said part, something really strange happens. On the camera screen, instead of showing what the camera would see, it blends togheter the external view with the camera's view. I found out that it was your mod which caused that by testing on a clean installation (only BD Armory and "physics range extended", as it is a dependency) and the camera worked fine. However, when I added your mod, the camera was broken again. 

I have to point out that the same issue also happens with previous versions of BD Armory, where "physics range extender" was not required (and not installed), so it has nothing to do with that mod.

Reproducing the issue is very easy; Make any type of vessel (rocket or plane), add a FLIR Targeting Ball and a weapon manager (although this last part is optional) then take off and use the camera by either right clicking on it and hitting enable, or by clicking on it in the Weapons Manager modules tab. Finally turn the FLIR camera around using the small arrow buttons on the window that will pop up and turn drag the game's camera by right clicking and dragging your mouse.

https://imgur.com/a/Hsnl4

Note how the camera on top is pointing up.

 

Edit: I forgot to mention that I'm running version 1.3.0

 

Edited by JFXAM

Share this post


Link to post
Share on other sites

Can it be made so that the environment (on Kerbin at least) looks a little bit more "crisp" and less hazy? I have no idea how to work with the configs, so sorry if this is an obvious question.

Also, is there a way to make the sun look less like a fried egg? I don't have a screenshot right now but what I mean is that there's a very noticeable boundary between the "central circle" and the "halo" part of the sun, so that it looks like the yolk, and then the halo part ends too sharply so it looks like the white part of a fried egg.

Thank you in advance for the help!

Share this post


Link to post
Share on other sites
3 minutes ago, A_name said:

Can it be made so that the environment (on Kerbin at least) looks a little bit more "crisp" and less hazy? I have no idea how to work with the configs, so sorry if this is an obvious question.

Also, is there a way to make the sun look less like a fried egg? I don't have a screenshot right now but what I mean is that there's a very noticeable boundary between the "central circle" and the "halo" part of the sun, so that it looks like the yolk, and then the halo part ends too sharply so it looks like the white part of a fried egg.

Thank you in advance for the help!

There should be a parameter in the cfgs called “post-processing” or something along those lines. Lower that value for less “haze”. 

As for your sun issue, post a screenshot because I have no idea what you are talking about lol

Share this post


Link to post
Share on other sites
1 hour ago, JFXAM said:

The mod looks incredible, however, I found an issue when using BD Armory Continued. When I launch a craft equiped with a FLIR Targeting ball (A part from BDA that is a camera) and use said part, something really strange happens. On the camera screen, instead of showing what the camera would see, it blends togheter the external view with the camera's view. I found out that it was your mod which caused that by testing on a clean installation (only BD Armory and "physics range extended", as it is a dependency) and the camera worked fine. However, when I added your mod, the camera was broken again. 

 

A similar problem happens with external cameras in RasterPropMonitor.  It appears (in the RPM case, at least) that scatterer is doing "something" during the render, but it's not using the external camera's parameters.  Instead, it looks like it's using the main game camera's parameters (like something in the shader wasn't updated based on the external camera's Camera settings, perhaps).

Share this post


Link to post
Share on other sites

Has anyone at all got a copy of Scatterer 0.0320? The spacedock download for 0.0320, while being labelled as 0.0320 is actually 0.0315 when you open it in game.

Share this post


Link to post
Share on other sites

Hey guys, to ease my task of tracking and fixing issues, I recommend using GitHub's issue section: https://github.com/LGhassen/Scatterer/issues

Please provide logs and reproduction issues for everything: https://forum.kerbalspaceprogram.com/index.php?/topic/83212-how-to-get-support-read-first/

I will update the OP soon to say this.

On 02/08/2017 at 11:06 AM, Galileo said:

Very known, but not really an issue, more like a limitation. Scatterer can only render perfect sphere atmospheres, leaving bodies with greater distortion with bits and pieces popping through. Raising the atmo effect looks worse, leaving a gap between the atmo effect and the surface. Gotta love unity.

On 02/08/2017 at 8:03 PM, blorgon said:

Well but what about those two screenshots I posted? In the first one the atmosphere is behaving how you describe (and how I expected, too, since you can clearly see that the "ring" starts at what appears to be Duna's sea level), but the second one shows the atmosphere behaving a little closer to how it should just by making a very small change in camera angle. Is it still Unity that is preventing the behavior in the second screenshot from being consistent, or does it have to do with the way scatterer draws the atmosphere relative to the game camera?

This happens because for local space objects I use the depth buffer which lets me know accurately where the terrain is and how to apply the effect. For scaled space objects no such thing is used and the shader assumes everything is a perfect ball, so for "bumpy" scaled space objects like Duna, mountains seem to go behind and out of the atmosphere and the transition between scaled space and local space looks weird.

I have a fix in mind but no idea when I'll have it in yet.

On 05/08/2017 at 5:57 PM, Gameslinx said:

The problem is I don't want the scatterer ocean, because the 'ocean' is lava! (It worked on the last scatterer but not when water refraction is enabled in this version). Disabling the refraction worked - i don't reaaaally like the effect because it creates strange borders in lakes.

I will investigate this.

On 06/08/2017 at 9:56 AM, Tynton said:

I noted this issue whenever I enabled lensflares for stars distant from the Sun. The lensflare moves away from the star in question and will teleport back into place, this is more apparent when timewarped. I doubted anyone else has mentioned this, but I would like for a workaround, nonetheless here's a reference image

The dark brown dot above the star is the Sun, by the way.

Can you make a video of the issue?

On 26/08/2017 at 1:36 PM, Singing Boyo said:

Running this at 4k with AVP repackaged, and it looks great!

One quick question - at least at 4k, things end up looking 'banded', especially at the terminator. It's somewhat visible in other people's screenshots as well, but basically I think something in the interpolation gives me noticeable stripes of color, rather than a smooth gradient. Is there something I can tweak to improve this?

To be honest, I'm not sure if the cause is scatterer, AVP, or something to do with stock, but I figure that if there is a setting that will help it's probably scatterer-related :) 

I noticed this issue since the beginning, no fix for now.

On 04/09/2017 at 2:07 AM, Drew Kerman said:

it's not a sure bet, but given that blackrack has posted WIP of planetshine, which could require handling multiple light sources, it may be possible. I doubt he's treating the sun as a single light source and doing reflection calculations to get the amount of light bounced onto the farside of a moon from a planet like Jool. More likely is that Jool will have its own value for light output, thus be treated as a separate lighting source.

Correct, in my opinion this gives the modders more control over the final look.

On 06/09/2017 at 12:50 PM, chukovskiy said:

Update. "Ocean: Refraction Effects" in the main menu scatterer settings causes the problem.

I have an issue with violent

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

exception spam after loading/switching to a vessel on Duna. I've also tested Eve and Laythe so far and they work with no issues.

Reproduction: start a new game -> build 3-part canister with engine -> cheat-land it on Duna. At this point everything is OK. If you quicksave-quickload now, the problem will appear.

Switching to Duna-vessel also causes the problem.

KSP.log: https://drive.google.com/open?id=0B-CeLSG9s3dCUTNxaWYyaEpQTkE (the only one I managed to find)

GameData folder:

i will investigate this, thanks for the report.

On 17/09/2017 at 6:39 PM, SpaceSmith said:

Here you go,

Hope I did this right. https://imgur.com/a/C4k7x

If you can't see the outline, you'll have to 'inspect image' so you can see it larger, it really shows then.

This is caused by depth buffer aliasing and a long-running issue. I think I was able to fix this before by playing with transparency supersampling settings in the Nvidia Inspector, If it still works I will post a little guide on how to do the same thing, for AMD no idea though but I assume a similar setting might exist.

On 27/09/2017 at 2:35 PM, 15Redstones said:

I like the ocean, but for some reason instead of replacing the stock ocean it now just displays both which gets weird...

https://i.imgur.com/UE9O34m.jpg

https://i.imgur.com/ZmApKVV.jpg

Please provide logs and reproduction steps:

 

On 10/10/2017 at 9:08 AM, Drew Kerman said:

so has blackrack just taken a breather? I know he got a job, possibly along the same line of work so that makes hobby stuff hard. Totally understandable. Just curious

Yeha pretty much, I work as a software developer and working on the mod/fixing bugs outside of work can feel like a drag sometimes.

On 20/10/2017 at 10:32 PM, Alexoff said:

I'm trying to use scatterer for RSS, there is some strange bug

On the surface or LEO it works fine, but at high orbits scatterer blue sphere became smaller than Earth and it just dissapear near Moon. What can be wrong?

Never saw this before and tbh I don't know if I have time to spend on RSS compatibility at this point, maybe later on.

On 26/10/2017 at 6:33 AM, BLN said:

Hello everyone ! 
I just registered because after looking at a looooooot of pages here I didn't get the answer I'm looking for (just as @JBore @Epoxid @Hemml @Rodger) :
I have both problems : 
- The Halo https://ibb.co/jcWCgR

- Blue terminator (instead of red / orange at sunset / sunrise).  https://ibb.co/mPCeT6

Are there any fixes yet ? 

Config: iMac 21,5" 4k Retina 2017 (High end setup: i5 quad 3.4Ghz + 8Gb RAM + Radeon Pro 560 4Gb) running MacOS 10.13 High Sierra

For the halo: Try toggling the alternateSQRT option in the main menu, if it doesn't work, go back a couple scatterer versions and try the same thing, if it works I will just revert it to how it was before.

For the Blue terminator, make sure you have EVE integration ON and using a compatible version of EVE (eg. the new waz's builds, not the old EVE 7-4)

On 26/10/2017 at 2:55 PM, xXxP0t4t0MStRxXx said:

I'm having the same issue. I use a Macbook Pro that I just bought. I posted a couple weeks back but no one responded.

Images: https://imgur.com/gallery/XD5A7

Same as above.

18 hours ago, MOARdV said:

A similar problem happens with external cameras in RasterPropMonitor.  It appears (in the RPM case, at least) that scatterer is doing "something" during the render, but it's not using the external camera's parameters.  Instead, it looks like it's using the main game camera's parameters (like something in the shader wasn't updated based on the external camera's Camera settings, perhaps).

Probably the postprocessing shader doing something on that camera and using the main scatterer depth buffer (which is fixed to the main camera), might be able to fix this if I put some time into it.

  • Like 4

Share this post


Link to post
Share on other sites

wanted to share this, It was a kerbin eclipse with SiFi EVE.

 

It looked good but not quite right.

Share this post


Link to post
Share on other sites

Lights don't illuminate the surface during an eclipse... Just landed on the Mun with kerbin blocking out the sun, but my landing lights only illuminated my ship, not the ground, the only things that were not completely black were the scattered rocks and the dust kicked up by my engines...
I'll just have to disable the eclipse for now, 'radar altitude only' landings are pretty scary when you are surrounded by the black of the sky and the black of the ground...

  • Like 1

Share this post


Link to post
Share on other sites
On 27/10/2017 at 8:09 PM, MOARdV said:

A similar problem happens with external cameras in RasterPropMonitor.  It appears (in the RPM case, at least) that scatterer is doing "something" during the render, but it's not using the external camera's parameters.  Instead, it looks like it's using the main game camera's parameters (like something in the shader wasn't updated based on the external camera's Camera settings, perhaps).

Any way to fix it?

Share this post


Link to post
Share on other sites
3 hours ago, JFXAM said:

Any way to fix it?

 

On 10/28/2017 at 8:34 AM, blackrack said:

Probably the postprocessing shader doing something on that camera and using the main scatterer depth buffer (which is fixed to the main camera), might be able to fix this if I put some time into it.

 

Share this post


Link to post
Share on other sites
On 29/10/2017 at 10:35 PM, Marcus Helios said:

Lights don't illuminate the surface during an eclipse... Just landed on the Mun with kerbin blocking out the sun, but my landing lights only illuminated my ship, not the ground, the only things that were not completely black were the scattered rocks and the dust kicked up by my engines...
I'll just have to disable the eclipse for now, 'radar altitude only' landings are pretty scary when you are surrounded by the black of the sky and the black of the ground...

Take this to the EVE thread. Scatterer doesn't do eclipse effects in local space.

  • Like 1

Share this post


Link to post
Share on other sites
On 10/29/2017 at 4:35 PM, Marcus Helios said:

Lights don't illuminate the surface during an eclipse... Just landed on the Mun with kerbin blocking out the sun, but my landing lights only illuminated my ship, not the ground, the only things that were not completely black were the scattered rocks and the dust kicked up by my engines...
I'll just have to disable the eclipse for now, 'radar altitude only' landings are pretty scary when you are surrounded by the black of the sky and the black of the ground...

Or, call me crazy, but don’t land during an eclipse??????

  • Like 6

Share this post


Link to post
Share on other sites
On 06/09/2017 at 12:50 PM, chukovskiy said:

Update. "Ocean: Refraction Effects" in the main menu scatterer settings causes the problem.

I have an issue with violent

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

exception spam after loading/switching to a vessel on Duna. I've also tested Eve and Laythe so far and they work with no issues.

Reproduction: start a new game -> build 3-part canister with engine -> cheat-land it on Duna. At this point everything is OK. If you quicksave-quickload now, the problem will appear.

Switching to Duna-vessel also causes the problem.

KSP.log: https://drive.google.com/open?id=0B-CeLSG9s3dCUTNxaWYyaEpQTkE (the only one I managed to find)

Can you test if this fixes your issue?

https://mega.nz/#!XZQ2iK4Z!tbLiIlMAr1UUqz50Kndk8BPq52I9gx9rHrbxyvxvNCc

Edited:

@Poodmund Can you test as well? I think this should fix https://github.com/LGhassen/Scatterer/issues/28

On 05/08/2017 at 5:16 PM, Gameslinx said:

Heya! I have this code in PlanetList for a custom Laythe ocean:

		Item
		{
			celestialBodyName = Borea
			transformName = Borea
			loadDistance = 100000000
			unloadDistance = 200000000
			hasOcean = False
			usesCloudIntegration = False
			mainSunCelestialBody = Helios
		}

 

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

This error only happens whilst the planet is loaded. I removed all the others except this and the error persists. I removed this planet and the error goes away - it's definitely this planet.

As you can see it says 'RefractionCamera.OnPreCull ()'. This is definitely related to the lack of an ocean. There is no ocean config for this planet since "hasOcean" is false.

When I disable ocean refraction in the scatterer config, this error goes away.

Same as above

Edited by blackrack
  • Like 2

Share this post


Link to post
Share on other sites
23 minutes ago, Poodmund said:

Currently in a predicament where I do not have access to my PC due to flooding but as soon as I do, I'll be sure to check it out. :D ... and no, that wasn't a cue for a Scatterer KSC glitch joke. :P 

Hope all is well on your side

Share this post


Link to post
Share on other sites

I made a few new bug fixes:

-Fixed black sky and disappearing ocean in space center view when reverting sometimes (I hope this also fixes the KSC flood bug, so need testers)

-Fixed Ocean "appearing" on moon and other atmosphere-less bodies in certain conditions

-Properly disable stock sunflares on the new version

-This also includes the refractions nullref-spam fix from above

 

Testers needed:

https://github.com/LGhassen/Scatterer/raw/a6ae4b4e2d6ffb254d444876388896dc5617951c/scatterer/bin/Release/scatterer.dll

Edited by blackrack
  • Like 9

Share this post


Link to post
Share on other sites
23 minutes ago, blackrack said:

I made a few new bug fixes:

So far so good. Ill keep testing over the weekend

 

I'm sure you are still tracking some of the other little bugs from the last release. If you need a refresher just ask :D 

Edited by Galileo
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now