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

On 12/05/2017 at 3:08 PM, selfish_meme said:

@blackrack just thought you should know in the testing version, fairings don't get the same underwater effects as the other parts, probably just a layer issue. You can see an interstage fairing just under the chutes in this image.

Let me know if you need to know what other mods I have installed

I've noticed this with the small parachute as well, will fix when I can.

On 12/05/2017 at 11:30 PM, msnbcorp said:

Hi everyone, i have made a fresh install of some mods and ...
i keep havng some errors. For scatterer i keen having this one :

Does someone have any idea of the way to correct this ?  I take any suggestions :wink:

Do you have some actual issues in the game apart from 2 nullrefs showing up in the log?

On 12/05/2017 at 11:37 PM, N3N said:

Hey,

could this be an error with scatterer?


[EXC 22:21:16.027] NullReferenceException: Object reference not set to an instance of an object
	scatterer.SkyNode.UpdateStuff ()
	scatterer.updateAtCameraRythm.OnPreCull ()
[LOG 22:21:16.049] [PlanetariumCamera]: Focus: Kerbin
[ERR 22:21:16.080] Exception handling event onPlanetariumTargetChange in class KnowledgeBase:System.NullReferenceException: Object reference not set to an instance of an object
  at ResourceMap.GetResourceItemList (HarvestTypes harvest, .CelestialBody body) [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.KbApp_PlanetResources.CreateResourceList () [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.KbApp_PlanetResources.ActivateApp (.MapObject target) [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.KnowledgeBase.ActivateApps (KbTargetType targetType, .MapObject target) [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.KnowledgeBase.OnMapFocusChange (.MapObject target) [0x00000] in <filename unknown>:0 
  at EventData`1[MapObject].Fire (.MapObject data) [0x00000] in <filename unknown>:0 

[EXC 22:21:16.083] NullReferenceException: Object reference not set to an instance of an object
	ResourceMap.GetResourceItemList (HarvestTypes harvest, .CelestialBody body)
	KSP.UI.Screens.KbApp_PlanetResources.CreateResourceList ()
	KSP.UI.Screens.KbApp_PlanetResources.ActivateApp (.MapObject target)
	KSP.UI.Screens.KnowledgeBase.ActivateApps (KbTargetType targetType, .MapObject target)
	KSP.UI.Screens.KnowledgeBase.OnMapFocusChange (.MapObject target)
	EventData`1[MapObject].Fire (.MapObject data)
	UnityEngine.Debug:LogException(Exception)
	EventData`1:Fire(MapObject)
	PlanetariumCamera:SetTarget(MapObject)
	PlanetariumCamera:SetTarget(Int32)
	PlanetariumCamera:SetTarget(String)
	<Start>c__Iterator95:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

They came since I installed Scatterer, EVE, SVE, SVT, Kopernicus.

 

So first I thought it might be an error related to Kopernicus:

 

Here are all the Logs and other Information they asked for:

KSP-Errors_12-05-2017.zip

 

If you need more Information, just ask for it. :wink:

I don't know, this is too vague, try removing some of your mods until you find the issue.

On 14/05/2017 at 4:36 AM, tallon43 said:

How do you make the clouds look like those from the official screenshots?

1. Remove all installs of EVE, SVE, etc

2. Install this http://forum.kerbalspaceprogram.com/index.php?/topic/149733-122-environmentalvisualenhancements-12-2/&

3. Install latest scatterer and enable "EVE cloud integration" from main menu

4. Done

On 15/05/2017 at 6:26 AM, msnbcorp said:

Hi, i have a question for Blackrack.

I have trying to debug a problem in texturing currently. And it appear that with scatterer and the normal/shadow bias it is OK.

BUT, it is mainly OK with the ground rendering (near plane). I have tried to understand the alt point rendering of your mods and very little is say about ground.

So after bit of investigating i came directly  to ask my question : Why the near plane rendering of shadow (etc) in your mod is so different between near plane and other plane ? It is strange that this "cut" is so sharp. between the two rendering mode.

If i want exactly the near plane rendering of shadow in the second plane. How can i do ?

If you have an idea ^^

 

edit : viewing some old post of you on this :

And other information. It appear that it could be possible to adjust the PQS size of near plane. Some of guys says that it could be done in the main menu of your mod. But i don't really find it, old feature i imagine ?

edit : find that you activate it in your last experimental version. It could be a workaround for my bug but my questions remains on the difference of processing between terrain shadow in near plane and other plane ... i prefer having the exact same render rather than messing with plane.

The issue here is NOT caused by the near plane but by how the unity shadow system handles the different cameras and the total distance covered by each camera. In the stock game the shadow distance is set to a really low value so you can see it, in scatterer the shadow distance is set to 100 Km or so and that "dilutes" the shadows on the far camera, I'm not sure what the exact issue here is though. If you lower the scatterer shadow distace (it's somewhere in the config file, the original value is something like 5 Km (5000 in the .cfg)) it should about look the same but you will lose the ability to see terrain shadows from afar (which imo add much more to the look of the game than consistent shadows up-close).

Link to comment
Share on other sites

18 minutes ago, blackrack said:

Do you have some actual issues in the game apart from 2 nullrefs showing up in the log?

In fact i was tracking a bug from an unknow mod. It's solved now. I have let this kind of log error know to mod creator in case it could help of debugging/beta testing their mod. Sorry ^^.

 

 

 

18 minutes ago, blackrack said:

The issue here is NOT caused by the near plane but by how the unity shadow system handles the different cameras and the total distance covered by each camera. In the stock game the shadow distance is set to a really low value so you can see it, in scatterer the shadow distance is set to 100 Km or so and that "dilutes" the shadows on the far camera, I'm not sure what the exact issue here is though. If you lower the scatterer shadow distace (it's somewhere in the config file, the original value is something like 5 Km (5000 in the .cfg)) it should about look the same but you will lose the ability to see terrain shadows from afar (which imo add much more to the look of the game than consistent shadows up-close).

I was trying de debug the "Shadow Acne" problem that appear with stock visual terrain texture.

I managed to reduce it by using other format (png/tga) and by using your mod (even if i still don't understand why this happen only with this mod and only with DX11). BUT it totaly look fine and disappear only on the near camera with your mod and not on the far camera where it's just reduced with a not very beautiful rendering.

So i came here to ask what is the difference between the two camera in the shadow management of your mod (because in stock there is no difference between plane).

For example it is like your mod don't apply at all on the near plane (for shadowing) but apply only on the far plane. The transition is very hard.

I'm also not sure about your personnal taste, it's ... personnal. Lot of the viewing time is on KSC or on a ship from distances that implies the cut between fly ... so ... i think it matter ^^.

Edited by msnbcorp
Link to comment
Share on other sites

7 minutes ago, msnbcorp said:

In fact i was tracking a bug from an unknow mod. It's solved now. I have let this kind of log error know to mod creator in case it could help of debugging/beta testing their mod. Sorry ^^.

I was trying de debug the "Shadow Acne" problem that appear with stock visual terrain texture.

I managed to reduce it by using other format (png/tga) and by using your mod (even if i still don't understand why this happen only with this mod and only with DX11). BUT it totaly look fine and disappear only on the near camera with your mod and not on the far camera where it's just reduced with a not very beautiful rendering.

So i came here to ask what was the difference between the two camera in the shadow management of your mod (because in stock there is no difference between plane).

For example it is like your mod don't apply at all on the near plane (for shadowing) but apply only on the far plane. The transition is very hard.

I'm also not sure about your personnal taste, it's ... personnal. Lot of the viewing time is on KSC or on a ship from distances that implies the cut between fly ... so ... i think it matter ^^.

Like I said, it's caused by the scatterer shadow distance setting and how unity handles shadows.

Link to comment
Share on other sites

30 minutes ago, blackrack said:

Like I said, it's caused by the scatterer shadow distance setting and how unity handles shadows.

I don't understand well your explanation. I understand the shadow creation in directx or opengl but don't know unity well. Why the shadow distance play on the sharpness on near object AND on the propagation of far object.

Isn't it possible to do the reverse thing and set a high shadow value for the near plane ?

 

edit : maybe it's a misunderstood of the phenomenon i observe, i could exprime my self very badly (not good in english) ... in my case the shadow appear more ... trouble. In far camera. Due to the application of the bias. This is what i mean. But in near camera it's like the bias is just not set at all. I read about shadow distance and unity just now and i don't see it related to the phenomenon i observed. Maybe we are not talking about the same thing ? I mean, a bigger shadow distance should not modify the rendering of a shadow that was under the old shadow distance. But here there is clearly ta modification of "blurriness of shadow" on far plane with your mod and terrain shadow, due to the bias parameter but not on the near plane. It is clear when you set the bias parameters to high value, all shadow become blob but near plane remain with clear sharp shadow...

Edited by msnbcorp
Link to comment
Share on other sites

39 minutes ago, blackrack said:

Like I said, it's caused by the scatterer shadow distance setting and how unity handles shadows.

Well i have to appologize. It appears that you were right. Even if i don't understand why. Shadow distance set as the same value i get on this topic :

https://forum.unity3d.com/threads/shadow-fadeoff-approaching-far-clip-plane.356893/

5000 by default for KSC, seems to render the two plane with the same feeling.

But my two question remain.

- Why changing this shadow distance seems to change the "bluriness" of shadows even though this really should not be the case according to the definition of it in unity documentation : https://docs.unity3d.com/460/Documentation/Manual/DirectionalShadowDetails.html

- isn't it possible to change the shadow distance of near plane instead of lowering the shadow distance in scatterer ?

 

Hum, beside, you could tke advantages of this post which deal with the problem of transition between plane with shadow and KSP :

https://forum.unity3d.com/threads/shadow-fadeoff-approaching-far-clip-plane.356893/

 

 

 

 

Link to comment
Share on other sites

On 4/23/2017 at 1:30 PM, blackrack said:

I haven't tested with EVE or any other mods

I should have remembered this before spending like the last hour or two trying to figure out what mod or config issue was screwing up Scatterer so that volumetric clouds were not being affected by sunrise/sunset, until I finally thought to downgrade to the previous release without the new water shaders and hey - they work again. This is what they look like in the latest release linked from the OP (I had gone back to using stock EVE clouds in case SVE configs was messing something up):

u1maAzll.png

I'm in here like everyday so I couldn't believe I missed knowing about this issue so I just re-read every post since the last release post I quoted above and now I can't believe no one else noticed! :P

Link to comment
Share on other sites

So, I'm working on adding Scatterer compatibility to my planet pack, but there is a bug with eclipses:

Spoiler

screenshot102.png?dl=1

I also tried to head over to the affected area and here is what I came up with:

Spoiler

screenshot103.png?dl=1

screenshot104.png?dl=1

Can anyone figure out what is causing this bug and is there any fix for it?

Link to comment
Share on other sites

1 hour ago, EricL said:

So, I'm working on adding Scatterer compatibility to my planet pack, but there is a bug with eclipses:

in both the 1st and 3rd images it's obvious that the moon is not in front of the sun, so why would you expect there to be an eclipse? I have no idea what issue you're talking about

Link to comment
Share on other sites

9 hours ago, Drew Kerman said:

in both the 1st and 3rd images it's obvious that the moon is not in front of the sun, so why would you expect there to be an eclipse? I have no idea what issue you're talking about

In the first image, there was a black band around the planet that was not supposed to be there. The 2nd and 3rd images were just there to show you that the shadow still appears even though the moon is not in front of the sun. (Now I believe the problem is the rendering of the eclipse)

Link to comment
Share on other sites

So yeah, I'm experiencing a sunflare problem with SVE/Scatterer/SVT/OPM/OPM-VO/EVE installed. The sun looks like this (no matter what I add to the sunflare folder on Scatterer);

https://s28.postimg.org/jg5d9r3r1/Untitled.png

Here's the log too ;

https://www.sendspace.com/file/wv7d16

So, how do I fix it? =/

Edited by Diddly Feelerino
Link to comment
Share on other sites

@Diddly Feelerino That's because SVE over-rides the Scatterer sunflare. For instructions on how to fix that:

  1. Go into the StockVisualEnhancements folder in GameData
  2. Open SVE_Settings.cfg
  3. Delete the section that says:
@Scatterer_sunflare:AFTER[scatterer]
{
	@Sun
	{
		%assetPath = StockVisualEnhancements/SVE_Scatterer/Sunflares/Sun
		%flareSettings = 0.5,1,0.32
		%spikesSettings = 0.7,1,0.32
		%sunGlareFadeDistance = 250000
		%ghost1SettingsList1
		{
			%Item = 0.1,1,20,0.3
			%Item = 0.08,1,8,0.34
			%Item = 0.08,1,12,0.49
			%Item = 0.16,1,18,-0.3
		}
		%ghost2SettingsList1
		{
			%Item = 0.02,1,4,0.66
			%Item = 0.1,1,10,0.44
			%Item = 0.15,1,4,0.55
			%Item = 0.15,1,18,0.95	
		}
		%ghost2SettingsList2
		{
			%Item = 0.1,1,8,0.7
			%Item = 0.1,1,6,0.72
			%Item = 0.15,1,8,-0.2
		}
		%ghost3SettingsList1
		{
			%Item = 0.1,1,6,0.4
			%Item = 0.08,1,11,1.1
			%Item = 0.04,1,20,1.2
			%Item = 0.03,1,20,1.22
		}
	}
}

4. Your sunflare should now be set to the one in the default Scatterer folder.

Link to comment
Share on other sites

On 5/19/2017 at 8:09 AM, Diddly Feelerino said:

So, how do I fix it? =/

So, I took a quick look at possibly using MM to copy the stock sunflare node before SVE or anything changes it, then copy it back in during the FINAL pass to ensure that you always have the sunflare that ships with Scatterer without having to remember to delete other configs. But I either couldn't get the syntax right or it just doesn't work, you can ask on the MM thread if you want to look into it more. Here is the post on node copying

 

Link to comment
Share on other sites

15 minutes ago, The-Doctor said:

@blackrack Hey, I'm getting issues with this mod, uh, with SSRSS Continued, it's not working with it, idk why.

Well, that's not his mod, so he can't really help with this issue. All you have to do is install scatterer to your gamedata like normal for it to work with Ssrss. You don't have to do anything besides that. Also, if you are trying to use the experimental version of scatterer, it won't work. If you are going to say the clouds don't change color on the terminators, that's by design. I disabled the effect in SSRSS until scatterer gets the fixes it needs. If it just isn't showing up, you probably installed wrong.

Edited by Galileo
Link to comment
Share on other sites

4 minutes ago, Galileo said:

Well, that's not his mod, so he can't really help with this issue. All you have to do is install scatterer to your gamedata like normal for it to work with Ssrss. You don't have to do anything besides that. Also, if you are trying to use the experimental version of scatterer, it won't work. If you are going to say the clouds don't change color on the terminators, that's by design. I disabled the effect in SSRSS until scatterer gets the fixes it needs. If it just isn't showing up, you probably installed wrong.

I installed through ckan

Link to comment
Share on other sites

Not sure if it's been mentioned, but is there a way to change the point where scatterer decides the flare has been occluded? I'm getting images like the one here. This one was taken from Moho:

Spoiler

3CR6Olk.png

It seems that the flare is centered on a singular point in the center of the sun. If it were say, the same size as the sun the flare would cut out properly once the sun was fully occluded.

Also, is it possible to have a fade out animation for the flare? The same way the stock sun fades out behind planets, instead of turning off abruptly.

Edited by Rayder
Link to comment
Share on other sites

58 minutes ago, Rayder said:

Not sure if it's been mentioned, but is there a way to change the point where scatterer decides the flare has been occluded? I'm getting images like the one here. This one was taken from Moho:

  Hide contents

3CR6Olk.png

It seems that the flare is centered on a singular point in the center of the sun. If it were say, the same size as the sun the flare would cut out properly once the sun was fully occluded.

Also, is it possible to have a fade out animation for the flare? The same way the stock sun fades out behind planets, instead of turning off abruptly.

I agree with this suggestion. I have noticed this but it never really bothered me and still doesn't. There was always bigger fish to fry with this mod.

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