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

@NathanKell I gave the PartBuoyancy waterLevel offset a try and it seems that, if the part is already in the water, every time the water level is modified to be above the current height of the part, it will cause a kraken attack when that part reaches the surface. The whole screen goes black, the altimeter blank and the space music starts playing.

This basically renders the method unusable. Tested with a clean install on 32bit windows, dx9 and forced dx11.

Steps to reproduce this are simple, launch a craft in the water or load one that is already in the water (Tested with just a capsule to be sure). Add a positive ocean level offset, when the part rises, at the exact moment reaches the surface guaranteed kraken attack. Any ideas?

 

27 minutes ago, million_lights said:

I used The tool to try some things but the configs seem to work fine without any changes.

For the in flight view I didnt need to change anything, but I changed the ocean alpha value from 95% to 100% and adjusted the sunflare slightly to my liking. (ingame UI)

And I had to changed the atmoscale in mapview to one 10th of the original value (from 1000 to 100, I think). (again ingame UI)

 

Just to clarify, My version of the planets are shrunk down to 10% of the original size, so the atmo is a lot smaller.

-Mil

 

Is the postprocessing still active at that altitude? In the stock game these are avoided because the postprocessing and PQS are never visible that far away from the planet. In the case of such planet proportions I suppose it's not really a good idea to rely on the sky/orbit shader though, and you'll also need a custom scaledSpace model for the planet.

 

Link to comment
Share on other sites

Not sure if this counts as the "ocean artefacts" in the known bugs, but when you have orbital cam active (by being in orbit) and are in a low orbit area (somewhere below 120km for Kerbin) you get some very peculiar artefacting.

Most reliable method I have to reproduce the issue is to go in a 60km orbit around Laythe, since that also has oceans. The issue instantly cuts off at 70km at Laythe if that's helpful at all.


Link with a few screenshots: http://imgur.com/a/blgtB

Screenshots were taken around Laythe, at approximately 60km in a low stable orbit. It's almost like it can't handle two atmospheres, but I've also had it around Kerbin and there's no other body there with an atmosphere.

Link to comment
Share on other sites

21 minutes ago, blackrack said:

@NathanKell I gave the PartBuoyancy waterLevel offset a try and it seems that, if the part is already in the water, every time the water level is modified to be above the current height of the part, it will cause a kraken attack when that part reaches the surface. The whole screen goes black, the altimeter blank and the space music starts playing.

This basically renders the method unusable. Tested with a clean install on 32bit windows, dx9 and forced dx11.

Steps to reproduce this are simple, launch a craft in the water or load one that is already in the water (Tested with just a capsule to be sure). Add a positive ocean level offset, when the part rises, at the exact moment reaches the surface guaranteed kraken attack. Any ideas?

 

 

Is the postprocessing still active at that altitude? In the stock game these are avoided because the postprocessing and PQS are never visible that far away from the planet. In the case of such planet proportions I suppose it's not really a good idea to rely on the sky/orbit shader though, and you'll also need a custom scaledSpace model for the planet.

 

You were right!

I changed the altitude dependent items in the configs and the problem was gone. I already did that but restored the defaults by accident again.

thanks for the help :)

Link to comment
Share on other sites

Mmm loving the oceans --

But they bring a fresh bug (looks very much related to Hexicube's one above) for your programming pleasure (although as he's says it may be a known bug as ocean artifacts is a bit vague...).

 

In cockpit view over Kerbin, all goes swimmingly with the pretty pretty until...

2pyOGZT.jpg

 

...you bank ~90 degrees from horizontal: then it wigs right out...

xu33yja.jpg

 

Then goes OK again when you go off 90 by about 5-10 degrees...

nXakLzH.jpg

Link to comment
Share on other sites

4 minutes ago, -dead- said:

Mmm loving the oceans --

But they bring a fresh bug (looks very much related to Hexicube's one above) for your programming pleasure (although as he's says it may be a known bug as ocean artifacts is a bit vague...).

 

In cockpit view over Kerbin, all goes swimmingly with the pretty pretty until...

 

...you bank ~90 degrees from horizontal: then it wigs right out...

Then goes OK again when you go off 90 by about 5-10 degrees...

It's in the known issues section of the OP, also pretty much every 1 or 2 pages of the thread.

 

34 minutes ago, Hexicube said:

Not sure if this counts as the "ocean artefacts" in the known bugs, but when you have orbital cam active (by being in orbit) and are in a low orbit area (somewhere below 120km for Kerbin) you get some very peculiar artefacting.

Most reliable method I have to reproduce the issue is to go in a 60km orbit around Laythe, since that also has oceans. The issue instantly cuts off at 70km at Laythe if that's helpful at all.


Link with a few screenshots: http://imgur.com/a/blgtB

Screenshots were taken around Laythe, at approximately 60km in a low stable orbit. It's almost like it can't handle two atmospheres, but I've also had it around Kerbin and there's no other body there with an atmosphere.

This is the same bug as above but it's made worse by triggering the orbital cam, it isn't depending on height but on camera mode, if you switch to orbital cam while on the surface it also happens. It disappears at 70kms up because of the oceanDisableAltitude=70000 somewhere in the config files.

Link to comment
Share on other sites

3 hours ago, blackrack said:

@NathanKell I gave the PartBuoyancy waterLevel offset a try and it seems that, if the part is already in the water, every time the water level is modified to be above the current height of the part, it will cause a kraken attack when that part reaches the surface. The whole screen goes black, the altimeter blank and the space music starts playing.

This basically renders the method unusable. Tested with a clean install on 32bit windows, dx9 and forced dx11.

Steps to reproduce this are simple, launch a craft in the water or load one that is already in the water (Tested with just a capsule to be sure). Add a positive ocean level offset, when the part rises, at the exact moment reaches the surface guaranteed kraken attack. Any ideas?

@NathanKell

I did some more tesing and it seems this kraken only happens if the water level is offset in the range of 0-10 or 0-20.

As a workaround for now I'm setting the normal ocean level to -5.

 

Link to comment
Share on other sites

I just updated to v0.0215 and now the planet doesn't completely block out the sun. I've gone back and checked v0.021 to make sure I didn't miss it before and it definitely was working properly in that version. I've tested directx9, 11, and opengl and it occurs in all three.

One thing I noticed is that in v0.0215 the graphic for the sun have changed, it is using the graphics from in the proland folder whereas in v0.021 it doesn't even thought the files are there as well.

Any ideas whats wrong? 

 

http://i.imgur.com/odhZWVq.png

Link to comment
Share on other sites

I had Kerbin shining through the Mun the other day but I had just installed this and a few others. I had zero experience with it and wasnt sure if I just didnt do something right or one of the other mods was causing it or what so I didnt say anything. I removed it and the problem went away. I still have little clue what was actually causing it. But since you mentioned it, I thought I would chime in just in case there really is something going on there. I dont see many posting about it though and I still dont have any clue whats causing it.

Link to comment
Share on other sites

Anyone knows if it's possible to run calculations in their own thread in KSP?

 

1 hour ago, mreadshaw said:

I just updated to v0.0215 and now the planet doesn't completely block out the sun. I've gone back and checked v0.021 to make sure I didn't miss it before and it definitely was working properly in that version. I've tested directx9, 11, and opengl and it occurs in all three.

One thing I noticed is that in v0.0215 the graphic for the sun have changed, it is using the graphics from in the proland folder whereas in v0.021 it doesn't even thought the files are there as well.

Any ideas whats wrong? 

http://i.imgur.com/odhZWVq.png

This is because of the new atmoScale parameter I believe, wait for next update.

Edited by blackrack
Link to comment
Share on other sites

4 minutes ago, blackrack said:

This is because of the new atmoScale parameter I believe, wait for next update.

Ok cool. Just as extra info it only happens around bodies that have an atmo and I've noticed that the sun glare uses different graphics if you're in an SOI that has an atmo. If it doesn't than the sun is the same as previous versions (the correct graphic?).

Link to comment
Share on other sites

35 minutes ago, blackrack said:

Anyone knows if it's possible to run calculations in their own thread in KSP?

@ferram4 started a thing for multithreading, not sure if it got past the concept phase: http://forum.kerbalspaceprogram.com/index.php?/topic/82141-wip-ksp-threading-system-multithreading-utility-now-with-pre-release-for-modders/

Maybe drop him a line?

Link to comment
Share on other sites

21 minutes ago, Red Iron Crown said:

@ferram4 started a thing for multithreading, not sure if it got past the concept phase: http://forum.kerbalspaceprogram.com/index.php?/topic/82141-wip-ksp-threading-system-multithreading-utility-now-with-pre-release-for-modders/

Maybe drop him a line?

Alright, thanks.

Edited by blackrack
Link to comment
Share on other sites

Just now, blackrack said:

Anyone knows if it's possible to run calculations in their own thread in KSP?

It's possible, you just have to be a little careful.

 

Unity objects aren't thread safe, so you can't just access one object from another thread when something else might access it from the main thread. Sometimes you can get away with making copies of an object, other times that isn't really possible.

Simple math calculations, or other operations like that, can be run in another thread just fine. The only issue is that you have to either finish everything in that thread before you access it, or have some way of synchronizing threads before you try to access anything. For instance, SCANsat does some math heavy interpolation in a separate thread while generating the planetary overlay maps.

 

Engineer does its fuel flow simulation in a separate thread, if you want a more complex example.

Edited by DMagic
Link to comment
Share on other sites

2 minutes ago, DMagic said:

It's possible, you just have to be a little careful.

 

Unity objects aren't thread safe, so you can't just access one object from another thread when something else might access it from the main thread. Sometimes you can get away with making copies of an object, other times that isn't really possible.

Simple math calculations, or other operations like that, can be run in another thread just fine. The only issue is that you have to either finish everything in that thread before you access it, or have some way of synchronizing threads before you try to access anything. For instance, SCANsat does some math heavy interpolation in a separate thread while generating the planetary overlay maps.

 

Engineer does its fuel flow simulation in a separate thread, if you want a more complex example.

Great, thanks a lot, this is exactly what I was looking for. I want to run a fourier transform in it's own thread, this should be totally possible then? I'll look at how these do it.

Link to comment
Share on other sites

Friendly question, am I supposed to have to alt-f10 and press "load atmosphere" every time I load the game up to get anything other than the defaults, or am I doing something wrong?

Edited by Aegrim
Link to comment
Share on other sites

21 minutes ago, Aegrim said:

Friendly question, am I supposed to have to alt-f10 and press "load atmosphere" every time I load the game up to get anything other than the defaults, or am I doing something wrong?

Just change whatever you want and press save atmo. The next time you load the game or press load atmo it will load those settings you saved. Load default will load default settings.

Link to comment
Share on other sites

2 hours ago, blackrack said:

Great, thanks a lot, this is exactly what I was looking for. I want to run a fourier transform in it's own thread, this should be totally possible then? I'll look at how these do it.

Alright, now I REALLY want to know why you are performing a Fourier transform.

Link to comment
Share on other sites

18 minutes ago, rbray89 said:

Alright, now I REALLY want to know why you are performing a Fourier transform.

It's used to generate the waves, I'm just switching it to a separate thread on the CPU, instead of running it on the GPU, that way I can access the wave heights without having to do very expensive rendertexture ->  encoded texture2d -> decode operations that kill the framerate. It's pretty much what you suggested the other day when you said I should run the calculations on the CPU, but the calculations are still heavy, fortunately I think I can run it in it's own thread.

Btw I'm probably gonna need your help on something else, I'll message you soon.

Edited by blackrack
Link to comment
Share on other sites

43 minutes ago, legoclone09 said:

I am using 64k, and there are a few bugs. The ocean renders as a pitch black further than about 25m away and there is a translucent blue-ish orb the size of normal Kerbin where Kerbin is in map view.

Please read the first post and just about every second post in the last 5 pages.

Link to comment
Share on other sites

While everyone eagerly awaits some more voodoo wizardry I think it's worth pointing out you can roll back to 21c and turn off the oceans to pretty much enjoy scatterer in it's original form.  While 215 also broke the atmospheric scattering, the last release was stable enough state to enjoy consistently (though I'd still recommend constant saves as my experience has been it crashes quite often).  I know everyone lost their minds with the new water, but given the number of bugs and instability that comes with it, and just in case it isn't well known, disabling it is definitely an option.  Might take the edge off of for some of you champing at the bit?

220B6E7F9E8686880C57723B391187AC9B1364D1

Edited by Hyomoto
Link to comment
Share on other sites

6 minutes ago, Hyomoto said:

While everyone eagerly awaits some more voodoo wizardry I think it's worth pointing out you can roll back to 21c and turn off the oceans to pretty much enjoy scatterer in it's original form.  While 215 also broke the atmospheric scattering, the last release was stable enough state to enjoy consistently (though I'd still recommend constant saves as my experience has been it crashes quite often).  I know everyone lost their minds with the new water, but given the number of bugs and instability that comes with it, and just in case it isn't well known, disabling it is definitely an option.  Might take the edge off of for some of you champing at the bit?

Lies and blasphemy!!!

Link to comment
Share on other sites

19 minutes ago, Hyomoto said:

While everyone eagerly awaits some more voodoo wizardry I think it's worth pointing out you can roll back to 21c and turn off the oceans to pretty much enjoy scatterer in it's original form.  While 215 also broke the atmospheric scattering, the last release was stable enough state to enjoy consistently (though I'd still recommend constant saves as my experience has been it crashes quite often).  I know everyone lost their minds with the new water, but given the number of bugs and instability that comes with it, and just in case it isn't well known, disabling it is definitely an option.  Might take the edge off of for some of you champing at the bit?

Disabling it is definitely not an option anymore for me.

Link to comment
Share on other sites

I CANT believe the water shaders are finally released.  You are giving me christmas early this year, thank you man!

NOPE...   I don't see the shaders.  Did I install the mod wrong?  Put it in gamedata..   I'm very sad now....
 

UPDATE- NEVERMIND IT WORKS!  No idea why it didn't work on the first time.. maybe I didn't have it turned on. :)

Edited by mcbmaestro
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...