nodrog6

[1.0.5] LightsOut (v0.1.5) - Day/Night Mode in VAB/SPH

118 posts in this topic

Add day and night modes to the VAB and SPH! Turn off the lights in the editors! Works at all upgrade levels!

LightsOut takes the existing VAB and SPH assets and modifies them to emulate a day and night mode in the VAB and SPH. It's designed to help with testing your craft's lighting without having to launch and then time warp to night.

Downloads: v0.1.5 from SpaceDock | v0.1.5 from GitHub

NOTE: This mod is an early beta. I'm still working out all of the kinks. Any feedback is extremely helpful and welcome. Enjoy!

Hotkeys:

 

  • L - Toggle day/night mode and all part lights
  • U - Toggle all part lights

 

Preview:

Javascript is disabled. View full album

Possible Future Features:

 

  • Configurable hotkeys
  • Faster load time
  • Animated day/night transition
  • More detailed assets in VAB/SPH during night mode

 

Installation:

Extract and merge the GameData folder with the GameData folder in your KSP directory. It's also available via CKAN.

Source: https://github.com/nodrog6/LightsOut

License: MIT

Edited by nodrog6
16 people like this

Share this post


Link to post
Share on other sites

This looks interesting, might try it out.

It seems that the VAB/SPH's own spotlight casts are baked textures. Do you think you'll be able to also show/hide them in conjunction with the core day/night lights out function?

[MOD - Could you please ensure that a copy of the licence is included within the download itself? It's one of the requirements for posting add-ons on these forums.]

1 person likes this

Share this post


Link to post
Share on other sites

Sorry about that. I added the license file and readme to the download itself. Thanks for the heads-up.

I ended up removing the daylight lightmap during night-mode. For now, night mode is dark enough that most details are lost in the level 3 buildings. In the earlier versions, I might create new lightmaps for night mode to reintroduce much of the lost detail.

Share this post


Link to post
Share on other sites

Does this work with the real outside time at the KSC?

1 person likes this

Share this post


Link to post
Share on other sites

No, for now it's always day in when entering the editor. I have some future plans which will make the KSC time match the editor time, but I haven't started exploring that feature yet.

1 person likes this

Share this post


Link to post
Share on other sites
Sorry about that. I added the license file and readme to the download itself. Thanks for the heads-up.

No worries! :)

Share this post


Link to post
Share on other sites

How difficult would it be to have all the interior lights on, but still see night outside the open door?

Share this post


Link to post
Share on other sites

Version 0.1.2 is released. See original post for download link.

Changelog:

  • Texture Replacer skybox changes now supported.

- - - Updated - - -

How difficult would it be to have all the interior lights on, but still see night outside the open door?

I think this is fairly easy to do, but I'm worried that users would want it to be day outside and the lights turned off. Closing the VAB/SPH doors may be tricky.

Maybe there's some middle ground that will still look good.

Share this post


Link to post
Share on other sites
Version 0.1.2 is released. See original post for download link.

Changelog:

  • Texture Replacer skybox changes now supported.

- - - Updated - - -

I think this is fairly easy to do, but I'm worried that users would want it to be day outside and the lights turned off. Closing the VAB/SPH doors may be tricky.

Maybe there's some middle ground that will still look good.

If squad would just give us easier access to modding the VAB/SPH interior models and such, we could easily create a walkabout mode inside these buildings and have togglable lights, doors, heck we could probably put the two editors in space surrounded with glass walls. As it is, we are left only dreaming... that is until someone goes out and makes a "model replacer" mod in the style of Texture Replacer. Oh well. Awesome mod by the way, I remember this being talked about a long time ago and I'm happy to finally have it.

Share this post


Link to post
Share on other sites

Does this work with all versions of the VAB/SPH, or just the final ones?

Share this post


Link to post
Share on other sites
Does this work with all versions of the VAB/SPH, or just the final ones?

It works with all versions of the VAB/SPH.

Share this post


Link to post
Share on other sites

Sweet. Now it would be easier to test placement of my lander light!

Share this post


Link to post
Share on other sites

excited to watch this one develop! all too often i am lulled into a false sense of security when building my solar powered air/spacecraft, only to be unpleasantly surprised when i go to launch it...

Share this post


Link to post
Share on other sites
Very nice idea. would you consider putting your mod on CKAN?

Sure! I'll get it up there as soon as I can.

Share this post


Link to post
Share on other sites

I'd like to see something like the standard left-click of the button toggles the day/night appearance, and a right click toggles the lights instead of having to rely on a hotkey for that extra function.

Share this post


Link to post
Share on other sites
I'd like to see something like the standard left-click of the button toggles the day/night appearance, and a right click toggles the lights instead of having to rely on a hotkey for that extra function.

I like the idea of having a button to toggle the lights, but I'm not sure that right clicking on the current button is intuitive enough for most users (including myself). I'd use another button, but that feels wasteful, so maybe I'll make the current button have a popup? I'm open to any ideas.

Share this post


Link to post
Share on other sites

hmm, I find it rather intuitive considering it's really a secondary function for this mod. The real important thing is the day/night toggle. I don't know enough about the stock or non-stock toolbar API to know if there's a way to put something into a tool-tip such as "left toggles world time / right toggles lights" when hovering the button.

At the very least, I'd think a readme entry (and a note on the OP) explaining it would be enough for most users. It'd certainly be more intuitive that a number of other more complicated mods and their various right/left clicking methods for activating different things.

The complicated part would be whether or not you want the icon to reflect the various states and the process of tracking those states. Currently there's only two modes for the icon, activated & deactivated, for the toggle between night and day respectively. I would think adding another little icon to that image to track the light toggle state would work, however you'd then need to track, and create the respective icon image for, an extra two states for a total of 4 icons: night mode with lights off, night mode with lights on, day mode with lights off, day mode with lights on.

I probably shouldn't be thinking so hard right now considering I have a math exam (statistics sucks) later today, but I'm almost interested enough in how this might work to tackle it myself later on. At the very least, I might have a look at the code as it is now and get back to you if I come up with anything. I know things like this have been done before using the toolbar addon, but I'm unsure if Squad did anything similar with their own toolbar.

Share this post


Link to post
Share on other sites

I updated LightsOut for KSP 1.0 compatibility. I'll also upload it to CKAN and KerbalStuff as soon as it's updated.

1 person likes this

Share this post


Link to post
Share on other sites

sweet, i always wanted somehting like this. it gets annoying to have to launch then zoom to nighttime to test lighting

Share this post


Link to post
Share on other sites

This is a great idea. Saves from having overexposed/way too bright space stations or underlit ones. I once launched an entire ground mission to Duna without realizing I'd pointed the spot lights the wrong way.

Share this post


Link to post
Share on other sites

I just posted it to Kerbal Stuff and it will be on CKAN once the pull request is approved! Enjoy!

1 person likes this

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