Jump to content

Eclipses and Planet Shadows


Recommended Posts

I think that it would e cool if eclipses not only blocked out the sun, but actually cast a shadow visible from orbit and the surface. This would be much more realistic that what happens currently. One way of doing this is that every planet and moon could have some cone of darkness that points exactly in the opposite direction of the sun at all times. When this falls onto an object, it could apply the correct amount of dimming to it, as well as a certain pattern, being that the shadow gradually disappears as it reaches the edge of the covered area. This would even enable players to view planets transiting the sun.

Link to comment
Share on other sites

I hope that this happens eventually, and it does happen now to an extent with a nonvisual effect. If you have a solar panel, and it is blocked by a celestial body (even one that is outside your current SOI I believe), A solar panel will register as being 'Blocked by X celestial body.' However, Unity is apparently quite bad at handling lighting, so the visual effect may be more difficult than it seems. On the other hand, the fact that the solar panels can be blocked indicates that the game does, in fact, handle light being blocked by the Sun, so perhaps this feature is already planned.

Also, Setting up a spacecraft to be eclipsed would probably be quite easy. I would think that you could just take some of the code from solar panels and adapt it into the lighting system.

if (direct_line_to_sun=1)

{Sunlight==0;}

But, I only know some basic c++, and know nothing about KSP code or Unity.

Link to comment
Share on other sites

I hope that this happens eventually, and it does happen now to an extent with a nonvisual effect. If you have a solar panel, and it is blocked by a celestial body (even one that is outside your current SOI I believe), A solar panel will register as being 'Blocked by X celestial body.' However, Unity is apparently quite bad at handling lighting, so the visual effect may be more difficult than it seems. On the other hand, the fact that the solar panels can be blocked indicates that the game does, in fact, handle light being blocked by the Sun, so perhaps this feature is already planned.

Lighting and shadows are different from what the solar panels do. All they prolly do is draw a line to the core of the sun, measure the distance (how much power you make) and whether or not that line crosses anything (blocked by thing). Lighting is so much more complex than that. I dunno how this game does it, but it must be more than just 'is thing in the way?'. And if planetary shadows were done like that, there wouldn't be a shadow cast on it. It would just instantly turn completely dark as soon as the eclipse started, and stay like that 'till it ends.

Link to comment
Share on other sites

if (direct_line_to_sun=1)

{Sunlight==0;}

But, I only know some basic c++, and know nothing about KSP code or Unity.

I have noticed solar panels getting blocked by celestial bodies, and I'm fairly sure it's a recent-ish development. Actually applying the visual effect would be a fragment shader thing rather than specifically a Unity thing though, and shaders (whether vertex, fragment or other) are usually written in GLSL or HLSL. Basically it's "hard mode" programming, pretty hardcore stuff, and Squad may need to get a dedicated shader programmer in to do the job properly.

That or see if there's any kind of freely-usable thing at Shadertoy or in the Unity libraries that might work.

...but yeah, it would look darned awesome if done right.

Link to comment
Share on other sites

Yea i could of swore the Dev's said such things are beyond their grasps. Mainly because of limitations with the Unity engine, planet sized shadows can't be done now. I agree with technicalfool, such a simple thing is actually a nightmare to implement. Definantly not worth the payoff in any regard though, no matter how cool it looks.

Rather have the devs dedicate that much into a better aerodynamic system and re-entry effects than better shader graphics.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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