Jump to content

[1.2] PlanetShine - v0.2.5.2 stable - v0.5 experimental [4 October 2016]


Valerian

Recommended Posts

I have stopped maintaining this mod, which is now being continued by @Papa_Joe on this thread:

----

 

 
 
 
 
P L A N E T S H I N E

Last%20Release-November%2028th,%202015-r  Release-v0.2.4.2-blue.svg  KSP-1.0.5-orange.svg  Status-Beta-yellowgreen.svg  CKAN-Indexed-brightgreen.svg

 

Why PlanetShine?

After trying some mods to improve visuals and get something more realistic looking, I transformed KSP into something really good looking, but I was really happy with the result, but I felt that something was still missing.

When in low orbit of a planet, the side of my ship which was facing the planet was completely dark, which was not realistic! It should have been illuminated a bit by the planet's own reflective light!

I decided to fix that with this mod, by making planets and moons to reflect their own (colored) light to your vessel.

This phenomenon is called in real life albedo or planetshine :

 

earthshine%20earth%20moon%20life.jpg

jDq7Kss.jpg    rTfqn7c.jpg

 

 

What does this mod actually do? (Summary)

  • When you are close to a planet or moon, its bright side reflects (colored) light to your vessel.
  • More realistic ambient light in vacuum, very dark by default, can be customized.
  • More realistic ambient light on the ground and atmosphere of planets/moons, tinted by the surface color.
  • Very lightweight: almost no RAM used, and your FPS should not change.

 

Additional features

  • Settings menu to customize many parameters, as well as several quality/performance settings.
  • Support for the Toolbar mod.
  • Planet and moons light configuration supports Module Manager and loading across GameData folder, and can be easily customized by players or other mods.
  • Conflicts with the mod "Ambient Light Adjustment" because it has exactly the same feature: custom ambient light settings with a slider.
  • When close to the sun, the sunlight becomes dramatically intense.

 

 

SchRHfql.jpg

 

Screenshots

You can see the subtle red light over Duna, green over Jool, and blue over Kerbin:

http://imgur.com/a/4MODI

Before / After Screenshots by CaptRobau:

http://imgur.com/a/Nekay

Recommended mods for the best experience

 

  • Environmental Visual Enhancements for clouds and city lights.
  • A good galaxy skybox (using Texture Replacer):
    • Oinker's Skybox
    • Teflon's Skybox
  • Chatterer for adding ambient sounds that really improve the immersion.
  • An atmospheric sky enhancing mod:
    • SkyTonemapper (Stable) makes the sky look better by smoothing it (removes the banding effect)
    • Scatterer (Experimental - many bugs) makes the sky and atmosphere looking really great and much more realistic, sunsets become amazing.
  • Engine lighting for adding realistic lighting to engines thrust.
  • Surface Lights to illuminate the ship when it gets really dark.

 

Additional information

 

I would appreciate feedback on this mod a lot!

I spent a lot of time trying to make this reflected light to behave as consistent as possible, and I think it's pretty well tuned by now.

Planet and moons colors are all editable in "CelestialBodies.cfg", and you can change a few other settings in "Settings.cfg", such as the vacuum light level (quite low by default), and the reflection light intensity.

Compatible with all game versions from 0.25 to 1.0, and probably older versions as well.

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

 

Changelog

Spoiler
V0.5 EXPERIMENTAL - 2015-12-14
- a large part of the code has been rewritten and cleaned to prepare for the future multiple and inter-bodies planetshine feature.
- planets/moons planetshine color is now auto-detected during gameplay through a virtual camera and will vary depending on the visible biomes and clouds: no need to have specific settings for planets or texture packs (although the old "CelestialBodies.cfg" file will still work for non-color settings, but is no longer necessary).
- changes to several furmulas for both albedo and atmospheric lights, Setttings.cfg needs to be replaced with this new version.
 
---
V0.2.5.2 - 2016-10-04
- recompiled to fix issue with KSP build 1564
 
V0.2.5.1 - 2016-09-14
- updated for KSP 1.2 pre-release
- does not work with KSP 1.1.* or older
 
V0.2.5 - 2016-04-04
- updated for KSP 1.1.*
- does not work with KSP 1.0.* or older
 
V0.2.4.2 - 2015-11-28
- fixed missing shadows when orbiting close to the sun
- fixed vessel suddenly turning pitch black when deep underwater
 
V0.2.4.1 - 2015-11-25
- removed the obsolete Real Solar System colors and useless README.txt
 
V0.2.4 - 2015-11-25
- fixed a bug that prevented the stock toolbar icon settings to be saved correctly.
- fixed a bug that sometimes displayed unintended atmospheric lights on all other bodies when in map/orbit view.
- a bit of code cleaning and refactoring, might even improve performance and stability.
 
V0.2.3.1 - 2015-05-10
- fixed the bug that created multiple toolbar buttons (sorry for that)
- the config node name for celestial bodies has been renamed from "CelestialBodyColor" to "PlanetshineCelestialBody", however retro-compatibility will be kept for some time
- the celestial bodies are now loaded through "GameDatabase", meaning that:
    * any "PlanetshineCelestialBody" node within any cfg file in the GameData folder will be loaded automatically
    * other plugins can programatically change "PlanetshineCelestialBody" nodes through "GameDatabase"
    * "PlanetshineCelestialBody" nodes are now affected by Module Manager
 
V0.2.3 - 2015-05-09
- fixed the bug preventing to save settings
- added support for stock toolbar (blizzy's toolbar is no longer required, but still supported)
- added a "close" button to the settings window
- tweaked the default settings, now it's a tiny bit brighter in space

V0.2.2.3 - 2015-05-03
- updated the version file for KSP 1.0.2

V0.2.2.2 - 2015-04-30
- updated the version file for KSP 1.0

V0.2.2.1 - 2014-12-20
- updated the version file for KSP 0.90
 
V0.2.2 - 2014-10-20
- Included a custom planets/moons color file to use with the mod Real Solar System
- Vacuum ambient light level can now be set MUCH brighter
- New option in "CelestialBodies.cfg" to change the level of ground ambient overriding (I made it mostly for compatibility with RSS)
- Fixed some small typos and tweaked some calculations a bit
 
V0.2.1 - 2014-10-18

- Fixed a bug that occurred when starting in single light mode
- Added a performance option to change the update frequency
- Added a "reset to default" button for each setting
- Fixed the ground albedo formula for when there is no atmosphere

 
V0.2.0 - 2014-10-17
- Comprehensive settings menu (requires Toolbar)
- Settings have moved and are no more meant to be edited outside of the game
- Added quality preset options (low, medium, high)
- New ground ambient light enhancement system
- Fixed several light angle calculation bugs
- Added option to choose between vertex or pixel lights
 
V0.1.4 - 2014-10-15
- Added support for Add-on Version Checker and included "MiniAVC"
- Added minimal debug menu to toggle the effects (requires Toolbar)
- Performance improvement: forced vertex lights

V0.1.3 - 2014-10-14
- renamed the mod from "Reflective Ambient Light" to "Planetshine"
- fixed a bug that caused an error on loading
- improved performance

V0.1.2 - 2014-10-13
- improved performance

V0.1.1 - 2014-10-12
- much more options and explanations within the config files, I strongly suggest to look into them
- fixed a bug that made the light suddenly disappear when at sunset/sunrise, instead of doing it smoothly
- fixed a bug that made the light always come from the center of the planet instead of the actual illuminated part of the surface
- the sun now has its own light setting, orbiting close to it has a VERY STRONG effect k_wink.gif
- added the option to change the ground atmosphere ambient intensity (the ambient light when you are on the ground) in the settings
- added the option to change the atmosphere ambient altitude fading
- added the option to change the light reflection effect atmosphere altitude and fading
- added the option to change the maximum orbital range of the light reflection
- added the option to set the ratio of atmosphere ambient on ground for each planet/moon
- added the option to disable the area light technique in order to get better performance (by default it uses 3 lights to simulate an area, but if you disable it it will only use one light)
- on planets/moons without atmosphere, the reflective light is more spread around the ship when landed
- tweaked many settings to improve the light effects

V0.1.0 - 2014-10-11
- first released version
- each planet/moon has a different color, picked from a config file
- effect range is 4x the radius of a planet/moon
- the effect strength can be changed in the settings file

 

Known issues

  • Conflicts with other mods that change ambient light, such as Ambient Light Adjustment and AmbientLightShifter
  • Not tested much on x64, might cause issues
  • Might have minor issues with Kopernicus, which optionally provides custom atmospheric and vacuum ambient lights.

 

Planned features

  • Automatic detection of planet colors and atmosphere, no more need for CelestialBodies.cfg (working on it right now)
  • Actual planetshine (reflected lights between two planet/moon)
  • Different reflected light color depending on the biome (land/sea/poles)
  • Sunset/sunrise lights
  • More performance tweaks, such as reducing the number of light depending on the situation, or using a diffuse wrapping shader
  • Choice between presets for ambient light (realistic or stock) and other settings
  • Better (future) compatibility with other mods

 

Credits

I copied the planets/moons color list from the Distant Object Enhancement mod

Thanks to TheSexiestofClowns on Reddit for his screenshot that I used at the beginning

A lot of thanks to the people who helped me over IRC, such as Thomas, Rbray89, and a few others

 

-----------------

 

Support the author

If you like this plugin, please consider donating, it will be greatly appreciated:

 

vTm81Cq.png evTNecx.png

 

-----------------

 

Download standard versions:

0.2.5.2 for KSP 1.2

0.2.5 for KSP 1.1

0.2.4.2 for KSP 1.0.5 or older

 

z7dHhOE.png ra4tJDA.png

 

-----------------

 

Download experimental version 0.5 for KSP 1.0.5 or older:
details in this spoiler:

Spoiler

 

 

This version does not need a config file for planet/moon colors anymore and behaves according to visible biomes and clouds, but might have some bugs or performance issues.

Download this only if you want to beta test it and don't care about potential issues

You need to fully delete the old "GameData/Planetshine" folder before installing this version!

 

Changelog:

- a large part of the code has been rewritten and cleaned to prepare for the future multiple and inter-bodies planetshine feature.
- planets/moons planetshine color is now auto-detected during gameplay through a virtual camera and will vary depending on the visible biomes and clouds: no need to have specific settings for planets or texture packs (although the old "CelestialBodies.cfg" file will still work for non-color settings, but is no longer necessary).
- changes to several furmulas for both albedo and atmospheric lights, Setttings.cfg needs to be replaced with this new version.
 

Download link: https://github.com/valerian/ksp-planetshine/releases/tag/v0.5

 

 

 

 

Copyright 2014, Valerian Gaudeau, Apache license 2.0

Edited by Valerian
updated for KSP 1.2
Link to comment
Share on other sites

Amazing quality improvement.

I assume 0.25 only? I have not upgraded because many mods don't work in 0.25 yet. I want this in a 0.24 install. :(

I'll give it a try when I can. This looks perfect for my YouTube show where I am always trying to make it more beautiful.

Link to comment
Share on other sites

Does this also reflect light from planetary bodies onto other planetary bodies?

I do believe that none of the moons in KSP are close enough to their planets for any coloured light changing effects to occur. That does raise an interesting question though for custom planet packs...

Link to comment
Share on other sites

Sometimes, when you sit really still and very quiet while browsing the forums, something really nice comes out of left field and smacks you straight in the face. This is one of those, and holy mother of Jebediah does it feel good!

Link to comment
Share on other sites

Thank you all for your comments!

will this then make the "AmbientLightShifter" obsolete?
Looks sweet as! Just a quick question though, is the AmbientLightShifter included in the download?

I'll be sure to include this in my new .25 playthrough!

It replaces it in fact, because it manages the ambient light to make it almost black in vacuum, and changes it to the planet's ambient light when close to the ground (approximately under 20km on Kerbin).

You can change the vacuum darkness in the Settings.cfg file.

Amazing quality improvement.

I assume 0.25 only? I have not upgraded because many mods don't work in 0.25 yet. I want this in a 0.24 install. :(

I'll give it a try when I can. This looks perfect for my YouTube show where I am always trying to make it more beautiful.

I did not update to 0.25 either, this plugin was developed for 0.24, but I think it should work fine on 0.25. (I updated the title accordingly)

Does this also reflect light from planetary bodies onto other planetary bodies?
I do believe that none of the moons in KSP are close enough to their planets for any coloured light changing effects to occur. That does raise an interesting question though for custom planet packs...
Does this make it so that on dark sides of planets there is a bit of light?

No it does not, but I could do it. However currently I set it so that reflective lights fade to zero beyond 2x the radius of the planet/moon, meaning that a Kerbin altitude of more than 1,200,000 m will not have a reflective light.

Link to comment
Share on other sites

I would be glad if you guys could help me by providing some screenshots also, mine are not really good :). They also appear really dark from my office's computer! My home computer screen has very good colors and contrast and I can easily see all shades of light, but maybe that's not good to rely on this vision compared to the average player's screen: do not hesitate to change the reflection strength in the "Settings.cfg" and tell me which one gives you the most pleasant results.

I will soon add planet colors for other planet mods such as "Real Star System": my planet colors config file is in fact copied from the mod "Distant Objects", which already have color configs for alternate planet mods.

Edited by Valerian
Link to comment
Share on other sites

Looks great, screenshots may be made more helpful if you include wit/without pictures, to display what you plug-in add or don't add in various cases where it's relevant.

Also, a pictures close to the star may be incredible :).

You mean close to the sun (Kerbol)? I disabled my addon for Kerbol, but I guess it could be nice to make the light ultra bright near it, and even with some burning particles coming out of the vessel, a bit like the reentry effect :)

But this should probably be another mod.

SUNSHINE_by_Phoenix_06.jpg

Link to comment
Share on other sites

I really like the effect, well done :)

Amazing that noone thought about it earlier.

You mean close to the sun (Kerbol)? I disabled my addon for Kerbol, but I guess it could be nice to make the light ultra bright near it, and even with some burning particles coming out of the vessel, a bit like the reentry effect :)

But this should probably be another mod.

Nah... make it happen! :D hehehe - it suits this mod beautifully.

Link to comment
Share on other sites

You mean close to the sun (Kerbol)? I disabled my addon for Kerbol, but I guess it could be nice to make the light ultra bright near it, and even with some burning particles coming out of the vessel, a bit like the reentry effect :)

But this should probably be another mod.

Yes :), just it seems not everyone agree with the star's name, so kerbol, kerstar, starker, starbol, whatever, it's a star at the first place :P.

Sunshine... :cool: one of the greatest sci-fi movies ever made !

The effect could be an option of the plug-in too.

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