A procgen weekend project in Blender and geometry nodes. The idea was to start from a simple painted map -as simple and childlike- as possible, and let the computer do the rest.

Some images of the process :

Extract map contours

Separate seafloor from land

Look at the distance to shore

Filter it some

A voronoi for the rocks

Masked so they only appear near the shore

Roughly the same approach for the seafloor

A couple materials, water surface, Nishita sky

Cheers !

  • HadriscusOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    Ah nice swiggle. It creates vortices in input coordinates or something to that effect ?

    If you’re finding gradients does that mean you compute surface derivatives or do you “just” look at neighbouring points ? I can’t figure that out in geonodes yet, supposedly that’s something a shader is better suited for (and more performant). But I don’t know the first thing about OSL and stuff.

    Wrt erosion, in Blender there’s a framework in place for making solvers (simulation zone). But you still have to write the actual solver… and I have to say I totally overlooked deposition last time I worked on it… and “worked” is a big word 😉

    • Troy@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 months ago

      Yeah, swiggle is pretty much exactly that. The coordinates, amplitudes, and radius are randomized (based on the map seed, so it is reproducible). It makes a good distortion on top of things like mountain range positions. You don’t see the swirls in practice.

      Yeah, I mathematically compute a gradient vector. Which is actually one of the very easy things to do in python. I then bias Voronoi cell centre point density based on the amplitude of the local gradient.

      The same gradient calculations would be used in a real erosion/deposition model. Where the gradient is high, erode. Move those particles down gradient. Deposit particles where gradient is less steep. Repeat a thousand times. Marvel at emergent phenomenon like river valleys and deltas. It’s the “repeat a thousand times” that python really struggles with. It’s fine to run it once and wait. But I don’t want it to be days of modeling per map :)