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

2 hours ago, Errol said:

Does this also mean we can have shadows on rings, like for OPM or something?

Well, rbray was working on a "universal" planet shadows shader, however they don't work with the scatterer atmospheres which why I'm doing these now. You could check with him If his implementation works with rings.

However I was also experimenting with my own rings shader a while back which handles it's planet shadow internally. This was a quick try and I haven't finished it yet but I plan to get back to it

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

 http://i.imgur.com/0BkSC62.png (ignore the clipped polygon up top)

 

Edited: Progress on the eclipse shader

Here are what eclipses in the kerbin-mun system look like with different size settings for the mun and the sun

 

 

Edited by blackrack
Link to comment
Share on other sites

Amazing! I've always wanted eclipse shadows, they just look so epic. I assume that there needs to be more tweaking before it's ready, and of course making the terrain darken under the eclipse shadow. EVE darkens the terrain under cloud shadows, so I'm sure it's possible. Would it work together with EVE though? For example, would eclipse shadows also darken cloud layers and would their ground shadows smoothly mesh together with cloud shadows?

Link to comment
Share on other sites

43 minutes ago, Poodmund said:

Seems to be working fine. :D

Great, does the rim fix also work?

Edited:

1 hour ago, TyrannoFan said:

Amazing! I've always wanted eclipse shadows, they just look so epic. I assume that there needs to be more tweaking before it's ready, and of course making the terrain darken under the eclipse shadow. EVE darkens the terrain under cloud shadows, so I'm sure it's possible. Would it work together with EVE though? For example, would eclipse shadows also darken cloud layers and would their ground shadows smoothly mesh together with cloud shadows?

Not sure how to handle this yet. The terrain isn't currenlty darkened and since I'm planning to add planetshine/multiple suns pretty sure the best way to do both is to somehow obtain the original terrain shaders and modify them or build some new terrain shaders. Rbray was also working on something like this https://www.reddit.com/r/KerbalSpaceProgram/comments/3s3m9g/working_on_celestial_shadows/ , and his approach is different and handles terrain darkening but also doesn't work with the scatterer atmospheres. Not sure if he got it working with clouds though at the time. I can make the EVE clouds go dark when seen from orbit but ground view remains a problem. I could also add the code I'm using to the EVE clouds shader, it'd result in some calculations being done twice but it'd work.

 

16 hours ago, skykooler said:

Wow! The second-to-last picture looks amazingly ominous, I suppose because the sky is dark but the ground lighting is still full-power.

Well the ground (PQS) isn't affected yet so there's that. The scaledspace darkening is faked in the extinction shader, I suppose a similar approach would also work for the the PQS if I was to try it but it'd also be depth-buffer based.

Edited by blackrack
Link to comment
Share on other sites

2 hours ago, skykooler said:

Using the depth buffer might be a good idea, because it would also darken things using shaders other than the terrain shader (e.g. the KSC, or vessels).

Yeah but so far using the depth buffer has also been causing lots of artifacts and other precision issues.

Edited: First try at godrays.

I obviously messed up a few important things but still, it kind of works. 

pvRS8Wc.jpg

Edited by blackrack
Link to comment
Share on other sites

Hi guys, I have this problem.

image.jpg

image.jpg

image.jpg

image.jpg

 

Too much resolution for the ocean, I see all the detailed waves even at maximum height. I have the 1.0.5 version clean with only scattered, opengl and popup window. Can you help me?

Edited by RaffaCT14
Link to comment
Share on other sites

7 minutes ago, RaffaCT14 said:

Hi guys, I have this problem.

image.jpg

image.jpg

image.jpg

image.jpg

 

Too much resolution for the ocean, I see all the detailed waves even at maximum height. I have the 1.0.5 version clean with only scattered, opengl and popup window. Can you help me?

There's a variable in one of the config files that says fakeoceanaltitude or oceandeactivatealtitude, try changing its value and see if it does anything.

Link to comment
Share on other sites

21 minutes ago, RaffaCT14 said:

Thank you very much for the fast reply!

I have the same problem, but now the ocean disappears at a lower altitude than before.

image.jpg

Well my idea was to make it higher so they have more room to merge "smoothly". Other than that I'm not sure what's going on, it looks like you're getting some kind of "noise" which I haven't seen before.

Link to comment
Share on other sites

12 hours ago, blackrack said:

Here are some fresh screens for you, still a lot to figure out and many issues to fix though.

That just screams for dynamically adjusting ambient lightning level for crafts basing on current light level in the atmosphere at the spot where the craft is.

Link to comment
Share on other sites

Using the latest dev build and files that you have posted here, Blackrack, I have just noticed I am getting this old bug again: http://i.imgur.com/2WFN83j.png, where the Scatterer effect renders ahead of any planets in front. I though that this got squished a while back?

EDIT: After a little poking (and I know this is technically outside your remit but) this seems to be happening when orbiting Urlum (Outer Planets Mod) and a body is passed between it and the camera. When I switch the craft to orbit Polta the 'mask' effect immediately disappears. Is there something that should be added to any further added bodies to remedy this?

Edited by Poodmund
Link to comment
Share on other sites

54 minutes ago, Poodmund said:

Using the latest dev build and files that you have posted here, Blackrack, I have just noticed I am getting this old bug again: http://i.imgur.com/2WFN83j.png, where the Scatterer effect renders ahead of any planets in front. I though that this got squished a while back?

EDIT: After a little poking (and I know this is technically outside your remit but) this seems to be happening when orbiting Urlum (Outer Planets Mod) and a body is passed between it and the camera. When I switch the craft to orbit Polta the 'mask' effect immediately disappears. Is there something that should be added to any further added bodies to remedy this?

Does this happen outside the map view?

Link to comment
Share on other sites

1 minute ago, Poodmund said:

I couldn't test that situation (I couldn't set up an orbit/alignment case to test :( ), I would think its almost very-improbably as what I found is that it depends on altitude of orbit/proximity to body???

Heres a video of whats going on: https://vimeo.com/153108435

Alright, I think I know what it is, I'll have it fixed shortly.

Link to comment
Share on other sites

55 minutes ago, SkyKaptn said:

@Poodmund @blackrack Latest dev build: I still get the planetary rings drawn behind the gas giants. (OPM)

Pictures on page 118 from previous report.

Yes, I said nothing about this being fixed, I might have it fixed soon though.

Edited: @Poodmund try this fix for the mapview atmosphere drawing on top of other planets:  https://mega.nz/#!CNAwFC7a!JlosJLmYp8jnT8peg2Ctw5UT25nj7AGHzArHsSumre8

Edited by blackrack
Link to comment
Share on other sites

21 hours ago, blackrack said:

Well my idea was to make it higher so they have more room to merge "smoothly". Other than that I'm not sure what's going on, it looks like you're getting some kind of "noise" which I haven't seen before.

That problem appears only with opengl, when I play without it there are only a lot of artifacts. :D

image.jpg

image.jpg

 

I'll wait the new version of the mod. Thank you for the help yesterday! :)

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