Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

DEV 162 Camera Ray Cast - What can be done with this?

Discussion in 'General' started by kcjunkbox, Nov 17, 2016.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. kcjunkbox Senior Engineer

    Messages:
    1,131
    I'm not a programmer or a modder but this new feature peaked my interest because in my simple mind it seems that scripters can now create sensors with cameras. Is this correct? Space travel with out sensors is pretty stupid so this excites me. What type of things can be done with this new feature?

    Edit: I'm asking people who actually know what they are talking about
     
    • Agree Agree x 1
  2. Malware Master Engineer

    Messages:
    9,663
    Everything from simple range finders to crude radars...

    Autolanders, obstacle avoidance...
     
    • Like Like x 1
    • Agree Agree x 1
  3. gothosan Junior Engineer

    Messages:
    723
    If I get it right then:
    A) sensors now kinda work the same way? I rekon they should still have 50 meter range in vanilla..
    B) there should a way to get a list of detacted items right?
     
  4. JoeTheDestroyer Junior Engineer

    Messages:
    573
    Wheeled vehicle landing control (align with ground so it lands nicely)
    Non-cheating homing missiles/drones (you will be able to lose them by ducking behind something)
    Long range communications without massive power requirements (maybe)
     
    • Agree Agree x 1
  5. Ronin1973 Master Engineer

    Messages:
    4,845
    Well, for the gifted.. someone could make a cruise missile capable of flying close to the ground and avoiding terrain.

    The homing missile is the most obvious with the range of sensor becoming smaller as the distance closes. This in turn will allow for faster returns and more frequent adjustments as the missile gets closer to the target.

    The camera will perform like a long range sensor, but also gives out range and angle distances so a relative location can be figured out.

    The next application would be automatic missile launcher barrages. If a target flies within 800 meters of your launcher array it can fire if the target is also within a certain angle. This could be applied to all weapons during strafing runs, etc.
     
  6. kcjunkbox Senior Engineer

    Messages:
    1,131
    Can they add this to the turrets so they don't just know where you are no matter what but have to find you by seeing you in their view?
     
  7. Malware Master Engineer

    Messages:
    9,663
    They don't need this to make that happen. But given how the sensors work restricting their "view" to a cone doesn't really make sense, does it...
     
  8. kcjunkbox Senior Engineer

    Messages:
    1,131
    Why else have them scanning around by moving the turret like they currently do? Also they can see you through other objects. Also sensors only have 50 meter range so maybe they are more sensitive but at 800 meters the turret should not be able to see you through other objects like sensors do at close range.
     
  9. Malware Master Engineer

    Messages:
    9,663
    If the motion they do is actually scanning then damn that's inefficient...

    On a side note, I always found that silly. I turn that off.

    Regardless of opinions, the raycast is not needed to get the turrets working as you want.
     
  10. Ronin1973 Master Engineer

    Messages:
    4,845
    @Malware Is the raycast function on capable of seeing what's unobstructed through its own grid? Or can the camera be placed somewhere protected and still use the raycast function (like behind an armored block)?
     
  11. Malware Master Engineer

    Messages:
    9,663
    I haven't tried, but I'm pretty sure it needs to be out in the open...
     
  12. Ronin1973 Master Engineer

    Messages:
    4,845
    I'm in stable and have the programming skills of a 9 year old to boot.

    If the camera needs to be out in the open it pretty much nullifies the camera as a guidance device against armed enemies. Cameras last a fraction of a second when the turrets get a-blazin'. Receding them can help protect them but narrows their visual range considerably. For PMW this probably isn't reasonable for large blocks as the width is 2.5x2.5 meters.

    I'd be a proponent of an up-armored gun camera block. But that's either a mod or a block that Keen will be resistant to make/incorporate into the vanilla scheme.

    The bottom line is that the existing camera is very fragile.
     
  13. kcjunkbox Senior Engineer

    Messages:
    1,131
    I agree it is inefficient but the way they have instant detection of targets now is unrealistic. Radars, assuming it uses radar, sweeps to locate targets then likely has a narrow beem targeting radar that then locks on and tracks. I don't even think our turrets have detector components in them or radio components so how are they detecting things? They don't detect, they just know because of cheaty code. I also turn off turret movement, it's anoying and probably takes up needed computing power. Plus after they shoot at something you know what direction they were shooting if you didn't see the shooting and can go locate loot. I get that raycast is not needed thank you.

    I've only seen one mod use this function for a range finder so far but it does not have instructions as to how to use it so I have no idea how to range find with it...I'm hoping modders are working on using this cool new feature right now.
     
  14. rexxar Senior Engineer

    Messages:
    1,531
    The word you're looking for is "balanced". The camera needs line of sight. Letting you bury the camera in the middle of your ship is nonsense and just makes the camera OP magic, which is precisely why we removed GFD.
     
    • Agree Agree x 2
  15. Acolyte Apprentice Engineer

    Messages:
    109
    I'm not sure, but I don't think the following are detected
    • Planets
    • Asteroids
    • Blocks (like a clump of armour blocks blown off a ship by a missile)
    • Missiles for that matter ;)
    • Bullets (pretty sure these aren't detected :p)
    • Inventory items (including clumps of ore, ingots and components)
    Only ships are detected, and I wonder what constitutes a ship - power ? power plant ?

    Please can someone confirm (or deny)
     
  16. Malware Master Engineer

    Messages:
    9,663
    Planets, asteroids and blocks are detected. Missiles, no idea but they move too fast anyway so it'd be pointless - you'd have to be really lucky to hit one of them with a beam. Same with bullets. Floating objects - no idea.
     
  17. Ronin1973 Master Engineer

    Messages:
    4,845
    GFD was never intended for vanilla access. I get that. But now a comparable ability is now balanced with one of the weakest blocks in the game. Being able to shut down the functionality with just one hit to the front of a ship I think is a little much of a swing in the other direction for the functionality.

    In my experience the camera block is 9 out of 10 the first one to be shot off.

    The ability to use the function is great. Let me state that and I appreciate the thought involved in finding a good solution that parallels the GFD function. But the camera block is easily destroyed and there's no vanilla alternative to the simple camera block. One scratch and it's gone. So a hardier vanilla version of the camera being available at a premium I think would edge the balance back just a hair without going back to an OP situation.
     
  18. Malware Master Engineer

    Messages:
    9,663
    @Ronin1973 and I think we need time to see just how powerful this feature is before increasing its power even further.
     
    • Agree Agree x 1
  19. Ronin1973 Master Engineer

    Messages:
    4,845

    Agreed. Just food for thought.
     
  20. rexxar Senior Engineer

    Messages:
    1,531
    Bullets cannot be detected, but everything else can. I tested everything except missiles because even I'm not that crazy
     
  21. Captain Broadstairs Apprentice Engineer

    Messages:
    469
    While burying the camera deep within a ship is I agree cheating, will the new system take into account glass windows? Because I feel placing the Camera behind a Window and or Vent block for protection which allows me to still use its camera feed is perfectly reasonable to also use the ray cast. Although I'll admit I don't know if its possible to distinguish between grid blocks in such a way as to make that distinction.

    My current working model is a MCLOS optical guidance system so it will still function as normal without the ray casting, it uses a camera behind a window vent to provide an element of concealment and protection from stray hits and knocks, but I was in the process of implementing a more sophisticated guidance script which I have held back on while waiting for the GFD function to be removed so I could evaluate the alternative. What I'd like to know is, will I be forced to remove the protective glass in order to take advantage of the Ray casting? If so I'll most likely go back to using the Armoured Camera Mod.
     
    • Agree Agree x 1
  22. Malware Master Engineer

    Messages:
    9,663
    It won't. A block is a block, and if it had to check the material of what it hits you add to the performance pressure again... Theoretically possible, I guess. But it doesn't do that now.
     
    Last edited: Nov 21, 2016
    • Informative Informative x 1
  23. kcjunkbox Senior Engineer

    Messages:
    1,131
    If you shoot at the camera block area, 2.5mx2.5m, but not the actual camera itself, 0.5mx0.5m, will the camera still be damaged? Since they added the bullet spread it should make the camera last a little longer if it has to actually hit the camera itself and not just the block area it occupies. I haven't played in combat for a while now so I have not tested this.

    I have tended not to put my cameras on the very outermost boundaries of my ships for this reason. Since turrets seem to shoot at the closest target, if you put the camara at the closest point to the enemy it gets hit first. However, if you mount them on something like a midship mast or bridge area and have the reast of the ship taking hits before it does then your cameras last longer.

    But the camera vulnerability is a problem. I would love to play without third person but cameras are so easily destroyed I'd be flying blind very quickly. I have also tried to have multiple backup cameras in each direction but being able to turn them on and off so I don't have to scroll through them all or as one gets destroyed having my hot button automatically switch to another camera in the same direction is impossible. Unless there is a way to do that with scripting, which I don't know. For example, if I'm viewing a foward camera and I have 4 of them, when one gets destroyed it switches to another until they are all gone. Is that possible?

    As i wrote above I had a good idea, make a heavy armour block with one side that looks like glass and place the camera's view point right there at the glass but actually have the camera model inside the block at the back of the block so you can have all the strength of the heavy armor block, have the view from right in front of the heavy armor block so the camera functions properly but have the camera look like it is actualy recessed in the block behind bullet proof glass. In the construction of the block make it so you have to damage a lot of the block before you destroy the cameras fuctionanlity. I'm sure a modder could make this up easy but making it vanilla would be best. You could make the blocks window side have a round window port to make it look like a ship port hole with rivits around it that the camera views through. I guess you would likely not be able to see the camera behind the glass so maybe it would not actually have to be modeled in there. Either way it I think it would be a kind of decorative block as well since it would add some detail to otherwise even armor walls outside the ship.

    Edit: https://www.google.com/search?q=ship+porthole&tbm=isch&tbs=rimg:Ce_1FDLc1SsmLIjiKEQiQOerxN7C7HvJEz5y2aa4kyKFFxnrPDF2HH7n9ujKKiWqvTJf2RZQ3Q1dRhxlx3L9qQLLXlSoSCYoRCJA56vE3EQDwmcTyhChrKhIJsLse8kTPnLYRBCw3HMEmt1AqEglpriTIoUXGehFAky9DlLfxtioSCc8MXYcfuf26ET9w20A1WYqZKhIJMoqJaq9Ml_1YRrNndlcTSzfAqEglFlDdDV1GHGRFu674jsKVFoSoSCXHcv2pAsteVEQqalaeh59hv&tbo=u#imgrc=s92psaq9LBydzM:

    An example of one that has a less square shape so you can hang it on a sensor mast:
    https://www.google.com/search?q=apache+helicopter&biw=1872&bih=963&tbm=isch&tbo=u&source=univ&sa=X&sqi=2&ved=0ahUKEwiu6-viqrrQAhUs64MKHYeDAlQQsAQIOw#imgrc=dXl7XpONEwqPoM:

    Or just use the round part of the laser antenna model as less square armored camera block that can hang or stick out.
     
    Last edited: Nov 21, 2016
    • Agree Agree x 1
  24. AceNepets Apprentice Engineer

    Messages:
    121
    What are the exact specs for how the Lidar works? I remember reading months ago that it was going to push some kind of timeout that was a function of scan range, but that it also guaranteed a hit on whatever the closest object was to that line of sight. Where is the datasheet/api/users guide?
     
  25. Arcturus Senior Engineer

    Messages:
    1,649
    One way to test missiles:

    [​IMG]

    RE: people who think cameras being fragile is a weakness:
    If the target is big enough to have point defense, is it going to be agile enough to pull off an evasive maneuver within the less than 6 seconds before the guided projectile hits? Remember that the camera feeds the programming block with time, position, and velocity of detection.
    If the target is small and agile (like a fighter), it is less likely to have point defenses.

    I am really looking forward to having a simple rangefinder that can also provide the target location's GPS coordinates.

    I noticed "Meteor" was a detected entity type. Perhaps someone could make a better meteor defense program that raycasts at the sun, and only shoots down threats (allowing misses to pass). We could check if the meteor velocity/position vector passes through the station's location. Not sure how hard it is to beam them - how wide is the physics object of a meteor?
     
    • Agree Agree x 1
  26. Captain Broadstairs Apprentice Engineer

    Messages:
    469
    For me personally its not cameras on missiles in an active radar homing style set up I'm concerned about, I don't use Active homing style designs anyway as I prefer a SARH syle design where the target tracking is handled by the ship not the missile and keep the missile component costs down, Its more to do with cameras mounted on combat drones, if those drones are going to need to use ray casting to detect targets, it feels too easy to blind the drone by simply scratching the camera with a stray hit rendering it useless.
     
  27. gothosan Junior Engineer

    Messages:
    723
    I assume modded cameras also have ray casting too right?
    There is a nice modded armored camera
     
  28. JoeTheDestroyer Junior Engineer

    Messages:
    573
    In the in-game programming sub-forum: New Camera Raycast and Sensor API (Update 01.162 DEV)

    In short, it charges 2km/sec which gets used up when you fire a ray cast (e.g., you can check a 10km ray every 5sec, or a 200m ray every 0.1sec). (Information about) the closest object that intersects the ray is returned. If nothing directly intersects the ray, nothing is returned.
     
  29. AceNepets Apprentice Engineer

    Messages:
    121
    I just read the link. I'm disappointed in the 2km/sec relationship; it does not seem like a fair or logical metric. It seems to me that the computational complexity of the raycast and the cost function assigned to using it should be matched.

    @rexxar What is the computational complexity of the raycast? As in, O(1), O(n), O(n*log(n)), O(n^2), etc?

    If, say, the raycast algorithm is O(n), then the current relationship is the correct polynomial degree, but could be much more generous, such as 200km/sec or better. With the GFD, I could scan out to 3000 km at 30 calls per second with the multiplayer server sim speed only dropping about 0.05 as a result. Briefly googling, it looks like raycasting is between O(1) and O(n), so the cost could be much more generous.

    Also: Will there be a way to detect players using the raycast? Such as if my ship is hit by a ray from 200 km away, can I have my camera return a struct immediately or on it's own next call which is the location of the distant camera? GFD was fun but also terrible unbalanced, there was no rock-paper-scissors relationship for the process of using it to detect distant grids. The current camera raycast suffers the same problem as it provides free information without any kind of risk.
     
  30. Arcturus Senior Engineer

    Messages:
    1,649
    @rexxar If the camera is left to "charge" for a long time, will it reach a maximum range? I don't recall seeing this mentioned anywhere.
     
Thread Status:
This last post in this thread was made more than 31 days old.