Line of Sight Lighting

Discussion in 'Backers Lounge (Read-only)' started by b0073d, June 14, 2013.

  1. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Pathing is not cube map based, though it may look like it in the current debug view. It's actually based on an arbitrary polygon nav mesh. That's why units can traverse on the sides of mountains or inside cliffs when they bug out. :)

    And yes, it would be possible to use a cubemap heightmap as an optimization, except one of the specific reasons for using the tech we're using is it allows over and under areas which can't be represented with a height map.
  2. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Thats doesn't answer why you don't at least go with a system which respects the other factors which would limit vision in real live scenarios and other games, to be specific "visibility" of the target unit.

    The usage (or lack of) of LoS is only ONE of the concerns with the current system, although it is the only one which is problematic from the technical aspect.
  3. Ralith

    Ralith Member

    Messages:
    124
    Likes Received:
    6
    Oh wow, that's awesome! I thought all hope was lost for over/under areas and pathable nonconvex maps in general. I can't wait to see what sort of weirdass battlefields people come up with. Thanks for clarifying this! I'd really like to have LoS-based visibility and radar, but the tradeoff--if indeed a tradeoff it must be--makes sense.

    Now I really want to make a two-sided flat map with tunnels between the sides. Or a donut world!
    Last edited: June 18, 2013
  4. veta

    veta Active Member

    Messages:
    1,256
    Likes Received:
    11
    Yeah if we actually see over-under terrain people will flip.
  5. Ralith

    Ralith Member

    Messages:
    124
    Likes Received:
    6
    It occurs to me that to realize the full potential of nonconvex worlds--even within the constraints of the arc-ball style camera we have right now--the map editor will need a way to specify more or less arbitrary gravity vectors on the planetary surface, probably per-vertex. In the interest of usability, gravity vectors might default to along a ray from the center of the map, allowing sphere-ish worlds to Just work without tweaking. This would provide a flexible basis for correct behavior of ballistics and the ability to distinguish between "traversable ramp" and "cliff face" that works no matter what shape the world is.

    The pathing cost for a given point might then be proportional to the angle between the surface normal and the (barycentrically interpolated) gravity vector.
  6. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Gravity is rather simple, it's just yet another normal map. But thats not the point of this thread.

    There is still the issue, that using a fixed radius as line of sight is the worst possible implementation of LoS. The only thing worse would be global vision.
  7. veta

    veta Active Member

    Messages:
    1,256
    Likes Received:
    11
    It's not ideal. I like to use mountains to hide behind, not really possible if units can see through them.
  8. Ralith

    Ralith Member

    Messages:
    124
    Likes Received:
    6
    If you think integrating a "normal map" of gravity into a dynamics engine is "rather simple," you've got another thing coming.
  9. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    There are even worse problems with the current system.

    Like the fact that the placement of radar towers is really, really annoying.

    Leave only the slightest gap and your enemy can hide a whole city with airport etc. in it, but if they overlap you are essentially just wasting resources for building it and even more for maintaining.

    The system punishes you for inaccurate placing or over-provision, is unintuitive and incapable of differentiating (you can not see even the biggest building unless also see the smallest, stealthiest scouts) and requires artificial visualizations just to overcome these shortcomings.

    Having real LoS tests or not is a different thing, it is nice to have since it enables sneak attacks, but it's not necessarily required as it only gives you an distinctive advantage if you control units by hand and also just as long as your enemy has no access to satellites.


    Thats just what they did. Not finished yet (there are some bug), but every traversable part of the planet has a normal which shows how objects should align. It appears as if this normal map has the same resolution as the cost map for the flow field. So if they can map a flow field, they can do just the same for the gravity field.
    It's only slightly more complex for aircraft since aircraft could be affected my multiple, conflicting gravity vectors, depending on which surface the aircraft is following, but thats still rather easy.

    For dynamics you only use center of mass of whole bodies, of course. Besides, don't forget that the simulation is purely iterative. Integration happens over time, almost for free.
  10. plannihilator

    plannihilator Member

    Messages:
    55
    Likes Received:
    2
    This means that you could also potentially have bridges and tunnels without disrupting pathing... Could you set up a "portal" with a virtual mesh for pathing between two planets ?

    That would be one of first RTS game to do pathing in tunnels or portals without a dirty hack :ugeek:
  11. veta

    veta Active Member

    Messages:
    1,256
    Likes Received:
    11
    I think this is the idea on teleport structures, hopefully that makes the game.
  12. ninnamin

    ninnamin Member

    Messages:
    51
    Likes Received:
    1
    Could you make the Fog Of War in grayscale, instead of just darker? It would provide the day/night contrast while providing fog of war/line of sight contrast.

    For the record, I'm not just suggesting this because it was in TA.

    ...And I'm, what? the fourth person to suggest this? Maybe I should've read through the whole post first.
  13. b0073d

    b0073d New Member

    Messages:
    28
    Likes Received:
    0
    Hehehe yes about the fourth.


    My problem with gray is, what happens if you're playing on a gray surface? eg, the new moon biome?
  14. ninnamin

    ninnamin Member

    Messages:
    51
    Likes Received:
    1
    Maybe the moon is a more complex gray? With light tints of blue, perhaps; enough to distinguish between moon dust and the fog of war. TA did this as well; The moon maps had a slightly beige tint to them, I think.
  15. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    That still won't change the fact that it feels weird in PA.

    It only kind of worked in TA because you had real LoS tests blended in, so the shadowed areas did actually felt like plausible shadows. Also no fancy, directional lighting and (at least in campaign) not even a revealed map.

    It already felt kind of weird in SupCom, while it did partially work (mostly due to the lack of clearly directional lighting, the sun was always at the peak), it already lacked LoS tests and felt artificial. It also suffered from the hard borders which TA always managed to hide by use of those tattered borders.

    Trying to visualize vision this way just won't work, not with the chosen art style and not in combination with the other visual features.
  16. ninnamin

    ninnamin Member

    Messages:
    51
    Likes Received:
    1
    Well, we won't know for sure until someone actually tries it.

Share This Page