Option: Lightweight customizable planets

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    On some ice-planet segments:
    • Every segment has a ground-plate. Blocks which create the bottom of a planet.
    • Above this are surface blocks (snow, desert, grass) if there is no detail which overwrites them.
    I really like that. It is fast to load. Unfortunately there are always segments which are heavier. But I've got an idea:



    Lightweight planets:
    1. let planet cores have a lava texture in the centre of each face and the borders of each face have a transition into snow, desert, grass, rock, ocean, ...
    2. In the middle of each segment are chunks first going to a higher level (outer 5-10%) of about 0.7 chunks which fit to the border texture rendered on the core face.
    3. only a part (about 40%) should have > 1 chunk high.
    4. The terrain generator can do what it wants to do, but planets get flattened the closer to their border. 0 chunks @ 5%, linear climbing chunks 0..0.7 till 10%, up to 2 chunks height in 10..50%
      1. archived by just compressing vertically. Top blocks overwrite blocks below if levels get merged.




    Customize-options on planets (just skip details if you don't want to read. they are just examples):

    NOTE: This should be editable in configs. Generate custom planet types.


    1. Hills-segments:
    1. % of hill chunks compared to all chunks
    2. Min height in hill chunks
    3. Max height chunks
    Archived by shifting all blocks y blocks up and putting rock beneath them.



    2. Spawn veins, "floating islands", trees, ...
    1. % of eye-candy chunks compared to all chunks
    2. Min eye-candidness in eye-candy chunks
    3. Max eye-candidness in eye-candy chunks
    Plants require a low, tress a medium, veins a high, Floating islands (keep themselves 1 chunk above ground during generation) require a very high eye-candy level.
    All features require to be enabled in order to spawn.
    1. Most expensive (in eye-candidness) part spawns first, then less expensive ones
    2. then repeat most expensive to least expensive if there are still points left
    3. Skip parts which can't get paid
    4. Continue with next segment if the least expensive available is skipped

    Note: Each object can be made of primary, secondary, bottom and surface blocks.
    From another thread:

    This 2-component triangle or T or lattice gave me an idea: How about requiring molecules?
    Element A has to connect to x of X, y of Y, number z of Element Z
    Element B has to be next to A and x of X, y of Y, z of Z
    Element C has to be next to A [and maybe next to E] and x of X, y of Y, z of Z
    Element D has to be next to C and x of X, y of Y, z of Z
    Element E has to be next to A+C and x of X, y of Y, z of Z
    x|y|z of X|Y|Z can be something like [min: 0, max: 4 | exactly 2] of BLOCK-TYPE
    A and B can have the same block-ID, but can only have the "status" A or B if they fit the requirements of A or B.
    C can be a completely different block-ID

    EDIT:
    A, B, C are just example names, could also be Hydrogen, Oxygen or Rock, Grass, ...
    Or secondary, bot, surface.
    Fill blocks could require to be next to 6 of surface|bottom|primary
    Veins spawn as a 3D construct which is anchored at 2 or 3 points and are created after hills are. Example generation:
    1. prefer 2 points on previously spawned veins, if required rotate and move vein up to 1/2 or 2/3 chunks
    2. for each x,z in vine.connectionPoint[x,y]
      1. vine[x, z].height = segment.highestBlockAt[x, z] ((chunk = mid of vine))
    3. for all columns of the vine
      1. skip connection points
      2. vine[x, z] = relativeY + ((height(p1) * distance(p1) + height(p2) * distance(p2) + ...)) / #connectionPoints
      3. If two adjacent columns differ in heigh by >1, generate blocks for (difference-1)
    NOTE: With this system (1. spawn feature relative to chunk, 3. move adjacent, avoid collisions, rotate, 4. anchor it vertically, sync high of anchor spots, use highest or deform object) everything can be created very cpu-time inexpensive.



    3. Inject resources
    1. % of segments.
    2. min, max per segment.

    Spawn other structures (look at vines above and the NOTE) where you don't want resources injected.


    Does somebody want to share thoughts? :)
     
    Last edited:
    • Like
    Reactions: mrsinister
    Joined
    Aug 26, 2013
    Messages
    56
    Reaction score
    16
    You may have just gone over everyone's head, but from what I can see here it looks like you have come up with a way of generating planet chunks which is cheaper on the CPU/GPU while also making them easier to customize?

    or is it just to make it easy to customize planets?
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    It should be cheater to generate. But I dunno exactly how good the results will be without additional steps (random generators, ...)

    But this system would be extensible (spawn buildings fill it's basement with rock or sink terrain, or both (average))...
    There could also be subtracting objects like caves. areas of interaction with the surface would then be locked for other stuff.