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

3 minutes ago, pingopete said:

Yeah TBF I'd imagine casting shadows onto those 3D detailed waves could be super cpu/gpu intensive

Well since the cloud shadows are relatively uniform and smooth you can just cast these shadows on an invisible, completely flat plane at sea level and no one will notice the difference. This is more or less how the cloud shadows used to work on water, but they didn't work for everyone.

Edited by blackrack
Link to comment
Share on other sites

1 minute ago, blackrack said:

Well since the cloud shadows are relatively uniform and smooth you can just cast these shadows on an invisible, completely flat plane at sea level and no one will notice the difference. This is more or less how the cloud shadows used to work on water, but they didn't work for everyone.

Ah I see, hmm maybe lowering scatterer ocean level will leave the shadows projecting onto the original ocean surface height :/

Link to comment
Share on other sites

1 minute ago, pingopete said:

Ah I see, hmm maybe lowering scatterer ocean level will leave the shadows projecting onto the original ocean surface height :/

The thing is the the shadows completely ignore the scatterer ocean because it's geometry doesn't really exist outside of the shader, it's basically the concept of the projected grid, so that should,n't be an issue, however there is an other problem somewhere.

Link to comment
Share on other sites

is there a way to remove the customized sun from scatter inside the atmosphere?i got astronomer's visual pack sun flare installed,and i would like to see it inside the atmosphere with scatter.

i try deleting textures from the sacter folder in the atmosphere files and then scatter didn't work,can some one help me out?

Link to comment
Share on other sites

37 minutes ago, Proteus said:

is there a way to remove the customized sun from scatter inside the atmosphere?i got astronomer's visual pack sun flare installed,and i would like to see it inside the atmosphere with scatter.

i try deleting textures from the sacter folder in the atmosphere files and then scatter didn't work,can some one help me out?

There isn't a way now but I'll add it. Keep in mind however it won't look right as it won't change color during sunsets/sunrises. To get around this I'm making my own sun flare shader.

Link to comment
Share on other sites

I haven't been following this too closely lately, so forgive me if this has been answered already, but has any progress been made getting celestial shadows (eclipses and stuff) to work? If so, would it be possible to add to a 1.0.4 game?

Link to comment
Share on other sites

2 hours ago, Mitchz95 said:

I haven't been following this too closely lately, so forgive me if this has been answered already, but has any progress been made getting celestial shadows (eclipses and stuff) to work? If so, would it be possible to add to a 1.0.4 game?

I'm working on it but haven't released anything yet http://forum.kerbalspaceprogram.com/index.php?/topic/103963-wip-scatterer-atmospheric-scattering-v0022-31012016/&do=findComment&comment=2391349

20 minutes ago, Proteus said:

looks great,when will it be released?

When it's ready.

Link to comment
Share on other sites

12 hours ago, blackrack said:

Is that first picture in the album an eclipse?

 

It looks great already.

 

edit - nm looking at the sun lighting up the surface of the mun it must be over the horizon.

Edited by Aegrim
Link to comment
Share on other sites

On 03/02/2016 at 0:08 AM, blackrack said:

The .gif and the video are definitely touched up :P THe other two images look fine though.

Usually when I want reference material I look for pics of the old apollo flights or for some ISS pics

http://history.nasa.gov/ap08fj/photos/a/as08-16-2593.jpg

http://41.media.tumblr.com/3222216ea9a6c17ad54ff8c72ebec90d/tumblr_nh5ey8FQjK1qigaa4o4_1280.jpg

http://www.lpi.usra.edu/resources/apollo/images/print/AS13/60/8588.jpg

http://www.universetoday.com/wp-content/uploads/2013/12/iss034e062490.jpg

https://www.nasa.gov/sites/default/files/images/653796main_iss031e070790_full.jpg

I think these are mostly unretouched and I find them very aesthetically pleasing even though the color balance might be a bit off in the apollo pics.

I was thinking of providing the saturation and hue settings it as a setting though, mostly for customization and for custom atmos and mod packs :P 

 

Eh, guys, we don't have to do this now, really no need to fight :P

This bluer look can already be achieved by making custom proland shaders for scatterer with the blue colour value ramped a bit, I've tried it for Earth already :)

Plus I think a lot of apollo images had quite low exposure making them look pretty dark, I bet if you darkened the exposure on this it'd look fairly similar

7FCPPwA.jpg

Edited by pingopete
Link to comment
Share on other sites

21 minutes ago, pingopete said:

This bluer look can already be achieved by making custom proland shaders for scatterer with the blue colour value ramped a bit, I've tried it for Earth already :)

Plus I think a lot of apollo images had quite low exposure making them look pretty dark, I bet if you darkened the exposure on this it'd look fairly similar

That looks gorgeous honestly. Anyway I noticed that RSS so much better even without any setting tweaks because the earth texture feels so natural and has so much detail in it.

 

2 hours ago, Aegrim said:

Is that first picture in the album an eclipse?

 

It looks great already.

 

edit - nm looking at the sun lighting up the surface of the mun it must be over the horizon.

The mun never shows as pitch black, even when the sun is not lighting it, that's stock lighting for you, and yes that first pic is an eclipse

Link to comment
Share on other sites

19 minutes ago, blackrack said:

That looks gorgeous honestly. Anyway I noticed that RSS so much better even without any setting tweaks because the earth texture feels so natural and has so much detail in it.

 

The mun never shows as pitch black, even when the sun is not lighting it, that's stock lighting for you, and yes that first pic is an eclipse

Blackrack I'm pretty sure you can export planet maps including normals/bump etc from SpaceEngine and I have a feeling they're free to use as you wish as they're randomly generated, might be a shout for stock KSP

Link to comment
Share on other sites

12 minutes ago, pingopete said:

Blackrack I'm pretty sure you can export planet maps including normals/bump etc from SpaceEngine and I have a feeling they're free to use as you wish as they're randomly generated, might be a shout for stock KSP

But can you generate a planet in space engine out of a Kerbin heightmap and nothing else?

Link to comment
Share on other sites

11 minutes ago, blackrack said:

But can you generate a planet in space engine out of a Kerbin heightmap and nothing else?

SwqkT6A.jpg

http://en.spaceengine.org/forum/17-1757-1

Not sure if just from height maps but someones done the above

 

On second thought, procedurally generated planets in SE don't allow, currently AFAIK, procedural terrain lower down, but still might be worth a try

Edited by pingopete
Link to comment
Share on other sites

1 minute ago, pingopete said:

http://en.spaceengine.org/forum/17-1757-1

Not sure if just from height maps but someones done the above

Awesome, but judging from the filesize he had to everything by hand, still, I'm checking it out. Btw one interesting but not well-known fact about space-engine is that it's atmospheres are also based on proland. But since it only has to support GLSL (OpenGL), the code is probably cleaner and closer to the original proland shaders and the configs are generated on the fly in-game. However, the extinction seems to be handled as one gray channel instead of RGB, so no sunset/sunrise color changes and there is dimming but no tinting of landmasses through the atmosphere.

Link to comment
Share on other sites

6 minutes ago, blackrack said:

Awesome, but judging from the filesize he had to everything by hand, still, I'm checking it out. Btw one interesting but not well-known fact about space-engine is that it's atmospheres are also based on proland. But since it only has to support GLSL (OpenGL), the code is probably cleaner and closer to the original proland shaders and the configs are generated on the fly in-game. However, the extinction seems to be handled as one gray channel instead of RGB, so no sunset/sunrise color changes and there is dimming but no tinting of landmasses through the atmosphere.

I had a feeling it was proland :P TBH I think the most noticeable colour change that happens on the terminators is to the white clouds and not land masses or atmosphere, so maybe rbray could implement a cloud change fade in with proximity to terminator. This also makes me wonder could a script be made that alters terrain and object Ambient lighting colour with relation to POV's proximity to kerbins terminators? That would look EPIC with your awesome sunset atmosphere colours.. aaand rbrays cloud reddenning featureTM  :P;)

Edited by pingopete
Link to comment
Share on other sites

22 minutes ago, pingopete said:

I had a feeling it was proland :P TBH I think the most noticeable colour change that happens on the terminators is to the white clouds and not land masses or atmosphere, so maybe rbray could implement a cloud change fade in with proximity to terminator. This also makes me wonder could a script be made that alters terrain and object Ambient lighting colour with relation to POV's proximity to kerbins terminators? That would look EPIC with your awesome sunset atmosphere colours.. aaand rbrays cloud reddenning featureTM  :P;)

I was thinking about this but thought it would be problematic to find out where the terminator starts with the scatterer atmosphere. Not sure how the lighting on the clouds is handled but I thought perhaps it could be manually "biased" to make it match the terminator, rbray would know better about this.

For the ambient lighting color I thought about this a while back but never tried it, I guess that now I'm attempting to add planetshine and playing with lights I could also give it a try, the color may have to be set manually and if you're really higher up in the atmosphere it may look weird if it only evaluates the camera's distance to the sunset and not the distance of every individual point. Another solution could be to create a shader that evaluates the light color as filtered through the atmosphere for every point in view and apply that color to the terrain, using the same exinction mechanism used for the sun color, but applying it for every point in the terrain instead of sunlight received by the camera. This would give correct results and color everywhere and automatically depending on the atmosphere properties. The cost for the far camera would be quite small, It would however need to be applied to the near camera also which may necessitate rendering an additional depth buffer, so there's a lot to explore here ;)

Edited: Btw I'm trying to fix the ocean disappearing when rotating the camera or being in orbit now, if I can do that I'll get rid of the ocean faked in postprocessing (which causes z-fighting), and then I could probably get away with rendering a huge depth buffer for the whole scene at once and not just the far camera.

Edited by blackrack
Link to comment
Share on other sites

1 minute ago, blackrack said:

I was thinking about this but thought it would be problematic to find out where the terminator starts with the scatterer atmosphere. Not sure how the lighting on the clouds is handled but I thought perhaps it could be manually "biased" to make it match the terminator, rbray would know better about this.

For the ambient lighting color I thought about this a while back but never tried it, I guess that now I'm attempting to add planetshine and playing with lights I could also give it a try, the color may have to be set manually and if you're really higher up in the atmosphere it may look weird if it only evaluates the camera's distance to the sunset and not the distance of every individual point. Another solution could be to create a shader that evaluates the light color as filtered through the atmosphere for every point in view and apply that color to the terrain, using the same exinction mechanism used for the sun color, but applying it for every point in the terrain instead of sunlight received by the camera. This would however need to be applied to the near camera also which may necessitate rendering an additional depth buffer, so there's a lot to explore here ;)

Haha wicked, yeah I don't have the faintest idea how one would calculate the terminator's position, I like the sound of the latter method anyway, it sounds like it'd be much more realistic and accurate though possible more demanding. Eitherway I let you ponder on these thoughts! ^_^

Link to comment
Share on other sites

 

On 2/15/2016 at 11:18 AM, blackrack said:

 However, the extinction seems to be handled as one gray channel instead of RGB, so no sunset/sunrise color changes and there is dimming but no tinting of landmasses through the atmosphere.

I think Space Engine does tint the sun through the atmosphere- at least in the latest beta, 0.9.7.4, the sunsets/sunrises on Mars are distinctly bluish.

Link to comment
Share on other sites

10 minutes ago, HerrGeneral said:

I think Space Engine does tint the sun through the atmosphere- at least in the latest beta, 0.9.7.4, the sunsets/sunrises on Mars are distinctly bluish.

I haven't tried 0.9.7.4 yet but last time I checked on 0.9.7.2 there was no such thing.

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