top | item 43298014

(no title)

ianthehenry | 11 months ago

If this kinda thing piqued your interest and you want to play around with this idea, paste the following code into https://bauble.studio/:

    (def octaves 4)
    (def lacunarity 2.00)
    (def persistence 0.50)
    (def period 100)
    (def height 40)
    (plane y (fbm octaves :f lacunarity :gain persistence perlin p.xz period * height)
    # try s/color/shade on the line below
    | color (ss p.y -20 0 blue (ss p.y 0 20 green white))
    | slow (20 / height)
    | intersect (sphere 200))
(Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun!

Also while this uses 2D perlin noise -- you're just changing the height of a plane -- you can create some pretty detailed neat "rocky" terrain effects by using 3D perlin noise instead. Change "p.xz" to "p.xyz" to see what that looks like.

discuss

order

No comments yet.