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

5 minutes ago, blackrack said:

The last values are the scale (inverse of), but even with the default scale you should see the other components. So try if it works with the base game.

Just tried with the default sunflare config but still nothing

Link to comment
Share on other sites

3 minutes ago, pingopete said:

Just tried with the default sunflare config but still nothing

Alright, so probably still an issue with the sunflare on OpenGL, I'll try to send you a fixed shader file when I can.

Edited by blackrack
Link to comment
Share on other sites

Planetary rings are fixed:

r82RziF.png

 

With one issue:

They will appear over the atmosphere when seen from angles like this:

OBl8kWA.png

 

However from inside the atmosphere they will display correctly, so if you add rings to an earth-like planet the rings will still render correctly in the sky.

Given that the atmosphere and the rings are both transparent objects, it can be difficult to sort them, z-sorting can only be used against the planet (what you see above) as you don't want transparent objects writing to the z-buffer, and sorting purely using renderqueues can't be applied as the ring is both in front of and behind the atmosphere at the same time, unless seen all the way from inside the atmosphere.

But this is good enough for now until I come up with a better solution. First thought that comes to mind is splitting the ring mesh in two and sorting them based on which half is in front of or behind the atmosphere, but there might be a simpler way I'm not aware of. Another trick that can be used is, well, shrinking down the atmo so it's edge is above the planet and this problem isn't visible anymore, that's more of a duct-tape solution :P

Edited by blackrack
Link to comment
Share on other sites

1 minute ago, blackrack said:

But this is good enough for now until I come up with a better solution. First thought that comes to mind is splitting the ring mesh in two and sorting them based on which half is in front of or behind the atmosphere, but there might be a simpler way I'm not aware of.

That's actually a really good idea. I do something similar for my clouds, where the 2d cloud layer is actually just a mesh that I move around, and compensate for placement in the shader. In my case, I did that so I could effectively double the rendering geometry without hitting performance issues. 

Link to comment
Share on other sites

3 minutes ago, rbray89 said:

That's actually a really good idea. I do something similar for my clouds, where the 2d cloud layer is actually just a mesh that I move around, and compensate for placement in the shader. In my case, I did that so I could effectively double the rendering geometry without hitting performance issues. 

I see, very nice! So you render half a sphere oriented towards the camera at all times, is that right? Could it be that the orientation gets stuck sometimes and that is the reason for the "half the clouds are missing" bug that people have been complaining about lately :P ?

Link to comment
Share on other sites

1 minute ago, blackrack said:

I see, very nice! So you render half a sphere oriented towards the camera at all times, is that right? Could it be that the orientation gets stuck sometimes and that is the reason for the "half the clouds are missing" bug that people have been complaining about lately :P ?

That's exactly it :) there is an issue where when entering map view/scaled space I stop moving the object to face the camera.

Link to comment
Share on other sites

Just now, rbray89 said:

That's exactly it :) there is an issue where when entering map view/scaled space I stop moving the object to face the camera.

Ahh, I noticed that moving the camera in mapview to match the view of the ship "fixes" the problem. However I thought you might be loading part of the textures separately and it was just some parts of the texture not getting loaded, I thought you were using cubemaps like this or something :P

Link to comment
Share on other sites

Alright, I'm uploading a new version, the fixed planetary rings are there, telescope mods will also work fine in scaledSpace now, however the postprocessing shader will still interfere with them when PQS is active.

The option to draw the atmo over EVE clouds is there, it will make the terminators and the orbital view better in general, it will also make the eclipses appear over clouds but it has some issues of it's own:

DfALMWD.png

 

As you can see, the clouds on the edge are overly tinted because the atmosphere shader thinks they are actually behind the curve and therefore, is applying a lot more extinction. The transition from PQS to scaledSpace also has some problems. If you don't like it you can turn it off from the main menu or turn it off for a specific planet from the planetsList file.

If you don't use EVE you should also turn it off.

In the future I will try to come up with a better way to do this, perhaps even work with rbray and make modified versions of the EVE cloud shaders which will have scattering rendered directly and correctly inside them (should also look better from the ground).

This release should also fix the lens flare shader on OpenGL for those who still can't get it to work (@pingopete please test if it's fixed)

Edited by blackrack
Link to comment
Share on other sites

5 minutes ago, JONYghost said:

I have rough vissual bugs when in landing and landed on Duna. Is this gonna get fixed? Didn't happen at mid february, can't say exact version, but before the sun got changed.

Post screenshots of issue. And Duna in general is full of artifacts as it's scale doesn't work well with the scattering so I can't say for sure if it will be fixed.

Link to comment
Share on other sites

2 minutes ago, blackrack said:

Post screenshots of issue. And Duna in general is full of artifacts as it's scale doesn't work well with the scattering so I can't say for sure if it will be fixed.

Just posted it on SVE, but here you have those pics: https://www.dropbox.com/sh/5k0mp8p7x5hcngm/AABmQUPFQkNx35czkJGEpCKza?dl=0

they start around 90km and intensify during landing and landed

Edited by JONYghost
Link to comment
Share on other sites

2 minutes ago, JONYghost said:

Just post it on SVE, but here you have those pics: https://www.dropbox.com/sh/5k0mp8p7x5hcngm/AABmQUPFQkNx35czkJGEpCKza?dl=0

they start around 90km and intensify during landing and landed

Have you tried disabling terrain shadows? Also, test if it happens with scatterer only.

Edited by blackrack
Link to comment
Share on other sites

4 minutes ago, JONYghost said:
5 minutes ago, blackrack said:

Have you tried disabling terrain shadows?

Okay they are gone, sadly removing your awsome shadow effects... but It's fixed for now. 

Pd: do you know why clouds from SVE go off when between 60 and 170 km?

 

 

 

11 minutes ago, blackrack said:

Have you tried disabling terrain shadows? Also, test if it happens with scatterer only.

Yeah I took scatterer before, and It went off and with old stock textures. Disabling shadows worked fine, I miss those great effects you make, but It fixes the problem thank you. Hope you find a way around it ;)

Link to comment
Share on other sites

Just now, JONYghost said:

Okay they are gone, sadly removing your awsome shadow effects... but It's fixed for now. 

Pd: do you know why clouds from SVE go off when between 60 and 170 km

I think if you force directx11 you can enable terrain shadows and get rid of the artifacts, try it.

For the clouds if it's the same issue rbray just talked about just wait for an update from EVE, or go into map view and orient the camera to look in roughly the same direction as your ship then quit map view.

Link to comment
Share on other sites

3 minutes ago, blackrack said:

I think if you force directx11 you can enable terrain shadows and get rid of the artifacts, try it.

For the clouds if it's the same issue rbray just talked about just wait for an update from EVE, or go into map view and orient the camera to look in roughly the same direction as your ship then quit map view.

Sorry, I don't know how to do it :) but if you tell me  how to, I'll do it just now

Link to comment
Share on other sites

4 minutes ago, blackrack said:

I've been doing research on it and I think I will survive without shaders. I have a pretty decent gaming laptop i7 4720 HQ 16gb ram and an nvidia 860m with 4gb dedicated ram. I will just wait for ksp to use Unity 5, but thanks for all. Reason behind this decision is, I don't want to risk data or hardware, for visual improvements; thus, I'll keep you posted if during new versions, this bug disappears.  

Link to comment
Share on other sites

RSS looked super-borked with the most recent update of Scatterer. The sun flares didn't show from the ground or in orbit, and the scatterer atmo effect disappeared once I entered SS. Which is to say, the scatterer effect does still appear from the ground.

Link to comment
Share on other sites

25 minutes ago, stratochief66 said:

RSS looked super-borked with the most recent update of Scatterer. The sun flares didn't show from the ground or in orbit, and the scatterer atmo effect disappeared once I entered SS. Which is to say, the scatterer effect does still appear from the ground.

Make a detailed report and include screenshots.

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