Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent distant planets from being visible trough the Atmosphere #2

Open
Lisias opened this issue Oct 1, 2021 · 9 comments
Open

Prevent distant planets from being visible trough the Atmosphere #2

Lisias opened this issue Oct 1, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lisias
Copy link

Lisias commented Oct 1, 2021

Fellow Kerbonaut Krazy1 remembered about an old request from another Fellow Kerbonaut infinite_monkey:

Planets appear as a dark spot visible through the atmosphere. They should be hidden behind it, just like the stars. Would it be possible to fix that?

Additionally, Fellow Kerbonaut Krazy1 complements:

Planets show directly though the sun. Like this:

Well… I will try. :)

I don't have the slightest idea how to fix it, but I remember something on Unity about layers (it's the reason it's so difficult nowadays to select a craft on KSC as target - the layer of the icon if the craft, mistakenly, is lower than the layer of the icon of KSC).

@Lisias Lisias added the enhancement New feature or request label Oct 1, 2021
@Lisias
Copy link
Author

Lisias commented Oct 1, 2021

The layer stunt works on sprites. It will not help my ass here.

I will need to give a nice peek on Scatterer et all to understand how the Atmospheres are drawn, but from a preliminary overview, things does not look good - the Atmosphere appears to be drawn immediately after the skybox and before any 3D object…

Since reordering this would be essentially reimplementing Scatterer myself (a daunt task to say the least), I will try to stunt my way out of the mess. Perhaps I could try to use transparency?

@Lisias
Copy link
Author

Lisias commented Nov 29, 2021

Additionally, perhaps we could do the same to Comets as request on Forum?

image

@Lisias
Copy link
Author

Lisias commented Dec 29, 2021

Fellow Kerbonaut Alioth81 also talked about this on Forum. Nice shot, by the way!

tP1Ku6p

@Lisias Lisias added this to the 2.1.3.0 milestone Feb 20, 2022
@Lisias
Copy link
Author

Lisias commented Jul 25, 2022

That's the problem… Somewhere in the past, the body flares was moved to the layer 10 due PlanetShine. But then they started to misbehave.

Later they were all moved to layer 15.

My best guess is that moving the Body Flares to layer 15 was a bad idea. Even 10 was less than ideal. The Body Flares should be placed behind the Atmosphere layers (9).

See https://wiki.kerbalspaceprogram.com/wiki/API:Layers for gory details.

@Lisias Lisias modified the milestones: 2.1.3.0, 2.1.1.9 Jul 25, 2022
@Lisias
Copy link
Author

Lisias commented Jul 25, 2022

it worked as intended.

Fixed on commit 88341b7

@Lisias Lisias closed this as completed Jul 25, 2022
@Lisias Lisias self-assigned this Jul 25, 2022
Lisias added a commit that referenced this issue Jul 25, 2022
Lisias added a commit that referenced this issue Jul 26, 2022
Undesired collateral effects.
@Lisias
Copy link
Author

Lisias commented Jul 26, 2022

Reopening the damned thing, as the fix made the flares (unsurprisingly, to tell you the true) be rendered behind their bodies, screwing up with the damned feature.

The way to go is more or less this one, but I'm afraid I will need to cast a new ray to check if there's an atmosphere behind the body flares….

@Lisias Lisias reopened this Jul 26, 2022
Lisias added a commit that referenced this issue Jul 27, 2022
…essel, debris and bodies' flares should be on the same layer, but I will keep things as they were for while. This code will allow fine tunning later.

for #2
@Lisias Lisias removed this from the 2.1.1.9 milestone Jul 27, 2022
@Lisias
Copy link
Author

Lisias commented Jul 27, 2022

Removing the milestone of this thing, as I don't know when I will have time to research this thing again.

@Lisias Lisias closed this as completed in 88341b7 Jul 27, 2022
@Lisias
Copy link
Author

Lisias commented Jul 27, 2022

Reopening this thing again. How in hell this was closed???

@Lisias Lisias reopened this Jul 27, 2022
@Lisias
Copy link
Author

Lisias commented Sep 16, 2022

Fellow Kerbonaut ColdJ suggested the following material as reference (documenting it here or I will lose track of the info):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant