Jump to content

[1.3.1] Aviation Lights v3.14 [use MOARdV's version instead!]


BigNose

Recommended Posts

My apologies in advance if this is a dumb question, but you did reload the game or at least the parts database, right? Changes won't take place until you at least go to the debug menu ([ALT]+[F12]) and reload the parts from the Space Center scene.

I shut down and reboot the game entirely, after every change.

Sounds like there is an easier method. XD

Also, bear in mind the reason for a minimum number in each channel is because 0.0 is black. :D

Yea, so me setting some of them to 0.01 could of made it not work I guess. 0.01 to 3.. Got it..

Ty. ^^ I'll try that.

Edited by B15hop
Link to comment
Share on other sites

The way I've always tested part changes was to just lob a capsule with the part attached out onto the launch pad and play around.

If that doesn't result in changes, then I'm not sure what to suggest. The method I recommended is how I changed the red beacon to amber, and the reload process did result in the change I expected.

Link to comment
Share on other sites

The way I've always tested part changes was to just lob a capsule with the part attached out onto the launch pad and play around.

If that doesn't result in changes, then I'm not sure what to suggest. The method I recommended is how I changed the red beacon to amber, and the reload process did result in the change I expected.

Thanks for letting me know how to access the debug menu. I can see now that the game is not loading the new settings I put into the cfg file. It retains the original settings and will not save what I change them too.. odd..

I changed the cfg, then I reload in game from the spaceport and the cfg still remains with the old numbers as far as the game is concerned.

In the cfg file it shows I changed the numbers still.

But the game is like holding onto some old numbers for some reason.

Edited by B15hop
Link to comment
Share on other sites

Thanks for letting me know how to access the debug menu. I can see now that the game is not loading the new settings I put into the cfg file. It retains the original settings and will not save what I change them too.. odd..

I changed the cfg, then I reload in game from the spaceport and the cfg still remains with the old numbers as far as the game is concerned.

In the cfg file it shows I changed the numbers still.

But the game is like holding onto some old numbers for some reason.

Did you try deploying a new "craft" with a new instance of the part attached?

Link to comment
Share on other sites

Did you try deploying a new "craft" with a new instance of the part attached?

Yea, the game will not load the new changes.

I have modded, scripted and done 3D animation. Usually this kind of stuff is a no brainer for me..

I even deleted the old ship, using the old numbers and put a new ship in.

This is after totally reloading the game.. Same thing..

Set my colors to:

Color = 0.1, 0.1, 0.1

Nothing changed.

Game still has the old settings in it, per the debug menu.

Had this problem before with this game. It wouldn't save the option to "use staging controls for docking"

So I had to manually do it in the cfg.

Not like I'm using some crappy system here that is freaking out..

i7 with sli gtx 680.

Any idea why the game will not load, the new settings I wrote into the cfg?

SIDE NOTE:

Also I really like this mod but there is one thing stopping me from using it as I would like to.

All of the lights shine right through everything.

Any plans to fix that? I hope so.

This is really a mod I think is like a vanilla standard.

If you could add tiny LED lights, like the one for the small battery pack, that would be awesome as well.

You know, just that tiny, green light, on the battery pack, all by it's self, with variants in red, blue and white..

You'd be my hero. :P

Great work and I hope the degree in Engineering is going well.

I work in that field myself, so I know how it can get..

Good luck. :)

Edited by B15hop
Link to comment
Share on other sites

Yea, the game will not load the new changes.

I have modded, scripted and done 3D animation. Usually this kind of stuff is a no brainer for me..

I even deleted the old ship, using the old numbers and put a new ship in.

This is after totally reloading the game.. Same thing..

Set my colors to:

Color = 0.1, 0.1, 0.1

Nothing changed.

Game still has the old settings in it, per the debug menu.

Had this problem before with this game. It wouldn't save the option to "use staging controls for docking"

So I had to manually do it in the cfg.

Not like I'm using some crappy system here that is freaking out..

i7 with sli gtx 680.

Any idea why the game will not load, the new settings I wrote into the cfg?

SIDE NOTE:

Also I really like this mod but there is one thing stopping me from using it as I would like to.

All of the lights shine right through everything.

Any plans to fix that? I hope so.

This is really a mod I think is like a vanilla standard.

If you could add tiny LED lights, like the one for the small battery pack, that would be awesome as well.

You know, just that tiny, green light, on the battery pack, all by it's self, with variants in red, blue and white..

You'd be my hero. :P

Great work and I hope the degree in Engineering is going well.

I work in that field myself, so I know how it can get..

Good luck. :)

Thanks for your moral support regarding my engineering degree! :D

Now to the problem:

The game had to load the .cfg files at least once in the beginning to know which color each light has, or moreover, to even know what to do with them. I don't get this.

You can change the RGB components and the game still uses the old values? From where does it get them then? Are you maybe running two instances of KSP at the same time (with different mods or so) and accidently starting the wrong one?

The unity engine can't just 'remember' the old values because it doesn't like the new ones... :P

EDIT: Try starting the game once without the mod, after that alter the .cfgs and start it again with the modified mod (hehe). If it doesn't load the right .cfgs then, I don't know how we could get it to.

Link to comment
Share on other sites

I have to say I love these. Their use as docking lights alone makes them invaluable.

Thanks, for docking they are indeed useful, and regarding the looks they go best with the new B9 Aerospace Pack in my opinion. Amazing looking planes with realistic lighting cannot be beaten (exept by amazing looking planes with realistic lighting and boosters, of course :D)!

Link to comment
Share on other sites

Awesome, thanks. :)

Gristle: for the part, I just zipped it up, because I also modified its texture to an amber shade as well.

Download this, and extract it to %KSP_ROOT%\GameData\AviationLights\Parts:

https://dl.dropboxusercontent.com/u/2004695/lightbeacon_amber.zip

Thank you DeadWeasel! Above and beyond effort. Also thanks to BigNose for the Mod. All my crafts have running lights now.

Enjoy!

Oh, and as BigNose pointed out, you can easily make any additional colors you want in the future.

  • Copy one of the lights, and rename it.
  • Open the .cfg file, and change the following values as appropriate:

// --- general parameters ---
name = lightbeacon_amber

// --- editor parameters ---
title = Amber Beaconlight

//MODULE
//color scheme is Red, Green, Blue
//value range is minimum 0.1 to maximum 3 for each color value

Color = 1.00, 0.70, 0.07

That's it! If you want to get a bit more fancy, you'll need to edit the texture in the part's folder as well so the "lens" color matches the intended color, which can be done in Photoshop, GIMP or Paint.NET.

Thanks DeadWeasel! Above and beyond effort! Thanks also to BigNose for the mod, all my crafts now have running lights.

CA064602FE408B4E446518EE52155E09B565F933

Link to comment
Share on other sites

I've done some extensive testing to find the source of my lag. First, let me say that if your computer is new and fast you probably won't notice any lag, but my machine is not so hot (reference previous post in this thread) hence anything that is out of place shows up. I think my lag is being caused by the fact that the textures for these parts are .png and here is why. When I modify a squad spotlight with aviation light modules, I can get them to produce colored effects on my ships and the surface of mun or minimus or wherever. I used minimus for these tests. No noticeable lag is observed with colored squad lights. In my earlier post, I referenced the fact that [LOG 16:55:08.475] Skipped rendering frame because GfxDevice is in invalid state (device lost) was showing up in my KSP.log. This is not being caused by aviation lights, KSP, or my machine, but by the user, namely me. I was hitting the windows key on my keyboard to send KSP to the background(which is running full screen) in order to access my desktop. This is when that particular error was showing up. I don't think all the issues with .png textures and .20.2 have been lined out. Maybe in the future i will have time to import textures into unity and re-export as .mbm or .mu or whatever, same as squad, if that's even possible, and do more tests. Or, maybe just shut the lights off when on EVA or moving on the surface. Sorry for the long post. I also found another not so significant error in the .cfg that was showing up in KSP.log.

maximumDrag = 0.01

angularDrag = 0.01

This is the wrong format. It should look like this :

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 1

I really like this mod, and that is the reason I'm picking at it, so it will work well with the slow machines that some of us are still using.:wink:

Link to comment
Share on other sites

I've done some extensive testing to find the source of my lag. First, let me say that if your computer is new and fast you probably won't notice any lag, but my machine is not so hot (reference previous post in this thread) hence anything that is out of place shows up. I think my lag is being caused by the fact that the textures for these parts are .png and here is why. When I modify a squad spotlight with aviation light modules, I can get them to produce colored effects on my ships and the surface of mun or minimus or wherever. I used minimus for these tests. No noticeable lag is observed with colored squad lights. In my earlier post, I referenced the fact that [LOG 16:55:08.475] Skipped rendering frame because GfxDevice is in invalid state (device lost) was showing up in my KSP.log. This is not being caused by aviation lights, KSP, or my machine, but by the user, namely me. I was hitting the windows key on my keyboard to send KSP to the background(which is running full screen) in order to access my desktop. This is when that particular error was showing up. I don't think all the issues with .png textures and .20.2 have been lined out. Maybe in the future i will have time to import textures into unity and re-export as .mbm or .mu or whatever, same as squad, if that's even possible, and do more tests. Or, maybe just shut the lights off when on EVA or moving on the surface. Sorry for the long post. I also found another not so significant error in the .cfg that was showing up in KSP.log.

maximumDrag = 0.01

angularDrag = 0.01

This is the wrong format. It should look like this :

maximum_drag = 0.2

minimum_drag = 0.2

angularDrag = 1

I really like this mod, and that is the reason I'm picking at it, so it will work well with the slow machines that some of us are still using.:wink:

There is an easy way to test that.

Move the texture file out from one of the part folders, and plop a jpg version of it in there.

Here, use this one:

pBY7MWY.jpg

See if that makes a difference. I'm honestly not entirely convinced that it will. :(

EDIT: not sure if the minimum/maximumDrag are really an issue. The game seems to accept the values without question (no load errors in the log). Could this possibly be an appropriate time to use "if it ain't broke..."?

Edited by Deadweasel
Link to comment
Share on other sites

I created a new clean install with only aviation lights and hyperedit just to eliminate any doubt. Here is the log :

https://docs.google.com/file/d/0B6YckDD54-HWQVZJemFjcjd2ZXc/edit?usp=sharing

Lines 882-894

[LOG 14:01:20.885] GameDatabase: Assets loaded in 75.114s

[LOG 14:01:20.889] PartLoader: Compiling Part 'AviationLights/Parts/lightbeacon_red/part/lightbeacon_red'

[WRN 14:01:20.953] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.008] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_blue/part/lightnav_blue'

[WRN 14:01:21.014] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.022] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_green/part/lightnav_green'

[WRN 14:01:21.027] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.036] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_red/part/lightnav_red'

[WRN 14:01:21.041] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.050] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_white/part/lightnav_white'

[WRN 14:01:21.057] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.067] PartLoader: Compiling Part 'AviationLights/Parts/lightstrobe_white/part/lightstrobe_white'

[WRN 14:01:21.072] PartLoader Warning: Variable maximumDrag not found in Part

The game does notice it but doesn't seem to care. Like you said, it's not an issue. I was looking for anything that affects my lag problems.

The reason I am suspicious of the texture formats is this post :

http://forum.kerbalspaceprogram.com/content.php/182-0-20-2-Patch-Released

Along with the fact that I can edit .cfg files of squad spotlights(by simply replacing their module with BigNose's module) and get similar effects as aviation lights without lag.(the only difference being the light itself is not colored, effects on vessels and terrain are the same). There is probably a good reason that squad uses .mbm and .mu for most of their parts. I am far from an expert, just speculating here. I feel like I've beat this dead horse enough. I am having almost as much fun playing with these codes and learning about the game design as I do actually playing the game. As we say in Arkansas, "Have a rice day!"

Link to comment
Share on other sites

I created a new clean install with only aviation lights and hyperedit just to eliminate any doubt. Here is the log :

https://docs.google.com/file/d/0B6YckDD54-HWQVZJemFjcjd2ZXc/edit?usp=sharing

Lines 882-894

[LOG 14:01:20.885] GameDatabase: Assets loaded in 75.114s

[LOG 14:01:20.889] PartLoader: Compiling Part 'AviationLights/Parts/lightbeacon_red/part/lightbeacon_red'

[WRN 14:01:20.953] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.008] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_blue/part/lightnav_blue'

[WRN 14:01:21.014] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.022] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_green/part/lightnav_green'

[WRN 14:01:21.027] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.036] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_red/part/lightnav_red'

[WRN 14:01:21.041] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.050] PartLoader: Compiling Part 'AviationLights/Parts/lightnav_white/part/lightnav_white'

[WRN 14:01:21.057] PartLoader Warning: Variable maximumDrag not found in Part

[LOG 14:01:21.067] PartLoader: Compiling Part 'AviationLights/Parts/lightstrobe_white/part/lightstrobe_white'

[WRN 14:01:21.072] PartLoader Warning: Variable maximumDrag not found in Part

The game does notice it but doesn't seem to care. Like you said, it's not an issue. I was looking for anything that affects my lag problems.

The reason I am suspicious of the texture formats is this post :

http://forum.kerbalspaceprogram.com/content.php/182-0-20-2-Patch-Released

Along with the fact that I can edit .cfg files of squad spotlights(by simply replacing their module with BigNose's module) and get similar effects as aviation lights without lag.(the only difference being the light itself is not colored, effects on vessels and terrain are the same). There is probably a good reason that squad uses .mbm and .mu for most of their parts. I am far from an expert, just speculating here. I feel like I've beat this dead horse enough. I am having almost as much fun playing with these codes and learning about the game design as I do actually playing the game. As we say in Arkansas, "Have a rice day!"

(The mini issue with the drag value is known and will be fixed in the next update.)

Have you tried using Deadweasels .jpg texture yet? If it really makes things faster, I would convert all textures too, but I highly doubt it. On my system I really can't tell any difference at all, but hey, that's just me.

Let me get this straight: Does it lag when you activate the lights or when you simply have a craft with the lights on in loading range? If it's only when the lights are on, it propably slows down because your laptop is already at it's max, and rendering the lighting of parts costs too much resources, therefore Krakensbane kicks in (as you can tell by the color of the MET value in the top left). Is your timer already yellow or red to start with?

But, on the other hand, you said using my .dll with a standard light from Squad causes no issues, which makes no sense at all for me. Something is really fishy there, I can smell it... :P

Link to comment
Share on other sites

Lag only occurs when lights are on and in loading range and on the surface. When lights are in a flash mode, the lag comes and goes with the lights. In fact if I scroll way out so the lights are no longer visible, the lag goes away, so definitely has to be an issue with rendering reflections on vehicles and surfaces. I suspect texture format because the squad lights are not causing nearly as serious an issue. Haven't tried jpg. yet. I will as soon as wrastling's over.(yeah, I'm a redneck). I've never noticed colors on the MET. Will pay attention next time. Thanks.

Afterthought : I am just stabbing in the dark here with this theory on the textures. This is very strange to me also.

Link to comment
Share on other sites

I don't notice any lag, but my video card fan kicks into high gear when I turn the lights on, so it's pretty clear lights do cause more stress on the system. Not that that's a bad thing -- if my video card fan isn't whining, I'm not giving it enough to do, right? ;)

Link to comment
Share on other sites

I did notice my video card fan making some music down there, and I think I have an idea why.

You notice how the lights can glare through surfaces and bounce off others? Now, consider some of the ships we make, especially SSTOs, that feature clipped parts, and more specifically scads of merged air intakes.

Now, considering how the game doesn't always fully occlude light as we think it should, how much effort do you think is going into re-calculating the lighting for each and every component that's within the area of where the game thinks the light should be visible?

HSTAC-02 Whiteraven uses SIX intakes, all merged into the same space that would normally be occupied by only two:

KLHK4Vu.jpg

That has got to be playing havoc with the game engine, having to re-calculate the lighting for every surface within range of every light, each time they go on and off again.

Even if you don't have a bunch of merged parts, or even if you're not using clipping at all, the fact of the matter is that each time one of those lights blinks, multiple surfaces have to be checked for range, and then lighting effects applied to each according to position relative to the light, and then again when the light turns off. Multiply that by however many lights you have mounted on a craft.

Minecraft suffers similar issues if you mess around with enough lights in a large enough area, but Minecraft hoses the CPU, whereas KSP chews more on the GPU, potentially resulting in the situation we're seeing here.

Here's a thought: what happens if you have the lights mounted, but DO NOT use any flashing or interval mode? What if you just turn them all solid on or off? Is the video card fan still pushed to new heights of musical frenzy in that case?

Link to comment
Share on other sites

HEY! I am really getting excited. I just tried Deadweasel's .jpg. First off, sweet color. Has a really nice look. Second, there is no lag! A huge improvement. I am going to try and find a way to display FPS on screen and force it to lag again with .png. Then get screenshots of FPS with .jpg and .png if there is a big difference. Back in a few.

Link to comment
Share on other sites

Here's a thought: what happens if you have the lights mounted, but DO NOT use any flashing or interval mode? What if you just turn them all solid on or off? Is the video card fan still pushed to new heights of musical frenzy in that case?

It is, and in my case it's less about so many surfaces as it is my tendency to light up my ships/stations like a christmas tree. xD Docking multiple ships each with a dozen lights on them has its costs...

Link to comment
Share on other sites

HEY! I am really getting excited. I just tried Deadweasel's .jpg. First off, sweet color. Has a really nice look. Second, there is no lag! A huge improvement. I am going to try and find a way to display FPS on screen and force it to lag again with .png. Then get screenshots of FPS with .jpg and .png if there is a big difference. Back in a few.

Whoa nice!

Try using Fraps, it shows a frame counter on the game screen while it's running. :)

Oh, and incidentally, I didn't make the source skin for these. The one I posted is little more than a color shifted version of the stock red one, converted to jpg.

Basically I just want to be sure I'm not taking kudos for any part of the design of these things; I'm just here to help spread the love. :D

Edited by Deadweasel
Link to comment
Share on other sites

Sigh;.; and dissapointment. After further tests using fraps, it doesn't seem to matter whether its a .jpg or a .png. Here are results:

.png tests:

lights off

6v6UJFZ.png

lights on

bju1xzP.png

.jpg tests

lights off

7lhu6nH.png

lights on

CguotbH.png

In conclusion, what does seem to matter is the part counts on my ships. More parts = more reflections = lower frame rates when lights are on. Also it seems to matter where I am landed on a particular body. The lights seem to interact differently with the planet or mun terrain based on where I land. Moral of the story : Get a better machine with a better video card. I am putting it on my list now, with the miles of other crap I want.

Edited by Otis
spelling
Link to comment
Share on other sites

Sigh;.; and dissapointment. After further tests using fraps, it doesn't seem to matter whether its a .jpg or a .png. Here are results:

In conclusion, what does some to matter is the part counts on my ships. More parts = more reflections = lower frame rates when lights are on. Also it seems to matter where I am landed on a particular body. The lights seem to interact differently with the planet or mun terrain based on where I land. Morale of the story : Get a better machine with a better video card. I am putting it on my list now, with the miles of other crap I want.

Yeah, seems like the card in that machine really isn't happy to be playing that game at all. IIRC, you only had 64MB of physical RAM on that card, with more being offered via memory sharing. That doesn't say good things about the card's probable capability for 3D applications.

Sorry, I wish I had some miracle cure to offer, but it seems like you're running right at the very edge of that system's performance envelope.

There is, however, some tweaking you can try! Go check out Razer Game Booster (yes, *that* Razer). You can set it up so that when you launch KSP through it, it kills unnecessary processes and effects to free up as much performance as possible.

Here's what I usually set when gaming:

  • Turn off transparency and window animation effects
  • Turn off drive indexing
  • Turn off all system tray applications, except for basic services like sound control panel, antivirus and mouse drivers
  • Disable just about every other non-critical app and service that Game Booster recommends

The nice thing about GB is that if you set all this up to trigger when you launch the game from it, when you exit the game again, it re-loads/enables everything you had it set to kill.

Maybe that will help you scratch a few more frames out of that old nag of a machine of yours. :D

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