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

38 minutes ago, blackrack said:

Great, btw this image http://i.imgur.com/S8t9AxB.jpg makes me think that we could come up with some kind of fake "light scattering inside the clouds" effect, I've seen a paper on the subject, I will have to dig it up.

Maybe a use for Command buffers? XD

EDIT: Actually, yeah... render a light sphere for each cloud into a render texture to use as a light map. Then pass that into the shader for the particles.

Edited by rbray89
Link to comment
Share on other sites

5 hours ago, rbray89 said:

Maybe a use for Command buffers? XD

EDIT: Actually, yeah... render a light sphere for each cloud into a render texture to use as a light map. Then pass that into the shader for the particles.

So I was getting some abysmal performance with the particles, what with the added scattering and the sheer number of particles, I decided to drop alpha blending, enable z-writing and z-testing and use the old discard/alpha-testing method to see if it would help with performance.

Instead I got these cartoony clouds:

 

And the funny thing is, even the way they move is cartoony.

 

Edited: if anyone wants to try it https://www.reddit.com/r/KerbalSpaceProgram/comments/4dsoo4/eve_clouds_fluffy_cartoon_edition/d1u1y1m

Edited by blackrack
Link to comment
Share on other sites

24 minutes ago, blackrack said:

And the funny thing is, even the way they move is fitting:

 

Hehe, that's awesome! if KSP had the flat artstyle this would be perfect for it :)
Yeah, you don't want to do hardly anything in the fragment shader there... can you do everything in the vertex shader and just use a singular point for the entire particle (similar to what I do for alpha/color)? Should be close enough.

Edited by rbray89
Link to comment
Share on other sites

4 minutes ago, rbray89 said:

Hehe, that's awesome! if KSP had the flat artstyle this would be perfect for it :)
Yeah, you don't want to do hardly anything in the fragment shader there... can you do everything in the vertex shader and just use a singular point for the entire particle (similar to what I do for alpha/color)? Should be close enough.

I will try it, that should definitely ease up on the performance.

Link to comment
Share on other sites

30 minutes ago, blackrack said:

So I was getting some abysmal performance with the particles, what with the added scattering and the sheer number of particles, I decided to drop alpha blending, enable z-writing and z-testing and use the old discard/alpha-testing method to see if it would help with performance.

Instead I got these cartoony clouds:

 

And the funny thing is, even the way they move is cartoony.

 

I don't even care how cartoony it looks, just seeing somewhat dynamic shading onto particles makes me excited AF!!

Link to comment
Share on other sites

40 minutes ago, rbray89 said:

Hehe, that's awesome! if KSP had the flat artstyle this would be perfect for it :)
Yeah, you don't want to do hardly anything in the fragment shader there... can you do everything in the vertex shader and just use a singular point for the entire particle (similar to what I do for alpha/color)? Should be close enough.

Ok this works performance-wise but I can sort of see why it would be limiting in the shading. Btw one quick question, I thought you were using a bunch of camera-facing quads but from the results I'm seeing it looks like it's acting as a singluar point (like you mentioned), what's happening exactly? Does the interpolation over a quad not happen the way I'd imagine it (ie interpolate smoothly across the surface) or am I missing something else?

And btw are the particles and their positions/distribution generated on the GPU?

Edited by blackrack
Link to comment
Share on other sites

10 minutes ago, blackrack said:

Ok this works performance-wise but I can sort of see why it would be limiting in the shading. Btw one quick question, I thought you were using a bunch of camera-facing quads but from the results I'm seeing it looks like it's acting as a singluar point (like you mentioned), what's happening exactly? Does the interpolation over a quad not happen the way I'd imagine it (ie interpolate smoothly across the surface) or am I missing something else?

And btw are the particles and their positions/distribution generated on the GPU?

Ah, yeah... so the quad vertexes are moved to face the camera in the shader. The particle is moved, sized, and rotated from via the perlin noise generator. Three textures are used in such a way that they appear as three separate sides.

Link to comment
Share on other sites

17 minutes ago, rbray89 said:

Ah, yeah... so the quad vertexes are moved to face the camera in the shader. The particle is moved, sized, and rotated from via the perlin noise generator. Three textures are used in such a way that they appear as three separate sides.

I see. Btw I found that paper, http://www.markmark.net/PDFs/RTCloudsForGames_HarrisGDC2002.pdf haven't read it yet so not sure if it's any good and though it's more than a decade old the images they include look good so it might be cool.

It comes with demos and source-code http://www.markmark.net/SkyWorks/ both are missing but the waybackMachine has them archived https://web.archive.org/web/20060209071205/http://www.markmark.net/SkyWorks/

Edited by blackrack
Link to comment
Share on other sites

I don't know if this was brought up before, but is it possible to add global lighting for planet reflections at night time? Like Planetshine, but for the surface, at night, with brightly lit planet/moon above? Also, is it possible to change the brightness level for planets in the sky at night? For example, in this screen shot, Jool should probably be as bright as it is from space.

 

3F7bIK2.jpg 

Link to comment
Share on other sites

4 hours ago, niky83 said:

just a litle ask, how can i deactivate only the atmospherique effect and keep the ocean? in 1.1 it's a lilte buggy for atmo ^^ so, i prefert keep only water effect... thx for answer :D

Disable post processing in Scatterer settings.

Link to comment
Share on other sites

On 4/7/2016 at 9:20 AM, blackrack said:

Some people have it, it pops up every now and then but I couldn't narrow it down or reproduce it.

Happens to me all the time. I only have kerbal engineer and scatterer. I don't have a graphics card though (running the igp). Might that cause the issue?

Link to comment
Share on other sites

7 minutes ago, SketchBot said:

Happens to me all the time. I only have kerbal engineer and scatterer. I don't have a graphics card though (running the igp). Might that cause the issue?

I tested with an igp and didn't have that issue so I'm inclined to say no.

 

12 hours ago, quantumpion said:

I don't know if this was brought up before, but is it possible to add global lighting for planet reflections at night time? Like Planetshine, but for the surface, at night, with brightly lit planet/moon above? Also, is it possible to change the brightness level for planets in the sky at night? For example, in this screen shot, Jool should probably be as bright as it is from space. 

Not possible at the moment unless you set the extinction to zero. Adaptive/dynamic exposure might be added at some point though.

For planetshine it's a planned feature and I already worked on it a bit but won't be back to it for a while, see here:

http://forum.kerbalspaceprogram.com/index.php?/topic/103963-wip11-scatterer-atmospheric-scattering-v00242-05042016-11-compatible-faster-loading/&do=findComment&comment=2364508

http://forum.kerbalspaceprogram.com/index.php?/topic/103963-wip11-scatterer-atmospheric-scattering-v00242-05042016-11-compatible-faster-loading/&do=findComment&comment=2364554

http://forum.kerbalspaceprogram.com/index.php?/topic/103963-wip11-scatterer-atmospheric-scattering-v00242-05042016-11-compatible-faster-loading/&do=findComment&comment=2402734

Link to comment
Share on other sites

On 2016. 02. 20. at 4:02 AM, blackrack said:

Don't really know how to fix that one.

That would be asking too much.

Thanks for the reply, since then the problem disappeared. I had to reinstall my windows, and I installed the newest Crimson drivers. And I haven't seen the issue appear since. But that was before the 1.1 prerelease. There's no problem with this, other than the black "lines" on the horizon. But that's not bad at all.

But thank you very much for your reply. I appreciate it.

Link to comment
Share on other sites

4 minutes ago, Imasundaj said:

Thanks for the reply, since then the problem disappeared. I had to reinstall my windows, and I installed the newest Crimson drivers. And I haven't seen the issue appear since. But that was before the 1.1 prerelease. There's no problem with this, other than the black "lines" on the horizon. But that's not bad at all.

But thank you very much for your reply. I appreciate it.

I fixed the black horizon line a day or two ago:  https://mega.nz/#!iUJiBQTQ!4bYUYDj_vFb8t-H_8WWxMSnU9BAkjI6q74aTj2bX6ak

 

2 hours ago, sebastien1214 said:

Hello, where can we found the add-on for the v1.0.5 of KSP ?

In the OP or press "changelog" on spacedock.

Edited by blackrack
Link to comment
Share on other sites

25 minutes ago, daniel l. said:

Hey @blackrack any plans to release a standalone flare mod anytime soon ;) We Kopernicus modders would greatly appreciate it.

Whats wrong with this one ThomasP already made? Just curious why Blackrack needs to reinvent the wheel so to speak.

Link to comment
Share on other sites

1 minute ago, Svm420 said:

Whats wrong with this one ThomasP already made? Just curious why Blackrack needs to reinvent the wheel so to speak.

Blackracks flare is different, Unlike the default flare system that Thomas made, The flares in blackracks system scale properly and get smaller and smaller with distance, Plus the flare is stored in PNG format, making it easier to edit.

Link to comment
Share on other sites

1 hour ago, daniel l. said:

Blackracks flare is different, Unlike the default flare system that Thomas made, The flares in blackracks system scale properly and get smaller and smaller with distance, Plus the flare is stored in PNG format, making it easier to edit.

I can't agree.
I love the possibilities with Blackrack's flare and I'm using it right now, but still needs to be tweaked a bit more (no hurry btw, is not urgent): the ghost remains always at the same size and the flare glows over the sun's surface in close-ups (which is 100% realistic for a regular camera or the human eye, but in that way you can't enjoy that taste to the cinematic suns or the telescopic images -like in stock, where you can see the surface of the sun-).

 

 

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