Valerian

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

Recommended Posts

[B]Updated :)[/B]

[CENTER][IMG]http://i.imgur.com/WNSMEn9l.jpg[/IMG][SIZE=7][COLOR=#000080][B]
[SIZE=5]It's about time![/SIZE][/B][/COLOR][/SIZE]
[/CENTER] Edited by Valerian
  • Like 1

Share this post


Link to post
Share on other sites
[quote name='Valerian'][quote name='lextacy']does this support RSS?[/QUOTE]
Yes it does, see the "Alternate Colors" folder, alos mentioned in the README.txt file[/QUOTE]

Ok my bad, I just realized that RSS is now based on Kopernicus, therefore this is not working anymore ...

I made a new config file especially for RSS, and asked for it to be integrated in RSS in the future.
In the meantime, please read my post here for instructions on how to install it: [URL="http://forum.kerbalspaceprogram.com/threads/55145-1-0-5-Real-Solar-System-v10-4-1-Nov-18?p=2314901&viewfull=1#post2314901"]http://forum.kerbalspaceprogram.com/threads/55145-1-0-5-Real-Solar-System-v10-4-1-Nov-18?p=2314901&viewfull=1#post2314901 [/URL]

Share this post


Link to post
Share on other sites
[quote name='Gaiiden']seems like a stock game bug. Craft definitely self-shadow so there should be a shadow behind that shield. Maybe when you get too close to the sun the luminosity grows too great. Or perhaps the shield isn't modeled properly to cast shadows if it's an add on part. Either way self-shadowing craft wouldn't be in scope for this mod (shadows cast by planets might tho)[/QUOTE]

Odd...the craft (all-stock) cast shadows on itself when I removed PlanetShine. I made sure it was the culprit before posting.

Upgrading to the latest iteration of PS now; hopefully everything will magically work itself out. =)

Share this post


Link to post
Share on other sites
[quote name='little square dot']Odd...the craft (all-stock) cast shadows on itself when I removed PlanetShine. I made sure it was the culprit before posting.

Upgrading to the latest iteration of PS now; hopefully everything will magically work itself out. =)[/QUOTE]

Sorry about that but shadows are disabled for PlanetShine.

The issue is that for simulating an area light coming from the planet, I actually use 3 distinct lights spread out around the surface of the planet (you can see them if you enable "debug mode" in the PlanetShine options). If I enabled shadows, you would see 3 weird shadows on the vessel, and I didn't want that.
I tried to find a way to have very soft/blurry shadows, which would be perfect, but I couldn't find a way to do that yet.
It's usually not noticeable for the subtle planetshine around planets and moons, but around the sun it becomes an issue.

PlanetShine enhances the sunlight by adding some kind of extreme "planetshine" based effect when you fly close to the sun, in order to make a kind of dramatic effect like in the movie "Sunshine".

You can try to disable it by setting "intensity = 0" for the Sun in the "CelestialBodies.cfg" config file, it should look like that:

[CODE]
PlanetshineCelestialBody
{
name = Sun
color = 255,225,180
intensity = 0
atmosphereAmbient = 0
groundAmbientOverride = 1
}
[/CODE]

I admit that I should set some special way to handle the sun, so there would still be a shadow.


[IMG]https://chupitosgratis.files.wordpress.com/2011/12/icarusii.jpg[/IMG] Edited by Valerian

Share this post


Link to post
Share on other sites
Omg, thank you soooo much!!!!, ive been waiting wat feels like ages 4 this!!! Thank you!!!! :D

[COLOR=silver][SIZE=1]- - - Updated - - -[/SIZE][/COLOR]

Share this post


Link to post
Share on other sites
[quote name='Valerian']
PlanetShine enhances the sunlight by adding some kind of extreme "planetshine" based effect when you fly close to the sun, in order to make a kind of dramatic effect like in the movie "Sunshine".
[/QUOTE]

Which I absolutely love...I can practically feel my face searing off when making a low pass. It's an incredible atmospheric touch that truly makes the environment around the sun feel like the absurdly hostile place it's supposed to be.
Trouble is, that awesome effect that makes my face feel all melty also causes me to desperately seek shade for my intrepid little green explorers. Unfortunately I've never been particularly adroit at finding shade in the absence of shadows.

Regardless, after uninstalling PlanetShine and reloading my near-Kerbol spacecraft, I discovered that although I had my shadows back, I no longer felt that I needed them. Passing close to Kerbol suddenly felt so disgustingly safe and inviting, so I immediately cut my losses and reinstalled PS, shadows be damned.

Share this post


Link to post
Share on other sites
[quote name='little square dot']Which I absolutely love...I can practically feel my face searing off when making a low pass. It's an incredible atmospheric touch that truly makes the environment around the sun feel like the absurdly hostile place it's supposed to be.
Trouble is, that awesome effect that makes my face feel all melty also causes me to desperately seek shade for my intrepid little green explorers. Unfortunately I've never been particularly adroit at finding shade in the absence of shadows.

Regardless, after uninstalling PlanetShine and reloading my near-Kerbol spacecraft, I discovered that although I had my shadows back, I no longer felt that I needed them. Passing close to Kerbol suddenly felt so disgustingly safe and inviting, so I immediately cut my losses and reinstalled PS, shadows be damned.[/QUOTE]

What about setting intensity to zero, like [URL="http://forum.kerbalspaceprogram.com/threads/96497-1-0-5-PlanetShine-v0-2-4-1?p=2315379&viewfull=1#post2315379"]Valerian suggested[/URL]? Does it solve your problem or it basically disables PlanetShine near Kerbol?

Share this post


Link to post
Share on other sites
[quote name='jlcarneiro']What about setting intensity to zero, like [URL="http://forum.kerbalspaceprogram.com/threads/96497-1-0-5-PlanetShine-v0-2-4-1?p=2315379&viewfull=1#post2315379"]Valerian suggested[/URL]? Does it solve your problem or it basically disables PlanetShine near Kerbol?[/QUOTE]

It will basically disable it :3

However if he sets the intensity to 1 it could be a middle ground, there would still be shadows (but a bit brighter), and the intensive effect would still be a bit present.

Share this post


Link to post
Share on other sites
What about planet shine being used to light up the night side of a planet with its full moon?

Share this post


Link to post
Share on other sites
On 11/26/2015, 11:38:50, Errol said:

What about planet shine being used to light up the night side of a planet with its full moon?


This is what I wish to do with the final version of PlanetShine, and that's the only reason why PlanetShine is at version 0.2 and not 1.0 :)
For me the current version is only the first step, my aim is to have a full real planetshine system that works between moons/planets, and even multiple source on the vessel (e.g.: the vessel would be illuminated by both a planet and its moon).
 

On 11/26/2015, 7:47:24, little square dot said:

Which I absolutely love...I can practically feel my face searing off when making a low pass. It's an incredible atmospheric touch that truly makes the environment around the sun feel like the absurdly hostile place it's supposed to be.
Trouble is, that awesome effect that makes my face feel all melty also causes me to desperately seek shade for my intrepid little green explorers. Unfortunately I've never been particularly adroit at finding shade in the absence of shadows.

Regardless, after uninstalling PlanetShine and reloading my near-Kerbol spacecraft, I discovered that although I had my shadows back, I no longer felt that I needed them. Passing close to Kerbol suddenly felt so disgustingly safe and inviting, so I immediately cut my losses and reinstalled PS, shadows be damned.

 

Ok, I managed to make it work :)

I remembered that there was an issue with the way the KSP engine works right now: there can be shadows from a single source only, and that source is the strongest light, which is the Sun.
However I managed to work around that by forcing PlanetShine to use a single light and be in pixellight mode when close to the Sun.

The result is that there is both the strong sunlight created by PlanetShine, which now casts shadow, and the normal stock sunlight which doesn't cast shadows in that situation. However the stock sunlight is much less bright than my light, so the result is quite nice.

See for yourself:

 



This will be included in the next release of PlanetShine

Edited by Valerian
  • Like 1

Share this post


Link to post
Share on other sites
Hey, thank you for the mod! CKAN doesn't see the latest version, though.

Share this post


Link to post
Share on other sites
[quote name='garwel']Hey, thank you for the mod! CKAN doesn't see the latest version, though.[/QUOTE]

You're welcome!
CKAN should be updated soon

Share this post


Link to post
Share on other sites
On 11/18/2015, 2:19:42, LaytheDragon said:

I have found a bug due to PlanetShine in KSP 1.0.5! Minor, but still an issue, nevertheless. Here's the bug:

  • Certain parts are completely transparent in some spots and look glitched graphically when below -599 meters in Kerbin's oceans
  • It occurs every time a vessel goes below -599 meters in Kerbin's oceans
  • When PlanetShine is globally turned off in the in-game PlanetShine settings or when it is uninstalled, the bug disappears

 

Spoiler

hngrSkL.jpgoKBsV61.jpgwKQvCKP.jpg

 

PlanetShine debug info during an occurrence of this bug.

b1xaFEO.jpg

 

When PlanetShine is disabled, this issue vanishes

 

 

This was fixed in the latest version, and the new sunlight shadows were integrated as well.

Edited by Valerian

Share this post


Link to post
Share on other sites
9 hours ago, Valerian said:

 

This was fixed in the latest version, and the new sunlight shadows were integrated as well.

I thank you for fixing this before I had the time to give you my save file or more debug pictures. :)

And those sunlight shadows look very scorching, indeed, and if they extend out to Moho, then that would add an even greater impression of the extremes in heat experienced there, even when you have radiators deployed.

Share this post


Link to post
Share on other sites
36 minutes ago, LaytheDragon said:

I thank you for fixing this before I had the time to give you my save file or more debug pictures. :)

And those sunlight shadows look very scorching, indeed, and if they extend out to Moho, then that would add an even greater impression of the extremes in heat experienced there, even when you have radiators deployed.

 

You're welcome! I was afraid you would do that while the forum was down.

Currently the PlanetShine effect is only for the currently orbiting body, but in the future, when I will make multiple planetshine effects between everything, I might definitely do something like that, so you would really feel if you are close or far from the system's sun.

 

The light in the screenshot is stronger than PlanetShine default settings because I increased the intensity while testing it, I might redo some proper screenshots of it and put them on the topic.

Edited by Valerian
  • Like 1

Share this post


Link to post
Share on other sites

Great news: I just finished to make a new feature for PlanetShine (not released yet, still buggy) : it can automatically determines the color of a planet or moon by its average texture color, and also its atmosphere, no more configuration file needed!

However I'm getting a few weird results for some planets, sometimes because the color of the poles messes it up (Duna, Kerbin), and sometimes because I don't take in account the atmosphere color yet (it's an issue for EVE, because it's mostly the atmosphere that gives it a bright purple color). I will also try to take in account the clouds color from Environmental Visual Enhancement.

Suns are automatically detected and get a very bright light, but I couldn't find a way to get their color yet.

 

I will continue to work on that, and maybe even automate the colors in a biome-based way!

Edited by Valerian
  • Like 3

Share this post


Link to post
Share on other sites

I tested it with a few planet packs and it's working fine now, I managed to access to the atmosphere shader and extract the interesting part.

However it might take some time to get released because I'm taking this opportunity to recode a few things that were not changed since the beginning of PlanetShine, such as a few misuses of vacuumAmbientColor and RenderSettings.ambientLight , and a general lack of error checking.

I now also have all the information necessary to make PlanetShine autodetect sun colors, I just need to do it.

However I experienced an annoying issue while using a the dev version of Uncharted Lands with the dev version of Kopernicus, I don't know if it's caused by stock or not, but it seems that because the planets are PQS based, their textures are sometimes not loaded until the map/scaled view is opened, and PlanetShine has no way to read them until then. This is weird because those textures are not supposed to disappear like that ...

The "CelestialBodies.cfg" might undergo some heavy changes, and the celestial bodies settings will now rather act as overriders and modificators to the behaviour of the auto detection system, as well as provide options for compatibility with other plugins such as Kopernicus. Of course, I will keep the old format retro-compatible.

Detecting the planetshine color based one the texture coordinates (biome-based if you prefer) seems to be quite doable as well.

 

Edited by Valerian
  • Like 1

Share this post


Link to post
Share on other sites

I did not see this in the known issues and not sure whether it causes any problems, I just noticed it running through the log, you get one for every body, Linux 64bit, Ubuntu 15.10 Intel and Nvidia OpenGL

[ERR 22:17:51.552] [PlanetShine] An exception occured reading CelestialBodyColor node:
CelestialBodyColor
{
	name = Moho
	color = 124,102,88
}

The exception was:
System.ArgumentNullException: Argument cannot be null.
Parameter name: s
  at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at PlanetShine.ConfigManager.LoadBody (.ConfigNode bodySettings) [0x00000] in <filename unknown>:0

 

Share this post


Link to post
Share on other sites
1 hour ago, selfish_meme said:

I did not see this in the known issues and not sure whether it causes any problems, I just noticed it running through the log, you get one for every body, Linux 64bit, Ubuntu 15.10 Intel and Nvidia OpenGL


[ERR 22:17:51.552] [PlanetShine] An exception occured reading CelestialBodyColor node:
CelestialBodyColor
{
	name = Moho
	color = 124,102,88
}

The exception was:
System.ArgumentNullException: Argument cannot be null.
Parameter name: s
  at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at PlanetShine.ConfigManager.LoadBody (.ConfigNode bodySettings) [0x00000] in <filename unknown>:0

 

 

It's already fixed in the dev version.

It's not a big deal, it's just that PlanetShine tried to read DistantObjectEnhancement settings and failed, so it will not impact your gameplay at all.

Edited by Valerian

Share this post


Link to post
Share on other sites
3 hours ago, Proteus said:

can any one tell me how heavy this mod on the ram and fps?

It's very lightweight, it uses almost no RAM, and on medium (default) and low performance settings it barely uses your GPU and CPU.

There is a button in PlanetShine settings menu to disable/enable it at will, so you can test if there is any change to your FPS.

Edited by Valerian

Share this post


Link to post
Share on other sites

The next PlanetShine version will be coming out soon, most probably this week, and will bring many changes, therefore I will make it jump directly to v0.5

Here are the changes that you can expect:

- a large part of the code has been rewritten and cleaned to prepare for the future multiple and inter-bodies planetshine feature. [Done]

- planets/moons planetshine colors and atmosphere settings are now auto-detected during gameplay: no need to have specific settings for planets or texture packs (although old "CelestialBodies.cfg" file will still work, but is no longer required). [Done]

- EVE clouds are auto-detected during gameplay, planetshine color is updated accordingly. [Done]

- planets/moons planetshine color auto-detection will vary depending on the visible clouds and biomes. [Planned]

- changes to several furmulas for both albedo and atmospheric lights, with additional options to fine tune them. [WIP]

- better compatibility with other plugins, mostly regarding vacuum ambient light intensity and color. [WIP]

  • Like 3

Share this post


Link to post
Share on other sites

Sounds good.  KSP sure is getting a lot of visual love recently.  Maybe pizzaoverhead will drop some amazing acoustic improvements to go with all this visual bling!

  • Like 1

Share this post


Link to post
Share on other sites

Big change in the color auto-detection system, and it will be much better now :)

I was trying to guess the color based on the various terrain + atmosphere + EVE textures separately, and it was prone to many potential issues.

Now I just made it much simpler: I create a virtual camera on the vessel and point it at the planet, and from this camera I can determine the right light color, which will also vary depending on the visible biomes. This method is the most accurate, and will have the highest compatibility with any other mods.

I'm hoping to release a test version later today, I will need your feedback about the performance of this new method (does it affect your FPS).

Edited by Valerian
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now