How to turn a few Numbers into Worlds (Fractal Perlin Noise)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ส.ค. 2022
  • Creating even a modest world for a video game is a huge undertaking. However, games like Minecraft, Factorio, Terraria, Valheim and many more serve up fresh worlds with the click of a button. How do they do this? In this video, you’ll learn the inner workings of one of the foundational pillars of procedural world generation: Perlin Noise.
    -
    Useful Links
    Code Behind Perlin Noise: rtouti.github.io/graphics/per...
    Understanding Perlin Noise: adrianb.io/2014/08/09/perlinn...
    A good glossary for terms related to nosie: libnoise.sourceforge.net/gloss...
    Dot Product resource: betterexplained.com/articles/...
    -
    Phew! This was a tough video to make. Since my last video, I’ve been very busy pounding in hundreds of hours of practice and study with Blender with the express purpose of making more educational math content. The problem is that my workflow is kind of nightmarish; hopping between Blender, After Effects, Premiere Pro, Audition, Photoshop and about half a dozen other pieces of software that act as supports for these is … complicated to say the least. While I’ve ironed out most of the kinks, the one big wrinkle that remains is figuring out how to more quickly integrate Blender renders into the process. But that being said, the only way to learn how is by doing, reflecting, planning and doing again.
    There were a lot of smaller topics I couldn’t go into with this video. Simplex noise was a big one on that list. However, late in production, I learned that it’s no longer copyrighted? I’m not sure. So, I may go into it at a later point if there’s interest.
    One thing I do want to make as a followup - and it would have much lower production value; more of a ‘livestream’ format that happened to get saved to video - is an explainer of how I built this thing. I don’t know if I’ve seen anyone use Geometry Nodes in Blender to make a from-scratch Perlin Noise generator. So, we’ll see. :)
    ---
    The Taylor Series aims help people love math. Whether you're a student in a math class or someone who has ever asked the question, "What was the big deal about Calculus?" there's something here for you.
    I am aiming to have one new video up every month. I hope you enjoy them!
    Also, I named this the Taylor Series after the mathematical construct created by James Gregory and formally introduced by Brook Taylor ... and I picked this one in particular because my name is Derrick Taylor. :)
    ---
    Patreon: / taylorseries
    Facebook: / thetaylorseries
    Twitter:@TheTaylorSeries
    ---
    -- Software Used:
    Windows 10
    OBS
    Unity
    Blender
    Adobe Premiere Pro
    Adobe After Effects
    Adobe Audition
    Adobe Lightroom
    TEdit
    Notepad++
    Google Drive (for script)
    Slade
    ---
    Games mentioned:
    Minecraft
    Factorio / Space Exploration mod
    Terraria
    Portal 2
    ---
    Websites shown in video
    Zalgo Text Generator: zalgo.org/
    Hacker Typer: hackertyper.net/
    Unity Asset Store's webpage assetstore.unity.com/
    ---
    Assets
    Piano for Unity gag: (CC0) free3d.com/3d-model/grand-pia...
    Drake for Unity gag: (owned) Irval the Wyvern assetstore.unity.com/packages...
    Sci Fi Base for Unity gag: (owned) Sci-Fi Facility assetstore.unity.com/packages...
    ---
    All Music is from Audioblocks

ความคิดเห็น • 215

  • @TheNextDecade244
    @TheNextDecade244 ปีที่แล้ว +25

    One useful thing that came out of the enormous flood of people making video game dev series on TH-cam. Eventually, over repetitions, you're going to find THAT ONE EXPLANATION that actually makes sense to you and finally grok basically any concept >>
    Thank you mate for making this video, I finally grokked how perlin noise works at the core.

  • @KohuGaly
    @KohuGaly ปีที่แล้ว +328

    Perhaps the only thing to point out here is that using a random number (sequence) generator is a rather bad idea for infinite worlds. A more common approach is to use hash function. The main property of hash function is that even a small change to an input produces unpredictable (chaotic) change to the output. In your case, the input would be a triplet of x and y coordinates and the seed.
    Advantages of hash functions over RNG:
    - outputs can be produced in arbitrary order (RNGs are limited to producing a sequence in order)
    - it's easier to implement a hash function with good statistical properties for any input and seed (it's nightmare to do so for RNG).
    - they can be much faster than RNGs (statistically decent hash function can be just a few arithmetic operations)
    Disdvantages of hash functions over RNG:
    - literally none (that you'd care about in procedural generation)

    • @Kronos_LordofTitans
      @Kronos_LordofTitans ปีที่แล้ว +8

      Plus it would make changing between numbers and strings as the input a lot easier, just treat both as a string and use the hash function for it.

    • @kylebowles9820
      @kylebowles9820 ปีที่แล้ว +7

      Check out low discrepancy sequences, the paper on R2 sequence captured my imagination. It gives you dials to control the noise and ensure it's well distributed over finite samples but still uniform globally. Perfect for anything from song shuffling to integral estimation in path tracing. The implementation is as fast as the cheapest hash function, it just uses magic numbers and modulo arithmetic.

    • @soveu8237
      @soveu8237 ปีที่แล้ว +5

      It depends, a pretty good pseudo-RNG can take just 10-20 cycles to generate a number and for example PCG is just 15 lines of code if I remember correctly.

    • @net28573
      @net28573 ปีที่แล้ว +3

      "Terraria 2 idea"
      -Red probably

    • @nonchip
      @nonchip ปีที่แล้ว +5

      speaking of things to point out about practical implementation: a lot of games/etc use other noise functions (like OpenSimplex Noise etc) than perlin, because the latter is still under patent protection and nobody wants to deal with "do i need to buy a license for this piece of math and if so, where". not that it's being enforced or anything really, but technically your lawyers might sleep better at night if your new billion dollar hit game doesn't use perlin :P

  • @logicalfundy
    @logicalfundy ปีที่แล้ว +194

    Computer Science stuff isn't quite what I expected from The Taylor Series - but that's fine. Also noticed that I missed some videos, the TH-cam algorithm hasn't really been recommending them to me? But then again, the TH-cam algorithm has never really been nice to having months between videos.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +43

      Yeah, the algorithm isn't usually very kind to me. Not sure why. :/

    • @AloisMahdal
      @AloisMahdal ปีที่แล้ว +28

      @@TheTaylorSeries Have you been consistent with the rituals? What about sacrifices? I'm sure there's a perfectly unreasonable explanation!

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +27

      @@AloisMahdal No matter how many calculators I put on the altar, it never seems to be enough. :(

    • @bojangles5232
      @bojangles5232 ปีที่แล้ว +1

      Then just subscribe

    • @_Cfocus
      @_Cfocus ปีที่แล้ว +1

      @@TheTaylorSeries it doesnt favor beneficial channels most of the time, it favors wasting time content

  • @BGBTech
    @BGBTech ปีที่แล้ว +39

    I had written a few Minecraft style engines before, but I did a few things a little differently for the noise functions (for the recent ones):
    For cases where one needs to map an X/Y coordinate to a linear number, Morton-Order is reasonably simple and effective.
    For the noise functions, I had typically used a hash value of the Morton-Order coordinates XOR'ed with a seed value (with each noise function having a seed generated from a "master seed" via a PRNG), then multiply by a large prime number and doing a right shift (so that one only has the high order bits).
    I usually didn't bother with dot products or blending multiple gradient maps or similar, rather generating random numbers at each grid point directly (via said hashing). Using angles and multiple sets of dot products and similar seems needlessly computationally expensive (also implies using floating point math rather than integers).
    I typically still used the LERP and S-curve mapping and similar though, along with blending multiple levels for the final result, ... Usually these would be done using fixed-point (integer) arithmetic.
    For 3D noise, the algorithm is similar, but differs mostly in that 4 inputs are needed (because 3-input Morton doesn't really work so well), so a 4th axis can be faked (generally by shifting and XOR'ing the the high bits X/Y axes or similar). Likewise, by bit-masking the axes, the functions can be made modular (useful for avoiding a seam in torus mapped worlds and similar).
    Exact arithmetic may need fiddling to get good looking results. Say, adding values rather than xor'ing them may result in repeating patterns along a diagonal axis. But, sometimes adding ot subtracting things may also have useful properties.
    Usually better to stay well away from divide or modulo though because these operators are rather slow.
    In this case, the end result of this can look pretty similar to Perlin Noise.
    It is also easily repeatable, and will always give the same values for the same input coordinates.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +12

      That's interesting -- I'm looking up Morton-Order now. And yeah, it sounds like you used value noise as the core, and then added on other sources of noise, which makes perfect sense. Thank you for the thoughtful breakdown!

  • @Schoko4craft
    @Schoko4craft ปีที่แล้ว +60

    I hope more game related math is part of your channel in the future :)

  • @asailijhijr
    @asailijhijr ปีที่แล้ว +13

    I know that Factorio _does_ use Perlin Noise, at least for its water/land map. I remember reading the term in a dev notes at some point.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +8

      Oh good! I feel like that I read it too in one of the FFFs, but when I went to read 'em, I couldn't find it.

  • @tastygold
    @tastygold ปีที่แล้ว +1

    THE BEST RESOURCE ON PERLIN NOISE IVE EVER FOUND. I FINALLY **ACTUALLY** UNDERSTAND IT

  • @perrer5434
    @perrer5434 ปีที่แล้ว +4

    Insane quality, instantly subbed. Loved the video and all the animations

  • @4.0.4
    @4.0.4 ปีที่แล้ว +15

    This video was SUPER well explained, and to my surprise you're not a huge channel I just didn't know about, so congrats! The editing and pacing was great - easier to follow than 3b1b even!

  • @danielfernandes1010
    @danielfernandes1010 ปีที่แล้ว +21

    Thank you! I've long been curious about perlin noise, this was a great explanation!

  • @abdallahshuaibu2641
    @abdallahshuaibu2641 ปีที่แล้ว

    Absolutely phenomenal explanation. I’ve been looking for an explanation on how maps were procedurally generated and this explained it perfectly. Just subbed. Would be nice seeing more game related videos on the channel

  • @khmer06
    @khmer06 ปีที่แล้ว

    Wow, this actually explains it in a surprisingly simple, easy to digest way. I know there's a lot more that goes into Perlin Noise and its many modifications then what was in this video, but it still helped me understand the basics REALLY well. Thank you so much for this!

  • @Theeoldmann
    @Theeoldmann 11 หลายเดือนก่อน +1

    This was masterfully done and help patch in some of the holes I had in understand perlin noise. Thank you, well done, and the TH-cam algorithm suggested your channel & videos earlier.

  • @cubeofcheese5574
    @cubeofcheese5574 ปีที่แล้ว +2

    I haven’t watched your channel before but I found the style of this video to be quite nice

  • @DilkielGaming
    @DilkielGaming ปีที่แล้ว

    Great video, your channel deserves more recognition.

  • @GracodanaAlpha
    @GracodanaAlpha ปีที่แล้ว +4

    Incredibly well produced video. Really engaging, interesting, and surprisingly funny too

  • @sB3rg
    @sB3rg ปีที่แล้ว

    This is highly polished! Amazing work! Respect.

  • @zsolezk
    @zsolezk 3 หลายเดือนก่อน

    I am trying to wrap my head around procedural generation for game production purposes and this was very helpful! Thank you!

  • @reinerbraun9995
    @reinerbraun9995 ปีที่แล้ว +1

    Your way of explaining things are very special

  • @vissengek
    @vissengek ปีที่แล้ว +1

    13:49 it's always nice to find an ore deposit of hope

  • @_M_i_C_a__
    @_M_i_C_a__ ปีที่แล้ว +2

    Great video! I'd love more explanations like this! Subbed ♡

  • @logicalfundy
    @logicalfundy ปีที่แล้ว +2

    Finished watching - great video! You did explain it well :).

  • @chadyonfire7878
    @chadyonfire7878 9 หลายเดือนก่อน

    amazing thank u so muchy , hope to see more computer graphics math related content from u , keep up the great work

  • @morgan0
    @morgan0 10 หลายเดือนก่อน +1

    7:24 in an open world game you wouldn’t use a serial generator, taking some continuous line of bits to make each chunk, you would instead combine the seed and coordinates in some way with whatever function, maybe over multiple calls of the function, whatever. that way you could teleport out 1000 chunks and could just generate what you needed instead of needing to run the prng millions of times

  • @naimneman4216
    @naimneman4216 ปีที่แล้ว +1

    thanks for making this video! I really enjoyed seeing the mathematical topics applied to computer science and games in general, I'm currently studying computer science so if you could keep going in this direction I would love to see more of your content.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      I will definitely keep that in mind :)

    • @naimneman4216
      @naimneman4216 ปีที่แล้ว

      @@TheTaylorSeries oh man thank you so much!!! Just don't push you very hard with the monthly update

  • @acrilly
    @acrilly ปีที่แล้ว

    hats off. amazing explanation.

  • @norielsylvire4097
    @norielsylvire4097 ปีที่แล้ว +1

    Thank you for making these videos!!! I am making mods for minetest and up until today I was just plopping random values into the lacunarity and persistence values and see what would come out, but now I can finally see what they do.
    It's really intuitive now to imagine the result. Thank you!!!
    Edit: I just made a prototype that generates worlds with biomes like in Factorio or Minecraft, and another one that generates different types of stars in an empty universe

  • @Vfulncchl
    @Vfulncchl ปีที่แล้ว

    Really well done video!!

  • @kolsark422
    @kolsark422 ปีที่แล้ว

    Loved the explanations, thx mate !

  • @George70220
    @George70220 ปีที่แล้ว +1

    this is one of the best educational videos I've ever seen

  • @johnchessant3012
    @johnchessant3012 ปีที่แล้ว +1

    great video!

  • @phy6geniuxYTcreations
    @phy6geniuxYTcreations ปีที่แล้ว

    You have earned a new subscriber by just mentioning Minecraft, Terraria, and my all time favorite: Factorio!

  • @logicalfundy
    @logicalfundy ปีที่แล้ว +4

    7:00 - This is unlikely what the largest procedurally generated worlds do, such as No Man's Sky or Minecraft. If you keep expanding what you generate as the player gets further from the center in the way described, you get exponential growth, which is impractical. There are a couple of approaches I can think of to avoid this:
    The first is to combine a coordinate system and the world seed with a hash function - in order to generate a sub-seed for each area encountered which is used for the procedural generation, or
    Generate VERY coarse octaves for the entire world / universe, then divide that up into chunks. In the chunk where the player is at, sub-divide that area into smaller chunks. This process can be hierarchical and be done a few times until the desired amount of detail is reached.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      You are quite right. :)

    • @Merthalophor
      @Merthalophor ปีที่แล้ว +1

      no exponential, still polynomial, otherwise agree.

  • @Napolegnom
    @Napolegnom ปีที่แล้ว +1

    Referencing Daytime EoL in an entertaining video about mathematics is the exact type of content I crave.

  • @gragogflying-anvil3605
    @gragogflying-anvil3605 ปีที่แล้ว

    That was a very good explanation. I feel like I could implementation it in code. That might be a fun task for the weekend.

  • @whitepolpot
    @whitepolpot ปีที่แล้ว

    you've rekindled my interest in maths and algorithms, thanks

  • @Hawk7886
    @Hawk7886 ปีที่แล้ว

    The 3d slice of 4d perlin noise was really awesome. What a totally bonkers concept to try to grasp.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      There's a 4D minecraft out there if you wanna really have your mind blown. :)

  • @carrotmaster8521
    @carrotmaster8521 ปีที่แล้ว

    Great video! now i know what the values im changing on the shader graph mean haha!

  • @whynotanyting
    @whynotanyting ปีที่แล้ว

    Thank you for going into the math. Too many videos go into the concepts and showing pretty pictures without actually giving any _seeds_ (hehe) of ideas on how to implement them.

  • @SpectralCollective
    @SpectralCollective ปีที่แล้ว

    Great stuff!

  • @rmbf57
    @rmbf57 ปีที่แล้ว

    Absolutely incredible animations.
    ☠️📈

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Thanks! I'm working on a random follow up video on how to do some of it in Blender. :)

  • @vansh2637
    @vansh2637 ปีที่แล้ว

    Amazing Vid!!

  • @lemickeyjames
    @lemickeyjames ปีที่แล้ว

    Interesting video! subbed

  • @graysoncroom
    @graysoncroom ปีที่แล้ว

    great video, thanks!

  • @RaphpowerSGSUModding
    @RaphpowerSGSUModding ปีที่แล้ว

    Perlin noise is a gift.
    Perlin noise my beloved.

  • @tutumassola
    @tutumassola ปีที่แล้ว +1

    came here from 3b1b and loved the vid! math well explained never fails to make me remember why i chose this graduation🖤 thanks for that

  • @zibinaht
    @zibinaht ปีที่แล้ว

    awesome video

  • @bettercalldelta
    @bettercalldelta ปีที่แล้ว +2

    This video was actually surprisingly useful for making procedural generation for a "game" I'm working on. Thank you

  • @cluelessblueberries
    @cluelessblueberries ปีที่แล้ว

    This is amazing Thank you very much

  • @SenkJu
    @SenkJu ปีที่แล้ว +1

    This video doesn't have the views it deserves. Incredibly high quality content.

  • @Merthalophor
    @Merthalophor ปีที่แล้ว +3

    very nice! it would be interesting to hear about why perlin noise is special... i see it everywhere, which probably means that it has some nice fundamental properties

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      It's true! Though, I have noticed that a lot of people use Simplex noise -- another Ken Perlin generator -- which has similar properties as well.

    • @DreadKyller
      @DreadKyller ปีที่แล้ว +2

      @@TheTaylorSeries The simplex noise is in basically all respects an improved Perlin noise, there are a few cases where conventional Perlin noise can be beneficial over it, but for the majority of cases Simplex noise is better, it's faster to generate, especially in higher dimensions, and doesn't suffer from many axis specific issues that Perlin noise often does (If you look closely you'll find most Perlin noise functions, (due in part to the smoothing between layers) tend to follow generally 45 degree angles, simplex noise doesn't have this issue. The problem is that Ken Perlin's specific simplex noise algorithm is currently licensed or something, but there is an implementation called OpenSimplexNoise that is widely used.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      @@DreadKyller It's true! -- except, I thought that license expired in Feb of this year? I remember that being a thing. Might be wrong tho.

    • @DreadKyller
      @DreadKyller ปีที่แล้ว

      @@TheTaylorSeries If that's true that's awesome, I never really looked into it lately as I just default to OSN anyways, but that's good to hear if so.

  • @norielsylvire4097
    @norielsylvire4097 ปีที่แล้ว

    I loved this video, thank you! It was very relaxing and informative in this format. Although I would attribute that more to your voice and video style than the absence of your face.

  • @stephaneduhamel7706
    @stephaneduhamel7706 ปีที่แล้ว

    Another faster algorithm often used is simple value noise, where a single value is given to each vertex, and this value is lerped for all the intermediary points. It's not as good as gradient noises, because you can still see the structure of the grid easily, but when it is used for fractal noise, it becomes harder to tell the difference.
    Also for higher dimensions, using another varient of gradient noise called "simplex noise" becomes much more efficient than both perlin noise and value noise, because it uses the lowest amount of vertices per cell possible, which means less "maps" to blend together.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Yeah, I've been reading about the simplex noise algorithm :) Considering doing a video on it too.

  • @deffdefying4803
    @deffdefying4803 ปีที่แล้ว +1

    Therapist: Rubber Yoda isn't real, he can't hurt you
    Rubber Yoda: 2:22

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Him and Garak, they're ... they're out there ....

  • @nativeantarctican3325
    @nativeantarctican3325 ปีที่แล้ว +5

    Great video! I’m curious, what editing software do you use, also how do you create your animations? Thank you in advance :)

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +9

      Hey thanks. :) So, I used Blender -- in particular, geometry nodes -- to make the Perlin Noise graphics. Then, after exporting the frames, I sequenced them in Premiere Pro and applied the animated text in After Effects. :)

  • @quasicode6954
    @quasicode6954 ปีที่แล้ว

    amazing!

  • @felixconrad9248
    @felixconrad9248 ปีที่แล้ว

    Great, period.

  • @jackjack3358
    @jackjack3358 ปีที่แล้ว

    Great video! I would expect you to give Minecraft's cave generation as 3D Perlin Noise example but well, I guess it's clear for everyone from the video

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      Yeah, I had to let people connect the dots on that one. :)

    • @xGOKOPx
      @xGOKOPx ปีที่แล้ว

      I think Minecraft's cave generation is slightly more complicated than that. Notice that it often produces long caves kind of like snakes. Perlin noise alone wouldn't give you that

  • @AuraAcorn
    @AuraAcorn ปีที่แล้ว

    This guy's explanation is so professional and in depth yet easy to understand, I'm surprised he only has as few subscribers as he does. Loved the video, keep up the great work!

  • @Greviouss
    @Greviouss ปีที่แล้ว +1

    I will now be adding a resource of type "Hopium" courtesy of the laugh i got @13:50

  • @elliejohnson2786
    @elliejohnson2786 ปีที่แล้ว

    This is extremely interesting. I've always wondered what the difference between gaussian noise and perlin noise are in programs like Substance Designer/Painter. Have you done a video on gaussian blur or other generic types of noise yet? I'd love to watch those.
    Also, super glad they taught us vectors and dot products in high school, I can actually follow the theory behind stuff like this and things like normal maps and surface normals.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      So, Gaussian noise is, as I'm to understand it, more of a variant of White Noise. If you imagine the distribution of values between 0 and 1, in White Noise, the probability of each value is flat -- but in Gaussian noise, the probability of each value is a gaussian curve. :)
      I haven't talked about it yet; I think the next one I'm going to do is Simplex noise. But! That seems like one that would be good to go into. I

  • @Sollace
    @Sollace ปีที่แล้ว

    2:22 Smooth Yoda does not exist, it cannot hurt you.
    Smooth Yoda:

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      Him and Smooth Garak, they haunt my dreams.

  • @mrbenjiboy9527
    @mrbenjiboy9527 ปีที่แล้ว +6

    I have always wondered how perlin noise was generated

  • @DrRawr76
    @DrRawr76 ปีที่แล้ว +2

    Omg smooth Yoda made me laugh!

  • @kozmobotgames
    @kozmobotgames ปีที่แล้ว

    I like this kind of videos. I also have a channel that makes games. I started with Blender tutorials, but now I will make some Unity tutorials.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Excellent!

    • @kozmobotgames
      @kozmobotgames ปีที่แล้ว +1

      @@TheTaylorSeries the latest video I made is a tutorial for 3D platformer.

  • @blackapex1279
    @blackapex1279 ปีที่แล้ว +1

    what a great video,
    can't believe it only has 25k views because it deserves way more

  • @hugog8551
    @hugog8551 ปีที่แล้ว

    thanks!

  • @bengoodwin2141
    @bengoodwin2141 ปีที่แล้ว

    The "Lerped surface line" before the thing where you ease between points looks almost exactly like what the surface shape of terraria worlds look like, before structures get added in. There's also a larger scale randomization of the altitude applied in addition to that.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Innnnteresting. I do need to peek in on that at some point.

    • @bengoodwin2141
      @bengoodwin2141 ปีที่แล้ว

      @@TheTaylorSeries There is a mod called World gen Preview or something like that, it shows the map as it is being made, and you can pause it at different steps. That might help you see how it works

  • @b0nce
    @b0nce ปีที่แล้ว

    You can also use just some noise + gaussian smoothing
    Or, similarly, noise + FFT + dropping high frequencies + IFFT

  • @brunojuarez5825
    @brunojuarez5825 หลายเดือนก่อน

    I don't know if anyone will be able to help me but I am a bit confused about the lerping part 11:15 since i noticed that the end of the red line segments always aligns with the start of the next yellow segments but I don't understand why they seem to align perfectly

  • @michaelwesten4624
    @michaelwesten4624 ปีที่แล้ว +1

    university flashbacks are coming back... make them stop, make the voices go away. no more vectors

  • @realtimberstalker
    @realtimberstalker ปีที่แล้ว

    The generating in a spiral part is not actually necessary. Heres what you would do.
    Basically every corner is always in the same spot, so we can give each one its own rng with a seed of its own position. Then we can just find which are the four corners of the point we are trying to find and then compute it. Because each corner has the same seed every time it runs, it will be consistent no matter how many times it is run.
    Now, there is a small issue here. Its too consistent. Every time you run the function it will be exactly the same, so in order to have different values, you use a random positional offset. Basically you’re looking at a different section of the randomness.

  • @synaestheziac
    @synaestheziac ปีที่แล้ว +1

    Smooth Yoda is real, he can hurt you

  • @H2COable
    @H2COable 4 หลายเดือนก่อน

    Hello! A while back, I stumbled upon an intriguing video where the creator analyzed the speakers' usage of filler words, I think the creator was in a conference and decided to count the frequency of these words. They applied mathematical techniques to the frequency of these words and concluded that it followed a Poisson distribution. I recall that Grant had some commentary on this. Does anyone happen to know which video I'm talking about?

  • @souleternum1732
    @souleternum1732 2 หลายเดือนก่อน +1

    Yeah, I was wondering why Terraria didn't have any coal in it... guess it's because every bit of it was shoveled into Red's Christmas stocking because of that daytime Empress fight.

  • @linguini8331
    @linguini8331 ปีที่แล้ว

    I'm surprised I understood something from this, still in an abstract kind of way since I don't code and know nothing lol, still nice.

  • @RonDLite
    @RonDLite ปีที่แล้ว

    I made a tower defense game called Toweron with 45+ levels, all levels are just based on a specific random seed for that level that will make the procedural generation predictable. Result under 1kb total for all levels

  • @kylebowles9820
    @kylebowles9820 ปีที่แล้ว +2

    If you're into procedural generation and haven't found the Demo Scene (computer graphics) you're in for a big treat!!! (Also look up FBM noise)
    11:25 You don't get curves ever from linear interpolation. I think your code was written (if at all) without the knowledge that it does linear interpolation on the driver level unless you use certain functions; you did bilinear interpolation without knowing it. That would explain the horizontal stripes as well.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      The "code" in this case is ... Geometry Nodes in Blender. I'm actually working on a video for it very soon. :)

  • @RealILOVEPIE
    @RealILOVEPIE ปีที่แล้ว

    Perlin noise was developed for the Disney movie Tron.

  • @rhyslikesthis416
    @rhyslikesthis416 ปีที่แล้ว

    This has done my little noggin in.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      That's only because your brain just got a little bit bigger :)

  • @Natenoged
    @Natenoged ปีที่แล้ว

    I love you.

  • @SP-ny1fk
    @SP-ny1fk ปีที่แล้ว

    Random decisions that still appear to be human decisions kind of sums up the human experience

  • @Veptis
    @Veptis ปีที่แล้ว

    So how do I make my noise seemless/cyclical ans how can I animate through the noise while keeping it tillable?

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      Well, hopefully the lerp/smooth stepping would make it seamless. To make it cyclical, you would have to have some mechanism to simply repeat, along the edges of your world map, the direction of the influence vectors. Or, as one commenter mentioned (which means I haven't tried it but think it's an extremely clever idea), you could create 3D perlin noise, intersect it with a cylinder, and then map from the cylinder to the terrain. That would get you just one axis of repitition tho. Maybe do that two times -- one for x and one for y -- and average between them? :)
      Sorry this wasn't a super well thought out answer; I haven't tried this. But I hope that helps!

  • @floppa7534
    @floppa7534 ปีที่แล้ว

    hey man im using this for a maths project is there any way in which i can give credits in a formal way? (APA style) can I even use this info?

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Sure! I'm Derrick Taylor, the publishing date was August 15th 2022, and the channel name is The Taylor Series. Here's a link to make a citation with it: www.scribbr.com/apa-examples/youtube/
      Thanks, and I really hope it helps with your project! What is it, by the by?

  • @solodevinc
    @solodevinc ปีที่แล้ว +1

    MY HEAD HURTS

  • @LeReubzRic
    @LeReubzRic ปีที่แล้ว

    I used perlin noise in GIMP to make an ARG-style photo

  • @gaelonhays1712
    @gaelonhays1712 ปีที่แล้ว +1

    Came here from 3B1B, and admittedly have only enough knowledge and brainspace to roughly understand the process and find it cool, as with most things. Nevertheless, it's an amazing video, and I've wondered how Terraria does its worlds forever. By the way, at 14:40, was that crystal thing a sentry? What's it called?

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      Glad you liked it! :) And hahaha, I had to look it up cuz I had forgotten; it is a sentry, as you say. The item is the Rainbow Crystal Staff, dropped by the Moon Lord. :)

    • @gaelonhays1712
      @gaelonhays1712 ปีที่แล้ว

      @@TheTaylorSeries Ah. I've wondered what that does, but never gotten it.

  • @aspielm759
    @aspielm759 ปีที่แล้ว

    11:20 oh so that's how lerping works. I always assumed they'd just take all 4 maps add them together and then divide by 4

  • @joeedh
    @joeedh ปีที่แล้ว

    Btw, we usually don't use the word "lerp" outside of code. It's just linear interpolation.

    • @joeedh
      @joeedh ปีที่แล้ว

      And of course smooth step is not linear. It's fitting a polynomial with zeroed out derivatives; the common form has the first derivative zeroed, but you can derive forms with higher derivatives zero too.

  • @CHKNSkratch
    @CHKNSkratch ปีที่แล้ว +1

    I'm not an expert nor do I know much about this but I think terraria might use perlin noise to determine what is a block and what is air, and then some type of cell noise to determine ore patches and whatnot.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      I could definitely believe that. Someday, I wanna make a chaotic world spawning mod for it. :)

  • @mariatakayama
    @mariatakayama 4 วันที่ผ่านมา

    why choose 6x^5-15x^4+10x^3? Are there more?

  • @zmike9831
    @zmike9831 ปีที่แล้ว

    i feel some of this could be explained a little clearer, first time i learned about the lerp function i used it 1 or 2 times and had it down.

  • @lacryman5541
    @lacryman5541 ปีที่แล้ว

    So you can generate a periodic world if you pick up the numbers for each corner in a random number but with a periodicity.
    Then you can use such a world generation to make a donut world: flat, finite, but with no border.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      Yes! There are probably some really cool game design ideas tucked away inside of your insight.

    • @xGOKOPx
      @xGOKOPx ปีที่แล้ว

      It would likely be more practical to somehow map the edges to each other; keeping track of stuff happening on the map would probably be more complicated

  • @VextexFux
    @VextexFux ปีที่แล้ว

    If you use 3D Perlin Noise and make your 2D map a cylinder in 3D, you can repeat the end of your map left and right

  • @Dent42
    @Dent42 2 หลายเดือนก่อน

    11:00 You talk about lerping, which is linear interpolation, but then you demonstrate bilinear interpolation
    12:00 "Smootherstep" is not smoother than smoothstep except that it has more continuous derivatives. Smoothstep is quick and cheap, EaseInOutSine is smoother but slower (unless you use LUTs), and EaseInOutExp is "infinitely smooth", insofar as all of its derivatives are continuous.

  • @uli9643
    @uli9643 ปีที่แล้ว +1

    I don't understand why the vector method and all the associated smoothing is necessary to generate the result shown. Sure, once you have the reproducible pseudo-random field of numbers (or vectors) from RNG or hash, there are countless methods to interpolate a much finer and continuously differentiable pixel mesh over these points ... the presented vector method, shape functions (known from FEM), etc.
    But in my opinion, the easiest way would be to use a simple linear interpolation with a downstream moving average filter or a cubic interpolation. I have tried it, the result looks qualitatively the same and the method seems to me mathematically much simpler. What is the advantage of the vector method?

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      I don't know much about comparative methods. I do know that Simplex noise (I'm considering it for my next vid :) ) has some sort of advantage over Perlin Noise, but beyond that -- it depends on the look you're going for. So, if you can get something you can use and tune to get the result you want, go for it. :)

  • @LMR__1
    @LMR__1 ปีที่แล้ว

    I heard somewhere that Minecraft uses a value of 1 and 2 decibel to determine the high and low points of a world, though i don't recall if that's fact or not.

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว

      There's actually a super good video on how minecraft does it exactly! I wish I could find the link, but it's on TH-cam ... somewhere. :)

    • @LMR__1
      @LMR__1 ปีที่แล้ว +1

      @@TheTaylorSeries yeah I believe it was an antvenom video, he usually goes in to the nitty gritty on how Minecraft works.

  • @DaCubeKing
    @DaCubeKing ปีที่แล้ว +1

    Here’s a talk from one of the Minecraft developers about how they implemented terrain generation: th-cam.com/video/ob3VwY4JyzE/w-d-xo.html

    • @TheTaylorSeries
      @TheTaylorSeries  ปีที่แล้ว +1

      Oh wow. I'll watch that in a bit :)

    • @DaCubeKing
      @DaCubeKing ปีที่แล้ว

      @@TheTaylorSeries yeah it’s great. He’s the guy that redid the terrain generation for the 1.18 update.

  • @howhistorycouldhavehappene437
    @howhistorycouldhavehappene437 ปีที่แล้ว

    A few quirks, but otherwise, fantastic!

  • @HamguyBacon
    @HamguyBacon ปีที่แล้ว

    Why not allow the vectors to understand what its location and orientation is on all 4 neighboring sides and smoothly connect to it.
    You can add a looseness factor on how stiff or random the orientation can be.