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

What are the reasons for the standard KSP-Unity lighting system not being capable of doing this? I made a crude attempt to see what had prevented Squad from doing it, but I don't know enough about shaders or Unity rendering setups to parse what I'm seeing. I used a simple sphere, scaled and positioned, with shadows enabled for the ScaledSpace bodies and light:

http://imgur.com/a/ac9fx

What is even going on in those orbit views?

Link to comment
Share on other sites

What are the reasons for the standard KSP-Unity lighting system not being capable of doing this? I made a crude attempt to see what had prevented Squad from doing it, but I don't know enough about shaders or Unity rendering setups to parse what I'm seeing. I used a simple sphere, scaled and positioned, with shadows enabled for the ScaledSpace bodies and light:

http://imgur.com/a/ac9fx

Performance mostly... Dynamic shadows are expensive. I tried doing it with the existing bodies similar to what you tried, but you get the issues you've seen. I'll be using a projector along with the scaled space body shader to render the body shadows.

Link to comment
Share on other sites

When I used think of shadows being created in games I would almost imagine a cone of "shadow" that would create shadow on anything that enters it. That's how it is in real life but I'm pretty certain that it isn't even vaguely similar to that when in programming. :P

Link to comment
Share on other sites

Hello Scatterer community!

I've got a little problem with my setting file (config/Settings.txt), when i leave the game normaly (by the menu) the setting file is erase by other settings. I've got two ways for this,either I make a back up, or I leave the game by Alt+F4.

Does anyone else have this problem?

What does erased by other settings mean? The default settings? Are all the config points erased? Also, you could just set the settings file to read-only and that should solve it.

It wasn't exactly the default settings, just the 2 first default config points and the rest of my settings erased. I've tried to set the settings file to read-only but it make the atmosphere in all the solar system when you are on your ship, not on ksc. Try, you will see!

But now, I don't know why I can't reproduce this issue, so much the better!:confused:

Sorry for the inconvenience.

Link to comment
Share on other sites

When I used think of shadows being created in games I would almost imagine a cone of "shadow" that would create shadow on anything that enters it. That's how it is in real life but I'm pretty certain that it isn't even vaguely similar to that when in programming. :P

Basically, a depth map/texture is rendered based from the camera view. This is then projected onto the scene's shadow receivers. This is also why some weirdness occurs at the edge of the two camera planes.

A good wiki article on the matter: https://en.wikipedia.org/wiki/Shadow_mapping

Link to comment
Share on other sites

What is even going on in those orbit views?

I'm not entirely sure. It doesn't seem to be an inverse shadow or a plane through the body because it's got those weird square bits at one side. It changed position, size and whether the rest of the planet was filled black based on camera position. You can see the effect on the Mun only when you're very close to its surface.

The testing in this case was done by iterating through all lights and setting their shadows to soft, setting castShadows and receiveShadows to true for all renderers with Mun or Kerbin in their name, setting shadowDistance to a stupidly high value, then setting a primative sphere's scale and position to that of the Mun CelestialBody.

Link to comment
Share on other sites

Is this a completely new bug with the new version or has it been happening for a while?

Does it work if you turn pixel light count back to 8?

It happened to me too. It occurs when I alt-tab to the desktop mainly. Sometimes also when I switch between the orbital view and the rocket while on Launchpad. It was occurring yet during the previous version of scatterer.

Link to comment
Share on other sites

had KSP being severely crashy for a while now. Thought it was running out of memory, but removing mods didn't help.

Finally I found the one (almost) constant in most of the crashes:

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

NullReferenceException: Object reference not set to an instance of an object

at scatterer.SkyNode.OnDestroy () [0x00000] in <filename unknown>:0

at scatterer.Manager.OnDestroy () [0x00000] in <filename unknown>:0

at scatterer.Core.OnDestroy () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

Hope that helps you :)

Link to comment
Share on other sites

had KSP being severely crashy for a while now. Thought it was running out of memory, but removing mods didn't help.

Finally I found the one (almost) constant in most of the crashes:

Hope that helps you :)

It's pretty normal to see that when the program is shutting down, for any reason.

All of the components in the game are cleanly destructed first and it notifies them that they are about to be destroyed in the event that they might want/need to take action. (such as freeing resources that they were using)

In otherwords, that error happened BECAUSE of the crash. It did not cause it.

Link to comment
Share on other sites

What do I need to edit in order to fix the sizing to work with my KScale2 setup? I assume this is accessible, since the RSS scaling exists?

It works right out of the box. The only thing thats not working as intended is map view. Blackrack said he was going to take a look at that.

Edit: Actually there's slight z-fighting/flickering in PQS with KScale2. And there's worse PQS z-fighting with 10xKerbol so:

blackrack: Any idea how to fix z-fighting with larger scale solar systems? (using dx9 btw)

Edited by ThorBeorn
Link to comment
Share on other sites

It works right out of the box. The only thing thats not working as intended is map view. Blackrack said he was going to take a look at that.

Edit: Actually there's slight z-fighting/flickering in PQS with KScale2. And there's worse PQS z-fighting with 10xKerbol so:

blackrack: Any idea how to fix z-fighting with larger scale solar systems? (using dx9 btw)

Post some screens please, I never heard of z-fighting in PQS.

dx11 only :(

This laptop only has dx9 ;~;

Only config tool requires dx11

Link to comment
Share on other sites

Post some screens please, I never heard of z-fighting in PQS.

Then it's probably not z-fighting. There's small black dots which flickers and appear more obvious the farther away you look towards the horizon. It was hardly noticible in the 2x rescale until you reached 12km. In the 10x rescale it was obvious from the ground almost. I'll see if I can get a screenshot.

I assume this refers to the issue where there is a smaller Kerbin apparently inside Kerbin?

Yes exactly. It's also mentioned in the OP.

Link to comment
Share on other sites

First off, I love your signature. Do you know what show it's from originally? :sticktongue:

Secondly, I am sadly not sure what can be done about running in compatibility modes. The current scattering effects in KSP are limited from what I understand. Wait and hope!

Link to comment
Share on other sites

Hello, and thanks for a terrific mod.

Is there a way to get around this bug while keep using DX11? I really want to play with scatterer, but cannot go opengl/DX9. Any other alternative?

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

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

Well... What is the reason you must stay away from DX9? Mod capacity? There are ways of squeezing 50+ mods in and still not use DX11 or Opengl. Are you a windows user Linux mac?

(The links below are really only of use if you're on windows)

64bit Hack http://forum.kerbalspaceprogram.com/...ity-workaround

64bit Unfixer http://forum.kerbalspaceprogram.com/...-Total-Unfixer

Link to comment
Share on other sites

Well... What is the reason you must stay away from DX9? Mod capacity? There are ways of squeezing 50+ mods in and still not use DX11 or Opengl. Are you a windows user Linux mac?

(The links below are really only of use if you're on windows)

64bit Hack http://forum.kerbalspaceprogram.com/...ity-workaround

64bit Unfixer http://forum.kerbalspaceprogram.com/...-Total-Unfixer

If you're going to spread that last link around you better let people know in advance that mod makers who have locked out 64bit will not be happy about bypassing their prevention mechanisms and will not give them support.

Link to comment
Share on other sites

If you're going to spread that last link around you better let people know in advance that mod makers who have locked out 64bit will not be happy about bypassing their prevention mechanisms and will not give them support.

Good point. I thought it was on the unfixer page. But absolutely, there is a reason mod makers don't support 64 bit and that's because milage drastically varries from user to user. The setup of your equipment has a lot to do with it as well. So yes I hearby submit myself for a scorning as it is well deserved :) But thank you for throwing that out there so I don't go making more of a mess for all the modders.

Link to comment
Share on other sites

Well... What is the reason you must stay away from DX9? Mod capacity? There are ways of squeezing 50+ mods in and still not use DX11 or Opengl. Are you a windows user Linux mac?

(The links below are really only of use if you're on windows)

64bit Hack http://forum.kerbalspaceprogram.com/...ity-workaround

64bit Unfixer http://forum.kerbalspaceprogram.com/...-Total-Unfixer

DX9 is only available on Windows - Linux and OSX only support OpenGL.

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