Masks, Shapes, and Stamps; Please Help!

Discussion in 'Planets & Playfields' started by Dreuseff, May 20, 2020.

  1. Dreuseff

    Dreuseff Lieutenant

    Joined:
    Jan 13, 2017
    Messages:
    38
    Likes Received:
    51
    Unlike much of the human-readable stuff in the playfield files, I can't quite grasp what is going on here.
    • What do they do?
    • What are their implications on biomes and POIs?
    • How do they "play nice" with each other?
    Also, any suggestions on how I might configure a simplistic playfield so that I can experience their basic form?

    Lastly, if these are already described somewhere on the forums and I missed them then please feel free to chastise me (and kindly post a link).

    Thanks to all you fine folk!
     
    #1
    ravien_ff likes this.
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,359
    Likes Received:
    13,407
    Masks are used for determining humidity and temperature. You can open them up in the default config folder using any image viewer and see what kind of pattern they will create.

    For example, some will cause one side of the planet to be hotter than the other side. Temperate planets are a good example of this being used where you'll notice most of the desert and hot/dry biomes may be on one side of the planet.
    They are optional, and not using them will cause more randomized biome placement usually.

    Stamps are terrain shapes that are applied to the terrain. Mountains for example are a stamp. So are craters, and most other terrain features. You can also view them in the stamps folder to see what they'll look like.

    Go through the TemperateStarter and ExamplePlanet playfield files and you'll get some examples of how stamps can be used.
     
    #2
    Fenra369, Dreuseff and Needleship like this.
  3. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    1,083
    Likes Received:
    1,858
    Groundshapes are an unique class of 'stamps'. Unmodded, you only have a handful as option.

    - Placed first
    - Usually very large stamps
    - Fixed number, tied to planetsize (Class 1/ Small planet: 1 Groundshape. Class 2 / Medium planet: 2 Groundshapes...)
    - Will place in water
    - IIRC shape will be added to terrain curvature, only. (A hill groundshape over a base terrain valley will create a plain.)
     
    #3
    Dreuseff and ravien_ff like this.
  4. Dreuseff

    Dreuseff Lieutenant

    Joined:
    Jan 13, 2017
    Messages:
    38
    Likes Received:
    51
    Thanks for the help! This is good insight from both of you. So this means I have some way of say differentiating between a sandy oasis and a swamp with a pond! Hurray!

    I have a few more questions...
    • How do I know what kind of values from "black" to "white" the image will generate?
    • I assume white is an increase, but is grey "no change" and black a decrease?
    • Will a stamp affect later biome placement? Like if I have a desert stamp place a plateau at height 50 that peaks at height 150 and I have a snow biome that places at height > 149, will I end up with a snowy plateau?
    • Can I make my own stamps & masks for a scenario? Do any known tools do this? (Or I guess I could revive my OpenCV skills from 2007.)
    • What do the fields in the "global mask" file do? (Y must be skyward, I guess that means Z is "latitude"?)
      • y_scale
      • yoffset
      • b-yoffset
      • inverted
      • smooth
      • operation
    Thanks again for your kind help!
     
    #4
    Fenra369 and ravien_ff like this.
  5. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    1,083
    Likes Received:
    1,858
    - Yes for yourself, and likely 'Not really' for others. :/ At the moment, people will have to download and install all stamp data manually for this to work.
    - You can make stamps with any program that can create grayscale pics. E.g. Gimp.
    A new stamp will need an entry in the .StampDatabase / .GlobalMaskDatabase /.GroundShapeDatabase.

    Stamps are heightmaps.
    The grayscale is a height difference. White is high, black is low.

    A 'y_scale' of 1 might be about 500m from black (0m) to white (500m)...? Smaller scaling: The stamp gets squished; higher means it's stretched in altitude.
    The yoffset defines at which height of the stamp's 'shape' it will be placed into any terrain.
    'b-yOffset' means how much other biomes will 'creep' into the stamp's shape, measured in meters height difference from base terrain.
    (You can place biomes e.g. with Global stamps, see below. bYoffset reduces that ' biome-by-stamp'.).
    Inverted: Will flip the heights. Black is high, white is low
    Smooth: Smoothes stamp (ingame), but reduces detail

    What the stamp does depends on the method how the stamp is being inserted in the base terrain.
    -> StampDatabase: At the right edge, under 'operation'
    max: Will be pressed from below, through the base terrain. E.g. most Mountains. byOffset is pointing up.
    min: Will be pressed from above, like cookie cutter, might influence other stamps. E.g. Craters, Rifts. byOffset is pointing down.
    add: Inserted in the terrain curvature, Up only (even the one that is generated by other stamps). E.g. Hills. byOffset is pointing up.
    sub: Inserted in the terrain curvature, Up and Down, again : Even the one that is generated by other stamps). E.g. certain Rifts, Craters. byOffset is pointing down.

    (Global masks and Groundshapes don't use all that functionality.)

    Yes for biome stamps, no for global stamps
    In that case only, if your snow biome is set to 'IgnoreForcedBiome: True' in the playfield.

    Difference between biome stamp and global stamp: In the playfield_dynamic:
    Global stamps use "StampTries". Will be (usually) placed anywhere on land, and carry their host biome with them to that place, overwriting (usually) any biome. -> "Mountains".
    Biome stamps draw their tries from a shared pool of "BiomeStampTries", and use the "StampProb" to define how much each biome draws.
    They will be placed 'only' inside their host biome, with (maybe) a bit of "edge bleeding". -> "Dunes" "rivers", "sinkholes"...
     
    #5
    ravien_ff and Dreuseff like this.
  6. Dreuseff

    Dreuseff Lieutenant

    Joined:
    Jan 13, 2017
    Messages:
    38
    Likes Received:
    51
    Awesome! I now feel confident that I can play with it and make it work. Thank you very much.
     
    #6

Share This Page