Page 1 of 168 1231151101 ... LastLast
Results 1 to 10 of 1678

Thread: [0.24] Lazor System v34 (July 22)

  1. #1

    [0.24] Lazor System v34 (July 22)



    Romfarer Lazor System UPDATED: July 22, 2014 : Version 34 Requires KSP 0.24
    Lazor System is an advanced targeting and guidance system with a lot of functions bundled in subsystems which can be activated by placing colored lazors on your vessel. You can do a lot of stuff with Lazor System, not only targeting. It has Tractor Beams, Lazor Guided flight both for your vessel and attachable modules such as missiles, Fuel transfer, Graphical overlays for the map/flight-view, extensive vessel and planet/moon parameter readouts, just to name a few.



    Basic operation:
    To make Lazor System work you have to place at least one of the 3 main modules on your vessel. Additional and more powerfull subsystems are activated by attaching colored lazors. A full description of all of these functions follows in the subsystems overview below.

    Every main module has two action groups enabled on default: "Custom01" for enabling mouse look (hotkey "1") and "Custom02" for changing the color (hotkey "2"). Mouse look is the most important as it is what you will use to aim the main lazor.

    New feature: Docking Camera
    Every version of the Lazor System main module comes with a built in docking camera which can be activated from any docking port attached to the vessel by right clicking on it. The camera has a crosshair display, indicating the straight forward direction of the docking port. To activate the extended displays, simply target the docking port you wish to dock with, using the stock KSP targeting system. When this is done 3 numerical displays will appear at the top middle and left center. These are, from the bottom up, the x and y angle from the docking ports forward direction to the target docking port, the relative velocity in the x and y direction and the x and y distance. The graphical displays are as follows: The white cross shows your alignment, and the red cross shows your relative speed. So when the stipled cross, the white cross and the red cross is on the docking port, then you are perfectly aligned for docking.
    [Spoiler: Docking Camera] [Spoiler: Set up docking camera as a separate module]

    Subsystems overview (Guides and Tutorials): The main features of Lazor System
    If you have placed colored lazors on your vessel, new system functionality will appear in the subsystems tab. The currently available systems are as follows:

    [Spoiler: Tracking Station linkup (blue lazors)]
    [Spoiler: LIDAR (green lazors)]
    [Spoiler: Lazor Guided Flight (red lazors)]
    [Spoiler: Tractor Beam (magenta lazors)]
    [Spoiler: Engineering (yellow lazors)]

    Lazor System main GUI panel:
    From the main panel of Lazor System you can set the range of all the lazors, toggle mouse look on and off (if you prefer gui buttons over the action groups). It also shows what the system is targeting and what the main lazor is hitting. This is also where you will find the default functions that comes with the main module. You only have to put the main laor system module on your vessel to get access to these functions. Each function or mode is closely related to the color of the main lazor and there are four categories described below:
    [Spoiler: Support: (White)]
    [Spoiler: Attitude: (Red)]
    [Spoiler: Scan: (Green)]

    Config panel:
    This panel shows all lazors attached to your vessel. Here you can split subsystems up to for example. run a hovering AND a lifting tractor beam system at the same time. ▼ removes the lazor group from the subsystem. ▲ adds a lazor group to a subsystem if only one of the same color is activated, adds a new subsystem if none is activated. If you have two subsystems of the same color and want to add another lazor group to one of them, select 1 group in the subsystem you want to merge with and the ∈ (merge button) pops up for all unassigned lazors.

    Targets Tab and Targeting:
    Everything lazor system knows the location of, such as Vessels, Celestial Bodies, Objects or KPS locations, are displayed here.
    • Target list targeting: Use the blue Tracking Station Linkup system to populate the list. Click on the vessel in the Targets Tab. Press the target button at the bottom of that tab.
    • Manual targeting: Press hotkey "1" to enable mouse look mode. Click on the vessel you wish to target. Note: The range of the target must be within the lazor range. Set this range with the slider on the main panel.

    [Spoiler: Target tab details and screenshots]

    Parameters Tab:
    This tab displays anything you need to know about your vessel in 4 categories. Each parameter can be highlighted and some comes with a toggle button which will enable graphical overlays. For example you can show the velocity of your vessel as a vector overlay.
    • Surface parameters: Altitude from terrain, vertical speed, etc.
    • Orbital parameters: Orbit velocity, Apoapsis altitude, Orbital period, Eccentricity, etc.
    • Physical parameters: Mass, Pressure, GeeForce, etc.
    • Resources: Shows current and total amounts for each resource on your vessel. when highlighted it also shows flow rate and time until depletion/restoration.

    [Spoiler: Parameters tab example]

    Target Cam Tab:
    Provides a secondary camera which is displayed in a gui window. If nothing is selected this will be the eye of the main lazor. If you have a target selected it will zoom in on the target. Click on the camera window to move the display in relation to the target. If you use the mouse wheel when hovering over it, you will zoom in and out. This camera also has built-in Nightvision and a few other filters. When you have a vessel or celestial body targeted, the target cam display will show usefull information about the target.
    [Spoiler: Examples of Target Cams]

    Achievements Tab:
    Track your achievements in the game, such as mun landings, return missions, various orbits. This system will also track kerbals killed and vessels destroyed.

    Modules Tab:
    External aimable devices such as missiles, bombs and sunbeam will appear here.


    Lazor Guided Weapons pack (image below is outdated)

    This package contains lazor guided missiles and bombs. These don’t require the Lazor System attached to the vessel in order to operate. However, when the system is present, they will either follow the main lazors direction or home to the target assigned by Lazor System.

    This package is now called Lazor Guided Weapons pack and can be downloade from here

    Video of the lazor guided missile in action.
    An older video of the missiles.

    Video explaining how the missile guidance system works.


    Sunbeam

    Originally created by Tosh. This is a high powered laser which will overheat and explode anything it hits. Just like the missiles and bombs, this will work separately from Lazor System. When attached to a vessel with Lazor System, Sunbeam will receive control from the system and you can aim it with the mouse and fire using the left mouse button. This is enabled in the Modules tab.



    Changelog v34 (July 22):
    • All plugins: 0.24 Compatibility



    Last edited by Romfarer; Yesterday at 10:54. Reason: v34

  2. #2
    Friendly Neighborhood Mod sal_vager's Avatar
    Join Date
    Feb 2012
    Location
    England
    Posts
    9,345

    Re: Romfarer_LazorSystem

    This looks really good, I like that the beam can bounce off things, I was surprised by that

    I\'m looking forwards to seeing how this develops.

  3. #3
    Curious George Tosh's Avatar
    Join Date
    Nov 2011
    Location
    SPb, Russia
    Posts
    1,596
    Blog Entries
    1

    Re: Romfarer_LazorSystem

    Wow, beam reflections!
    Nice work so far.
    BTW what are you using for volumetric light? A group of LineRenderers?

  4. #4

    Re: Romfarer_LazorSystem

    Thanks, now i feel a lot better. ;D

    The beam reflection is the core of the current system. It was my plan to use this as a manual targeting system. When the beam reflects, you know you have hit something. Surely one can make things hit anything automatically but it is a game and i imagined a situation where maybe atmospheric ...err...SOMETHING...made the automatic targeting system not work so the player would have to switch to manual targeting, perhaps a half automated version of it, where the system sends out a lot of beams, like a sonar and locks on to things it hits.

    The 'volumetric light' is just line renderers. As i understand it Unity does not have a way to make volumetric light implemented in the system. I saw a unity add-on that claimed to have this implemented but it was a commercial add-on so i scrapped that method. I also looked into SunShafts, a unity pro feature, but i couldn\'t find it in the ksp resources. Maybe its possible to do with particles as well? Or a cone mesh with a gradient texture and transparent shader?

    Again i\'m really unsure about the whole light thing, but if i decide to use it i definately think the light needs a trail to keep track of where it is facing, when it\'s not hitting anything.


  5. #5

    Re: Romfarer_LazorSystem

    Wow, AWESOME LASER
    I have to do this.
    [spoiler][shadow=red,left][glow=red,2,300][size=72pt]IMA FIREN MAH LAZAR![/glow][/shadow][/spoiler]
    My Youtube
    http://www.youtube.com/user/cooly2000mmmdesk

    -Third Human, Third Kerbal, Third Lugia, Fully Insane-

  6. #6
    Curious George Tosh's Avatar
    Join Date
    Nov 2011
    Location
    SPb, Russia
    Posts
    1,596
    Blog Entries
    1

    Re: Romfarer_LazorSystem

    Quote Originally Posted by Romfarer View Post
    Maybe its possible to do with particles as well? Or a cone mesh with a gradient texture and transparent shader?
    I use a transparent procedural cylinder for laser beam. I\'m not very happy with its look as it cannot display a ray gradually fading at its sides. I\'m still not sure how to implement a good volumetric light effect; either with a hundred coaxial cylinders (and a nasty color banding) or with some custom particle system (built-in KSP particles do not suit).

    BTW if you wish your laser to detect water you can use something like
    Code:
    float groundHitDistance; // determine it with Physics.RayCast
    Vector3 myPosition, myDirection; // where are we and what are we looking at
    
    if( FlightGlobals.currentMainBody.ocean ) { // we have an ocean below
      Vector3 geeDir = FlightGlobals.getGeeForceAtPosition( pos ).normalized; // straight down
      float altitude = ( float ) FlightGlobals.getAltitudeAtPos( pos ); // altitude above sea level
      Plane p = new Plane( -geeDir, pos + altitude * geeDir ); // create a plane at sea level...
      Ray r = new Ray( myPosition, myDirection ); // ...and a ray to it.
      float L; // ray length 
      if( p.Raycast( r, out L ) && L <= groundHitDistance ) { // ground is below an ocean surface
        // do something about it
      }
    }

  7. #7

    Re: Romfarer_LazorSystem

    @Tosh I read somewhere, someone was using a gradient shader on a cone and the trick was they were rotating it to face the camera, so the more transparent areas of the cone would always be on the sides.

    So i take it water has no collider so i have to estimate where it is. Is there any lakes on Kerbin? Also, i can only detect water if it is the current main body? meaning my vessel is directly above it?

  8. #8
    Curious George Tosh's Avatar
    Join Date
    Nov 2011
    Location
    SPb, Russia
    Posts
    1,596
    Blog Entries
    1

    Re: Romfarer_LazorSystem

    Quote Originally Posted by Romfarer View Post
    @Tosh I read somewhere, someone was using a gradient shader on a cone and the trick was they were rotating it to face the camera...
    ...just as LineRenderer does.
    But using shaders could worth a try... I need to learn ShaderLab.

    Quote Originally Posted by Romfarer View Post
    So i take it water has no collider so i have to estimate where it is. Is there any lakes on Kerbin?
    Yep, no collider; parts must float in the water rather than stand on it.
    Lakes\'s surfaces are also at sea level.

    Quote Originally Posted by Romfarer View Post
    Also, i can only detect water if it is the current main body? meaning my vessel is directly above it?
    The body you are orbiting.
    UPDATE. Don\'t listen to me, I hardly know what am I talking about . With FlightGlobals.bodies[] you can check any of them. Though you rarely need to raycast water surface at Kerbin when you\'re orbiting the Mun ;D

  9. #9

    Re: Romfarer_LazorSystem

    Just to note; Lazor (;D) appears to be active even if it is off, and when I turned it off after use the window remained full size.

    Hope this helps.

  10. #10

    Re: Romfarer_LazorSystem

    Quote Originally Posted by RC1062 View Post
    Just to note; Lazor (;D) appears to be active even if it is off, and when I turned it off after use the window remained full size.

    Hope this helps.
    This is what happens when systems are not tested thoroughly before shipping. Thanks for the notice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •