Next question about nukes: Have you checked out the new effect in the PTE build?

Discussion in 'Planetary Annihilation General Discussion' started by metabolical, July 18, 2014.

  1. metabolical

    metabolical Uber Alumni

    Messages:
    312
    Likes Received:
    1,366
    Actually, I didn't realize I was on his account. I was on our casting machine and just posted a reply. And I didn't troll his account because that just starts a war where everybody loses.
    lokiCML, websterx01 and ArchieBuld like this.
  2. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    I didn't mean it literally, I was joking! :D
  3. ViolentMind

    ViolentMind Active Member

    Messages:
    394
    Likes Received:
    186
    Haha....pretty crazy...and only 46 mins to setup this time. I like how the color of the entire moon is changed due to the scarring from the explosions! It goes from a light gray to a dark charcoal grey.....pretty funny!
  4. davidwmiller

    davidwmiller New Member

    Messages:
    19
    Likes Received:
    11
    And on topic....

    Overall I love the new effect, but I would say that the rolling smoke effect of the mushroom cloud goes on for much too long.
  5. stonewood1612

    stonewood1612 Well-Known Member

    Messages:
    726
    Likes Received:
    417
    The one thing I always wanted from the KS video was the blurryness. Soft shadows, awesome AA and a little bit of DoF. If that was in PA, it would really feel a like that video, graphics wise.

    You just said that you can't do soft shadows.. that makes me sad :( Why? Is it far too slow to be worth implementing?
  6. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    Realtime soft shadows are an unsolved problem with modern 3d rasterizing graphics. The only time they are done is when they are prebaked or simply faked in a specific context.

    Technically SSAO is a form of soft shadowing for diffuse light, so there is that.
  7. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    Just wondering, is the planet smash explosion going to get a similar treatment to the nuke explosions, possibly soon™? Because if so, that would be awesome.
  8. stonewood1612

    stonewood1612 Well-Known Member

    Messages:
    726
    Likes Received:
    417
    Heh, I don't quite get that :p But I'm interested in understanding this.

    With faked/prebaked you mean that the shadows are pre-made, not simulated, and have pre-made animations on them?

    SSAO works because those shadows are fake and always in the same spot (not affected by directional light from the sun)?

    Let me think this through... hard shadows are projected on a pixelated raster, resolution affects how much you can see those pixels, with other words the quality.

    Soft shadows aren't projected on a raster and.... ?


    (edit: I looked this up and found a unity tutorial explaining it)

    I'm currently making a game with Unity, the free version doesn't have soft shadows... so I don't have any experience with them.
    Last edited: July 25, 2014
  9. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    There are a number of cheats and hacks to do shadows, but they're all cheats and hacks. Most of them do involve rendering the scene or each object from the point of view of the light and projecting that onto the surface.

    The way we do shadows isn't exactly hard, but it's not really soft. The light renders the entire scene into a depth map, then when rendering the light it does a lookup in light space to see if the pixel it's rendering is behind something that's in the light's depth texture. OpenGL helps by doing some interpolation when doing shadow depth checks, effectively doing bilinear sampling of the binary "in shadow" value so it's not just on or off.

    Now if you blur the depth map all you get is weirdly shaped still hard shadows, because you're not blurring an outline, your blurring the shape of the shadow depth. Shadows get bigger in the distance and smaller or disappear closer to the object casting them.

    Now what many games do is blur the results or do multiple samples of the shadow map offset from each other. Unity does multiple samples, basically at each point it does the binary shadow check from n number of locations offset at a random point within a range from the actual position and average these together. This means shadows are blurred by a constant amount irrelevant of the distance to the shadow caster or the size of the light casting the shadow. This gets expensive, and edges end up looking fairly noisy.

    A more accurate, but often worse looking method is to just render multiple shadows based on the size of the light. This gets accurate spread on shadows, but is even more expensive and can very easily just look like multiple lights casting hards shadows instead of one light casting a soft shadow. This is what pre-rendering systems often do, because for them they can just render 1000 shadows for a single light and it'll look fairly soft.

    Then there are a couple of methods that use two depth maps that are slightly different and blur them to find a best guess for the shadow falloff. This looks and works great and isn't that expensive, but fails really badly if there are multiple shadow casting objects in a row, which is always the case in PA.


    The most accurate way is to simply do ray tracing / path tracing and just shoot out a few million traces and see where they land. This is another technique popular in non-realtime applications, but it'll be a while before this is plausible to do in real time at acceptable quality.


    Also I should point out my original mention of soft shadows was in reference to shadows from semitransparent objects, like smoke. The common way to do this is to render out transparent objects into another texture with just their silhouettes and projecting this into the scene. The problem with this is you have no information about the depth where the shadow starts, just the final shape of the shadow. So you have to do guess work hacks so shadows from smoke don't project on objects in front of the smoke. Some games do a projection for each individual shadowing particle from the location of the particle (Battlefield 4 and Infamous: Second Son both do this), but that gets expensive very quickly.
    Last edited: July 24, 2014
  10. stonewood1612

    stonewood1612 Well-Known Member

    Messages:
    726
    Likes Received:
    417
    Thank you. My knowledge of shadows has successfully leveled up.
    websterx01 likes this.
  11. mazar83

    mazar83 Active Member

    Messages:
    118
    Likes Received:
    26
    I totally agree that the new nuke is awesome, but if I built hundreds or thousands of nukes, how could I achieve the coordinated strike shown in the video? Is there a nuke carpet bomb mod or something?
  12. websterx01

    websterx01 Post Master General

    Messages:
    1,682
    Likes Received:
    1,063
    Blargh!
    Last edited: July 30, 2014
  13. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    Area attack (select attack then click and drag) with the nukes selected.
    brianpurkiss likes this.
  14. mazar83

    mazar83 Active Member

    Messages:
    118
    Likes Received:
    26
    Awesome...that's good to know!
  15. temeter

    temeter Well-Known Member

    Messages:
    501
    Likes Received:
    305
    We have a function to automatically fire an unlimited number of nukes with a single klick. This game is amazing.

    And damn, they look so good. Definitly belongs to the coolest nukes i've seen in a game. And those aren't even the real game enders in PA.
  16. jpinard

    jpinard Member

    Messages:
    75
    Likes Received:
    22
    Is there a way to launch a whole bunch of nukes at several areas at the same time? It seems if I select all my nuke sites, then click attack all readied nukes go there instead of just 1. So if I wanted to carpet bomb an area, how might I accomplish this? Is there a "next nuclear Missile site" button?
  17. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    An Area attack command will do that for ya.
  18. Geers

    Geers Post Master General

    Messages:
    6,946
    Likes Received:
    6,820
    [​IMG]
    [​IMG]

Share This Page