Jump to content

[0.23] Runway PAPI array - Version 0.3.2


asarium

Recommended Posts

This is funny I was going to suggest sprites :).

As for emissives that also sounds nice. It would probably be always on right?, but you'd need to change it between between red and white. If something needs to be done on my end with respect to that then I'll need some help with it too.

Link to comment
Share on other sites

This is funny I was going to suggest sprites :).

As for emissives that also sounds nice. It would probably be always on right?, but you'd need to change it between between red and white. If something needs to be done on my end with respect to that then I'll need some help with it too.

If it switches from white to red, that means that one object appears and the other disappears. That should be coded in.. It would be awesome if we extended this plugin to all airport lights and I'd really like if you could also include coding for other airport lights that switch on when the sun goes down. =) I can help in creating the lights and sprites, but I don't know how to code.

Link to comment
Share on other sites

I don't know how to code either, well not nearly well enough to make plugins anyway. This is Asariums plugin I just offered to make the PAPI and ALS models. WRT the lights, yes the sprites should replace eachother, but I was just wandering if I needed to do something specific in blender to allow Asarium to use different textures for the emissive light textures, since they would need to be both red and white too. I don't actually know how emissive textures work. I'll make an effort to do some reading.

Link to comment
Share on other sites

Thanks everyone, I really appreciate your support :)

I never thought about using a sprite but that sounds like it's going to work way better than the current spheres. I guess that I'll only need a white version as every other color can then be created by simply multiplying it with the texture color. I'll need to look up how Unity shaders work to do that though.

I'm planning to add support for adding arbitrary light arrays to support the full range of runway lights.

Link to comment
Share on other sites

I'm not sure how this engine handles LODs, but you might want to make the glow quad for the lit bit of the light model progressively larger for further distance LODs - I think those lights are visible at distances the model is going to be occupying a pixel or two? and the simplest way of changing colour glow is just to use a quad for each colour & map them to different parts of the texture. That's really oldschool though, I'd hope this engine has some texture swap capability :)

Link to comment
Share on other sites

Here's a nice photo for reference

0436724_139738250.jpg

You can see how the glare of the nearest small runway edge white light has practically the same size ON PICTURE as the one on the other end of the runway. That's cause the glare depends more on intensity than distance. So you can see how nicely the glares on the other end form a solid line. As for the PAPI lights, you can see they are much more intense. The lights themselves are not that big how big is the glare

Edited by nothke
Link to comment
Share on other sites

I'd like to chime in again. First, lots of good brainstorming going on here. The idea of sprites strikes me as being the most sensible. For my part, I'm not sure how much I like that model given earlier -- I'd expect something much wider and thinner.

A couple things moving away from the implementation of the lights themselves and instead to their placement, though...

My first comment is that the means of adding new light arrays and groups to the game is exceedingly difficult and tedious. One has to land a probe, plane, or rover on the exact spot of the desired light, convert the "landed-at" coordinates to a decimal degree, get the conversion wrong, and try agian ten times to tweak the position, each time restarting the entire game for the repositioning to take effect. The two-part workaround seems to be (1) introduce a parser that can take coordinates (7*31'08' N) and convert them to decimal degrees (7.54 or something, probably), and (2) allowing at least a reload of the PAPI systems from the dynamic interaction window, so a full restart is not required.

Another quibble is that in the cfg the glideslope angle is bound to the individual light arrays, while the dynamic editor modifies the entire group, and, more impotantly, seems to override any information in the cfg upon start to 6*.

Looking ahead, at least partly, I want to propose an alternative means of describing light positions and their grouping. Rather than needing multiple types of arrays that would be exposed to the user (PAPI, runway illumination of several sorts) by describing individual arrays' centers and orientation, I propose a higher-order approach: describe the runway tarmac with three points, each on (or very near) a corner of the runwa;, or, two on the corners of one end, one centered on the opposing end. From that, you have the dimensions and orientation of the runway, and can compute once and save the location of all the requisite lights, perhaps by scaling and rotating a known array template to the provided data.

Finally, as a bug report, there still seems to be the troublesome issue of the PAPI lights freezing on a single color (usually all-white), making guided approach from a deorbit burn a pipe dream at best. Still not sure exactly what causes it, but seems to be consistent after orbiting once and trying to land.

Link to comment
Share on other sites

Looking ahead, at least partly, I want to propose an alternative means of describing light positions and their grouping. Rather than needing multiple types of arrays that would be exposed to the user (PAPI, runway illumination of several sorts) by describing individual arrays' centers and orientation, I propose a higher-order approach: describe the runway tarmac with three points, each on (or very near) a corner of the runwa;, or, two on the corners of one end, one centered on the opposing end. From that, you have the dimensions and orientation of the runway, and can compute once and save the location of all the requisite lights, perhaps by scaling and rotating a known array template to the provided data.

That's interesting, but I'd rather like for the lights to be empty gameobjects when I import the model, and then all the lights are instanced on the gameobject positions, similar to how it's done with internal props now. As for existing runway, I guess we'll just need to position them manually, like in the KerbTown mod.

Link to comment
Share on other sites

While you're messing with emissive textures... overlaying the entire runway with emissive quads with repeating textures for the runway lights might work until surprisingly close ( if that sort of thing works in this engine at all ) - it'd probably look terrible right on the runway, but at that point given you're not going very fast some low poly light sources would probably not hurt.

Link to comment
Share on other sites

...For my part, I'm not sure how much I like that model given earlier -- I'd expect something much wider and thinner....

If you don't mean my model then disregard the following. If you do, then your expectations really have nothing to do with anything. I didn't pull that design out of my arse. Even a cursory google image search should put your mind at ease.

Edited by Cpt. Kipard
Link to comment
Share on other sites

If you don't mean my model then disregard the following. If you do, then your expectations really have nothing to do with anything. I didn't pull that design out of my arse. Even a cursory google image search should put your mind at ease.

That was an unnecessarily dismissive and, if I may be so bold, borderline arrogant way of putting it...

Yes, I did mean the selfsame model, my meaning as the mesh/textures, rather than the technical meaning for abstraction, i.e., mental model of something. Further, my objection was not meant as a slight. I was merely voicing my opinion which, I do admit, was based on a misunderstanding of how the model was to be used -- which, for edification, was my not realizing that it was intended for use as individual light elements within the array, but instead imagining that it was to contain the array in its entirety. An understandable error, given that (1) I was indeed unfamiliar with the appearance of real-world PAPI light boxes and (2) the presence of a series of three light elements on the front.

...position them manually, like in the KerbTown mod.

Perhaps. I've yet to turn up how exactly KerbTown places its objects (images were too small to see the dialog, and cursory youtube search has found nothing useful), but if it is significantly more usable than the current system (see my prior complaint), that might be a good option.

Link to comment
Share on other sites

Please be nice, the model is a very good replica of the real worldâ„¢ object and I want to use it in a later version of the plugin.

Perhaps. I've yet to turn up how exactly KerbTown places its objects (images were too small to see the dialog, and cursory youtube search has found nothing useful), but if it is significantly more usable than the current system (see my prior complaint), that might be a good option.

I tried to make it possible to reload the config file(s) by pressing a button but KSP does preload all ConfigNodes which after that cannot be reloaded (at least I haven't found a way to do so). I want to add a KerbTown like editor for the arrays but first I will implement the static light arrays to add full ALS support without hard-coding anything. I also opened an issue at github to track your reported issue which I also encountered. Apparently you don't need to go into orbit at all but simply flying "around" KSC is enough to break it.

I will also create a plugin development thread in the appropriate sub-forum to keep this thread clean and to inform about current development goals.

EDIT: Here it is: http://forum.kerbalspaceprogram.com/showthread.php/45796-Development-thread-for-the-PAPI-array-plugin?p=589159#post589159

Edited by asarium
Link to comment
Share on other sites

Very nice, thank you. I will link to the video in the first post :)

Can you describe the issue you are describing at the end a bit more? Are there no lights at all or won't the array just not change the color anymore?

Link to comment
Share on other sites

The lights completely disappear when revert flight happens. I don't mod KSP, but I am a coder. I would think that whatever action you have trigger the loading of your lights is not called in the same way (or not called at all) when flight is reverted.

Link to comment
Share on other sites

I have seen one passing reference and heard one in the video to a dialog in which we may make changes to the slope angle. I am unable to find it. Please if you can provide more detailed instructions. GREAT MOD!

Link to comment
Share on other sites

The lights completely disappear when revert flight happens. I don't mod KSP, but I am a coder. I would think that whatever action you have trigger the loading of your lights is not called in the same way (or not called at all) when flight is reverted.

I can not replicate the bug on my KSP install, can you post your KSP log after the bug happened? Maybe an exception is thrown somewhere.

I have seen one passing reference and heard one in the video to a dialog in which we may make changes to the slope angle. I am unable to find it. Please if you can provide more detailed instructions. GREAT MOD!

The mod adds a button to the top left side of your screen which says "Light groups". When you click it a window will open which will allow you to change the glideslope.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

You should move

{KSP}/GameData/PAPIPlugin/PluginData/PAPIPlugin/resize.png

to

{KSP}/GameData/PAPIPlugin/Plugins/PluginData/PAPIPlugin/resize.png

Or move the DLL up a level. The game looks for the files relative to where the DLL is placed.

That is why it wasn't using the icon in the corner.

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