[discussion] Cliffs

Discussion in 'Planetary Annihilation General Discussion' started by aevs, January 16, 2014.

  1. vackillers

    vackillers Well-Known Member

    Messages:
    838
    Likes Received:
    360
    Interesting I didn't see that livestream and yeah it does have the pits... that looks way better than the flat surface they currently have, WAY better, i hope that gets changed... or at least add some customizability so we can create those terrains more easily in the system editor, more funtional stuff with the height slider. I just simply cannot believe they've DUMPED that look, it looks incredible that!!! THAT is how the lava planets should look with lava oceans in the mix as well like what we currently have.... OH MY i hope they bring that back......
  2. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    I'm aware that trees and the likes are not combined with the planet's mesh; using CSG for trees wouldn't make sense, especially if they are to be destructible. Subtraction brushes can't be used to generate cliffs along the contours of the terrain without being procedurally generated, and even then it would be quite limited (how do you define the area that is 'cut out' without cutting into geometry you don't want intersected? How do you avoid creating a non-solid mesh where a contour / shoreline features abrupt turns? How do you match the biome textures on the flat portion at the base of the cliff?)
    If the entire 'hole' in the ground is a predefined brush, then you end up with something like the early lava planet test in the august livestream, which is obviously not ideal and looks quite unnatural.
  3. pantsburgh

    pantsburgh Active Member

    Messages:
    151
    Likes Received:
    39
    Everything you bring up is either already solved or not difficult (in theory) to solve.

    TL:DR; it's not a terrain limitation, but like all features, it takes time to implement.

    Brushes don't need to perfectly match the contours of the terrain, because they are the contours of the terrain. I don't know what you mean by "geometry you don't want intersected"; all the brushes are air-tight and mesh cleanup is handled by the engine which, sans bugs, never results in a non-solid mesh. Cliff textures can be controlled by using certain brushes in certain biomes/planet types (already implemented). You wouldn't have one brush create the entire body of water - you'd shotgun down a bunch of overlapping brushes which results in a unique set of cliffs every time.

    The most difficult part would be tweaking the seed generator to place a bunch of these together roughly near water instead of homogeneously distributing them. For this reason, yes, it would work best on hand-made maps (what doesn't?). That's not a limitation of CSG, though; that's a limitation of the seed generation.

    The feature I think I'd add to my wish list which would help a lot here is to be able to specify an area of brushes to receive the same texture projection as the surrounding biome. This would allow the tops of addition brushes or bottoms of subtraction brushes to match the biome textures perfectly instead of relying on texture blending along the seam. This would open up a lot of possibilities related to cliffs, islands, and elevation changes in general.
    corteks and aevs like this.
  4. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    I really like your ideas and suggestions. If a series of square-ish subtractive brushes are used at different angles, it could simulate a cliff face in an interesting way, and I admit I hadn't thought of that. When I said 'geometry you don't want intersected', I was referring more or less to the top-right here (and similar cases):
    [​IMG]
    Top left demonstrates the effects of a subtractive brush to generate the cliff. It's okay, the flat part is a bit ugly, but if it could use the same texture projection as the surrounding biome like you mentioned, it would probably be fine. Some rubble around the bottom could probably smooth the transition, and these examples have more extreme slopes than would generally be found in a PA map.
    Top right is what might happen if the terrain featured a small drop where the subtractive brush is used, and may also happen if a cliff section is not positioned exactly along the terrain contour at the same height as an adjacent one (if they aren't at the same height, the base of the cliff will be at different heights all along the cliff's length, which would lead to a similar issue of numerous small drop-offs). Since the brush needs a definitive shape, and it can't really be generated to perfectly match terrain, this may be a problem. There may be a way to avoid it, but it's hard to know.
    Bottom left is what I would call an ideal cliff, where the terrain height on the lower part is modified and the only sharp edges are the bottom and top of the cliff. It's not really possible with CSG, but you're probably right that CSG could be adequately used to generated cliffs, even if they aren't 'perfect' :D
  5. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    I decided to make an example of 'shotgunning' a cliff into the contour of the terrain, since I don't know if the previous discussion gave a good idea to most people of what it might look like. This example is on planar terrain, but the same technique can be used with PA's terrain as well.
    (I decided to use sketchup for the example because it's very good for testing things like this)



    The small patch of terrain used had some pretty extreme verticality, so the flat portion at the bottom of the cliffs becomes quite noticeable; in PA, this probably won't be the case, but to have tall cliffs the brushes used will have to be quite a bit wider to compensate for the shallower inclines.
    The flat portion may also end up being rather ugly unless it can match the material of the surrounding terrain (similar to how some current brushes don't blend into the terrain).
    The flat area at the bottom will not be perfectly flat on a spherical map as brushes are rotated based on the planet's radius, which may actually be a good thing as it means weird edge cases for the subtractions are avoided.

    Edit: Added another image showing a higher cliff intersecting with a lower cliff, which is another useful application of this method.
    Last edited: March 5, 2014
    Paappa and cptconundrum like this.
  6. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    And yes this could work, and it's very close to what I'm envisioning trying.

    There are a few different things cooking on this front.
  7. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    This would also work.
  8. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    Cool. While I'm sceptical of that method, I'm sure whatever you guys decide to do will turn out nicely ;)
  9. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    It'll be interesting to see what ends up working for you guys.

    Mike
  10. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    So, today I finally took the time to figure out how to implement mods in PA.
    And of course, the first thing I did was try to recreate my earlier suggestion using the currently available terrain tools. The keyword there is try.

    Anyways, It went okay.



    There's no way to implement exactly what I suggested yet, and I still haven't been able to import custom brushes (I'm getting an error message when trying to use papatran), so I had make due with a less-than-optimal in-game brush. The end results are unfortunately very buggy, messy, slow to generate and overall not very good. At least the idea's there though :D
  11. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    Y'know I kind of want to hear more from the guy working on lava planets.
  12. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    That actually looks really good (minus a bit of the texturing). I would honestly not mind seeing cliffs like that ingame...
  13. aevs

    aevs Post Master General

    Messages:
    1,051
    Likes Received:
    1,150
    I did cherry pick for those screenshots though, and the planet load times were pretty long (23 seconds for a size 600 planet, which usually takes me less than half that time, probably only 4 or 5 seconds).
    I basically just made two biomes which took up very narrow height ranges and featured nothing but 1 subtractive brush, which I made extremely common in order to simulate a couple 'layers' of cliffs. This is obviously not ideal, but I think it shows some of the advantages of a subtractive method.

    The texture thing is something that bugs me about the in-game brushes too. I would love it if pantsburgh's suggestion for projecting the terrain's decals onto certain parts of brushes was implemented to deal with this.
    bradaz85 and emraldis like this.
  14. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    Well we knew PA already had the foundational level of the tools needed to tackle this sort of stuff. Still very neat to see it in practice even if limited by our current ability to mod.

    Mike
  15. mot9001

    mot9001 Well-Known Member

    Messages:
    833
    Likes Received:
    650
    Really cool Aevs i haven't seen those ones before.
  16. Devak

    Devak Post Master General

    Messages:
    1,713
    Likes Received:
    1,080
    well it looks good as a proof-of-concept!
  17. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    What error did papatran give you?

    inb4 it involves resource-root settings.
  18. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    This is some top tier stuff here. Do you get the cliffs procedurally or are they someone manually placed.
  19. vackillers

    vackillers Well-Known Member

    Messages:
    838
    Likes Received:
    360

    That is flipping awesome man!! thats exactly the kind of thing we have been talking about for months on here, very nice job even if it isn't quite optimized in the way it generates or anything, but that looks awesome dude... Would be nice to see just how it would look if you added some lava pools to that...
  20. pantsburgh

    pantsburgh Active Member

    Messages:
    151
    Likes Received:
    39
    Looks cool! My wish about receiving the surrounding texture projection in my post above stands; the texture seams there are kind of nasty. In that first screenshot, is that cliff edge created by one enlarged crater brush, or a string of brushes? The texture getting cut into strips like that is either a bug, or a perfect use case for my above texture wish.
    aevs likes this.

Share This Page