Jump to content

[WIP][1.9 -1.12] Scatterer-atmospheric scattering (0.0772 - 18/06/2021)


blackrack
 Share

Recommended Posts

So I downloaded it and had a look and what I saw was good. Except for it made my EVE clouds disappear and it looked wrong from orbit, too much on the day side. I think if the fix suggested earlier for changing stuff as you get higher and from the sounds of it some of the other fixes in the pipeline happen then I will reinstall but until then I'll just watch with interest.

Link to comment
Share on other sites

I'm the only one having issues with the config tool?

I've tried it in two different PC (both with NVIDIA cards and updated drivers, one Windows 7 other 8.1), but both says that plattaform can't handle shaders (wich is not true). I'm doing something wrong? :(

The mod works perfectly well. :confused:

Edited by Proot
Link to comment
Share on other sites

I'm the only one having issues with the config tool?

I've tried it in two different PC (both with NVIDIA cards and updated drivers, one in Windows 7 other on 8.1), but both says that plattaform can't handle shaders (wich is not true). I'm doing something wrong? :(

The mod works perfectly well. :confused:

Do you have a directx-11 capable card? Try adding the -force-d3d11 command line

Link to comment
Share on other sites

Download the scatterer archive from KerbalStuff, then drop the 'scatterer' directory from the archive into your KSP installs GameData directory

Thanks, that's the first thing i tried and it worked.

Blackrack, I would suggest you put the scatterer folder into a "GameData" folder for the download so that people know where to put it.

I love the way this makes everything look, I especially like how in the mornings and evenings, the ground darkens and gets a special tint to it. I like the postprocessing fog, but It can be a bit overwhelming. I tried turning it down and it didn't really change much. Also, when there are multiple layers of distance (i.e. when the mountains are the back, and there are two or three smaller hill crests visible too) there appears to be a line of dark pixels outlining each hill crest.

Another nitpick, the menu SHOULD NOT come up by default EVERY SCENE and have to be toggled off. It could come up one time after installation so people know how to access it and use it, but it is very annoying loading up a craft and every single scene having to toggle the scatterer screen. (and sometimes the module manager screen too)

Also, during night time, the fog turns a weird red color, reminds me a zombie apocalypse. The mountains become red instead of light blue.

and last but not least, this mod froze my time warp once. I was trying to warp to morning and it just. stopped. It said i was warping at 1000x, but it wasn't warping, it was stuck. And warp wouldn't work at all after that until my game crashed and i reloaded it.

Sorry for all the complaints, and I do understand that this is a WIP, but that's precisely why I gave all those. So they can be added to the work in progress. Beautiful mod though! Once this is more stable and has less space screw ups I can see this being an essential mod to any save I have.

Link to comment
Share on other sites

I have problems getting scaledspace to work correctly, I know how you scale things up or down and the coordinate system changes, but the problem is my shaders have to be fed the cameraToWorld matrix and the camera's transform.forward as well as other stuff. The problem is, I can't find a way to translate these things to scaledSpace coordinates so the shaders are working wrong because they think the camera is in a completely different position and orientation.

Thanks, that's the first thing i tried and it worked.

Blackrack, I would suggest you put the scatterer folder into a "GameData" folder for the download so that people know where to put it.

I love the way this makes everything look, I especially like how in the mornings and evenings, the ground darkens and gets a special tint to it. I like the postprocessing fog, but It can be a bit overwhelming. I tried turning it down and it didn't really change much. Also, when there are multiple layers of distance (i.e. when the mountains are the back, and there are two or three smaller hill crests visible too) there appears to be a line of dark pixels outlining each hill crest.

Another nitpick, the menu SHOULD NOT come up by default EVERY SCENE and have to be toggled off. It could come up one time after installation so people know how to access it and use it, but it is very annoying loading up a craft and every single scene having to toggle the scatterer screen. (and sometimes the module manager screen too)

Also, during night time, the fog turns a weird red color, reminds me a zombie apocalypse. The mountains become red instead of light blue.

and last but not least, this mod froze my time warp once. I was trying to warp to morning and it just. stopped. It said i was warping at 1000x, but it wasn't warping, it was stuck. And warp wouldn't work at all after that until my game crashed and i reloaded it.

Sorry for all the complaints, and I do understand that this is a WIP, but that's precisely why I gave all those. So they can be added to the work in progress. Beautiful mod though! Once this is more stable and has less space screw ups I can see this being an essential mod to any save I have.

The red thing is fixed and will be released in the next update. The line of dark pixels is inevitable for now because the depth buffer the game writes is always aliased.

I'll do the menu thing.

Link to comment
Share on other sites

The red thing is fixed and will be released in the next update. The line of dark pixels is inevitable for now because the depth buffer the game writes is always aliased.

I'll do the menu thing.

Awesome! Sorry if I sounded rude in my post, I really did not intend to. Just constructive criticism. I hope you understand that. :)

Plus the fact that you listened and acted makes you an awesome person and modder. :)

That's unfortunate about the dark pixels, I guess if I want really really nice pictures using this mod I'll have to go in photoshop and edit the pixels out. worth it though!

EDIT: Any guesses about why my timewarp stopped working? There's a small chance it was another mod, but since this one messed with the sky i thought it might have been this one.

Link to comment
Share on other sites

Awesome! Sorry if I sounded rude in my post, I really did not intend to. Just constructive criticism. I hope you understand that. :)

Plus the fact that you listened and acted makes you an awesome person and modder. :)

That's unfortunate about the dark pixels, I guess if I want really really nice pictures using this mod I'll have to go in photoshop and edit the pixels out. worth it though!

EDIT: Any guesses about why my timewarp stopped working? There's a small chance it was another mod, but since this one messed with the sky i thought it might have been this one.

It's alright, i'm guessing if you try downsampling (not sure if it works with KSP) the dark pixels would go away, It's just a guess though so it may or may not work. The dark pixels are also definitely more pronounced in dx11 and opengl (both buggy as hell with the postprocessing shader).

No idea about the timewarp but it never happened to me using scatterer and a heavily modded install.

Link to comment
Share on other sites

It's alright, i'm guessing if you try downsampling (not sure if it works with KSP) the dark pixels would go away, It's just a guess though so it may or may not work. The dark pixels are also definitely more pronounced in dx11 and opengl (both buggy as hell with the postprocessing shader).

No idea about the timewarp but it never happened to me using scatterer and a heavily modded install.

I wasn't using that many* mods, I was using BahamutoD's mods with quiztech and FAR.

*along with ShowFPS and the reducing lag setting.cfg

Link to comment
Share on other sites

Do you have a directx-11 capable card? Try adding the -force-d3d11 command line

No way to get it running. I must be doing something wrong, but I don't know what... Right now I'm trying in W7 with a GT540M (DirectX 11 GPU, Shader Model 5.0 support). The first run worked, but stopped trying to generate a new configuration. So I updated the drivers (all fine) and now this says that shaders are not supported.

...? :confused:

Link to comment
Share on other sites

This seems dodgy, but it could be scatterer doing it as well (though I don't really see a reason why it would), just remember we're still pretty early in development.

It just changes two things in the settings, it changes mindistance and maxsubdivision. (it reduces how much water KSP loads, which takes massive amounts of CPU power, so lowering those numbers boosts performance by 10 fold easy. ) nothing that should cause bugginess.

Link to comment
Share on other sites

No way to get it running. I must be doing something wrong, but I don't know what... Right now I'm trying in W7 with a GT540M (DirectX 11 GPU, Shader Model 5.0 support). The first run worked, but stopped trying to generate a new configuration. So I updated the drivers (all fine) and now this says that shaders are not supported.

...? :confused:

Is there anything other than shaders not supported in the little debug box? With directX11 and shader model 5 it should work. If you're on a laptop maybe it's starting on the IGP? I remember Optimus being buggy as hell, if I'm not mistaken, there's a setting somewhere that allows an application to start on the GPU instead of the iGPU. If all else fails I think plugging in a hdmi monitor or TV forces everything to run off the main GPU.

Link to comment
Share on other sites

So I was thinking about support for clouds, and I fear they may not play nicely with the post-processing method for doing the light scattering.

Because post-processing occurs at the last stage of rendering, there is no good way to mask off the clouds. You could change the cloud shader to write to the depth buffer, but that would ruin anything behind it.

What you could do, is instead of doing post-processing, is add physical geometry like I do for my atmosphere (a large cube around the camera). Then the draw order can be altered such that it is before the transparent clouds.

Link to comment
Share on other sites

So I was thinking about support for clouds, and I fear they may not play nicely with the post-processing method for doing the light scattering.

Because post-processing occurs at the last stage of rendering, there is no good way to mask off the clouds. You could change the cloud shader to write to the depth buffer, but that would ruin anything behind it.

What you could do, is instead of doing post-processing, is add physical geometry like I do for my atmosphere (a large cube around the camera). Then the draw order can be altered such that it is before the transparent clouds.

Hi rbray, not sure I understand how to do that, my shader doesn't necessarily need to be a post-processing shader, but I need some information about the terrain position and distance, either by applying the shader straight to terrain objects or by using the depth buffer to get said information. Could you elaborate more on your cube method? Is it just a cube that I render the same shader to, instead of rendering to the camera or what?

Link to comment
Share on other sites

Hi rbray, not sure I understand how to do that, my shader doesn't necessarily need to be a post-processing shader, but I need some information about the terrain position and distance, either by applying the shader straight to terrain objects or by using the depth buffer to get said information. Could you elaborate more on your cube method? Is it just a cube that I render the same shader to, instead of rendering to the camera or what?

That is exactly it. Same shader, but applied to a cube that wraps around the camera. It needs to be a bit bigger than the near-clipping plane of the "far" camera. Hope that makes sense.

Link to comment
Share on other sites

That is exactly it. Same shader, but applied to a cube that wraps around the camera. It needs to be a bit bigger than the near-clipping plane of the "far" camera. Hope that makes sense.

This makes sense, but if it is a exactly just bigger than the near-clipping plane of the far camera, how do you get the clouds to render on top of it?

Link to comment
Share on other sites

This makes sense, but if it is a exactly just bigger than the near-clipping plane of the far camera, how do you get the clouds to render on top of it?

Any size between the two planes would work really, but you want to avoid getting too close to either. The rendering queue is what is the magic here.

So, to optimize rendering, we have z-sorting and depth buffers. Z-sorting just uses the origin of the object, and draws things that are CLOSER, first. Then the z-buffer comes in, and checks if there is anything on-top of the pixel that make it so that this pixel doesn't have to be drawn. Problem with this, is that if you have transparent objects, you can't tell them to draw to the depth buffer, or things behind it may never be drawn, resulting in black.

So to address this, we don't write transparent stuff to the depth buffer, and we use render queues to "group" objects to be rendered in specific order. Typically, you render skybox, then opaque, alphaTest, transparent, then overlay last.

Shaders have a render queue tag that indicates what the rendering order should be. My clouds are on Transparent, so My atmosphere is on AlphaTest (or Transparent-X; you can use offsets to manually play with the order) , which means all the terrain and buildings are drawn, then the atmosphere, then the clouds.

Hope this made sense :)

Link to comment
Share on other sites

Any size between the two planes would work really, but you want to avoid getting too close to either. The rendering queue is what is the magic here.

So, to optimize rendering, we have z-sorting and depth buffers. Z-sorting just uses the origin of the object, and draws things that are CLOSER, first. Then the z-buffer comes in, and checks if there is anything on-top of the pixel that make it so that this pixel doesn't have to be drawn. Problem with this, is that if you have transparent objects, you can't tell them to draw to the depth buffer, or things behind it may never be drawn, resulting in black.

So to address this, we don't write transparent stuff to the depth buffer, and we use render queues to "group" objects to be rendered in specific order. Typically, you render skybox, then opaque, alphaTest, transparent, then overlay last.

Shaders have a render queue tag that indicates what the rendering order should be. My clouds are on Transparent, so My atmosphere is on AlphaTest (or Transparent-X; you can use offsets to manually play with the order) , which means all the terrain and buildings are drawn, then the atmosphere, then the clouds.

Hope this made sense :)

Wow, this makes perfect sense, I'll definitely do this, but first on my list I have to fix scaledspace.

Thanks a lot.

Link to comment
Share on other sites

Conversation among geniuses :sticktongue:

I love when I feel a bit like a chimp, because that means that I'll see great things. :D

BTW: no luck with the config tool. I was suspecting about Optimus too, but I can't find the problem right now. I'll try later on other desktop pc.

Edited by Proot
Link to comment
Share on other sites

Conversation among geniuses :sticktongue:

I love when I feel a bit like a chimp, because that means that I'll see great things. :D

BTW: no luck with the config tool. I was suspecting about Optimus too, but I can't find the problem right now. I'll try later on other desktop pc.

Yeah, definitely try with a desktop PC. Right now I'm suspecting no one else has tried the config tool because no one is reporting problems or posting configs/screens. So I don't really know if it's a problem with certain machines or something. Oh well...

Link to comment
Share on other sites

Yeah, definitely try with a desktop PC. Right now I'm suspecting no one else has tried the config tool because no one is reporting problems or posting configs/screens. So I don't really know if it's a problem with certain machines or something. Oh well...

I wish I could, unfortunately every time I force dx11 everything goes pink for some reason

Link to comment
Share on other sites

How close are we to getting a 3.2x or 6.4x kerbin config? I stalk this thread like a fiend, so feel free to post some pictures!

SmallFatFetus

The default config already works on these, but the problem is, they make the terrain pretty flat so it looks very bland. In addition, and this is some weird behavior on the part of the mod, but a bigger planet sort of "stretches" and "dilutes" the atmosphere (if it makes sense) and it needs an adjusted config.

I haven't played much with 6.4x kerbin but here's a random screen http://i.imgur.com/rak45U0.jpg

I wish I could, unfortunately every time I force dx11 everything goes pink for some reason

So wait, the config tool isn't working for anybody but me right now? Hold on, let me check on another machine.

Edited: Works perfectly well here, both directly and while adding the -force-d3d11 command. Is anybody else unable to run it?

Link to comment
Share on other sites

I must admit to installing the mod, seeing that it covered up clouds from EVE and then uninstalling at that point. Often I wait until 'default' works well enough before I start changing things.

E : I could imagine a lot of people who would want prettier skies are already running EVE so it might be that 'no clouds out of the box' puts them off. Am I right in thinking there is a version that fixes that which is unreleased?

Or, is there a version of EVE that works with scatterer?

Edited by John FX
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.

 Share

×
×
  • Create New...