Perlin Noise in p5.js

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 มิ.ย. 2024
  • In this new multi-part Perlin Noise Tutorial, I show you what Perlin noise is and how it can be used in creative coding, more specifically with the p5.js library. In Part I.2 of this series, I introduce you to what Perlin noise is, how it's created and its history. Code: thecodingtrain.com/tracks/the...
    🎥 Next video: • Noise vs Random in p5.js
    🎥 All videos: • The Nature of Code 2
    References:
    🔗 noise(): p5js.org/reference/#/p5/noise
    Timestamps:
    0:00 Welcome!
    0:45 Random() and noise()
    1:14 Perlin noise
    2:00 Procedural textures
    5:04 Perlin noise values over time
    7:10 How is Perlin noise generated?
    8:05 Cosine interpolation
    9:36 Adding the octaves
    11:30 Thanks for watching!
    Editing by Mathieu Blanchette
    Animations by Jason Heglund
    Music from Epidemic Sound
    🚂 Website: thecodingtrain.com/
    👾 Share Your Creation! thecodingtrain.com/guides/pas...
    🚩 Suggest Topics: github.com/CodingTrain/Sugges...
    💡 GitHub: github.com/CodingTrain
    💬 Discord: thecodingtrain.com/discord
    ✪ Nebula: go.nebula.tv/codingtrain
    💖 Membership: th-cam.com/users/thecodingtrainjoin
    🛒 Store: standard.tv/codingtrain
    🖋️ Twitter: / thecodingtrain
    📸 Instagram: / the.coding.train
    🎥 Coding Challenges: • Coding Challenges
    🎥 Intro to Programming: • Start learning here!
    🔗 p5.js: p5js.org
    🔗 p5.js Web Editor: editor.p5js.org/
    🔗 Processing: processing.org
    📄 Code of Conduct: github.com/CodingTrain/Code-o...
    This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
    #forbeginners #javascript #p5js

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

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

    The fact that's someone with your knowledge and intellect would simply give us this knowledge with a smile an an incredible energy goes to show that the world is a good place.

    • @andresbriceno526
      @andresbriceno526 2 ปีที่แล้ว

      true

    • @raghavruns
      @raghavruns 2 ปีที่แล้ว

      @@andresbriceno526 very true

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

      Well, I think it's more the God who made the world that's good, the world itself is still a work in progress!

  • @sofiafranc
    @sofiafranc ปีที่แล้ว +14

    I just fell here, without any understanding about the subject, and I understood everything. Thank you so much, simplifying is one of the hardest things to do - you did it!

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

    "I'm dividing it by half", so, you're doubling it? Lol, much love for your videos. Getting into programming and finding your channel has me excited about brushing up on my math skills I haven't used in 10 years

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

    He's just so excited about Perlin noise, it's contagious. It's really sweet.

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

    Your knowledge and energy is off the scale! Loving this a lot, and looking forward to more!

  • @Jilinhall
    @Jilinhall 10 วันที่ผ่านมา

    this is actually such a smart way to generate a random but smooth-ish curve!

  • @CamilaHernandez-um6on
    @CamilaHernandez-um6on 7 ปีที่แล้ว +37

    I am very grateful and happy that these tutorials exist. I study arts and when I met Processing, I knew I had to use it as a tool for a work of art.
    thank you so much :)

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

    Dude I'm a game dev student at uni, always trying/looking for new languages to learn.
    I found your sfml videos soo helpful for my first year and somehow you're always popping back up whenever I try learning something new! its great since you're such an excellent teacher!
    Keep it up! really appreciate the hard work you're putting in

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

    Always grateful to see a great teacher explaining complicated things in so much more understandable ways

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

    You are one of the most energetic people I have seen in a while.

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

    I am addicted to your teaching style ♥️

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

    hahah dude, you're a genius with the sense of humour to boot! Love you videos!

  • @RaviYadav-nj8zh
    @RaviYadav-nj8zh 4 ปีที่แล้ว +1

    Man he is always so happy ❤️❤️

  • @thatrealguylogan
    @thatrealguylogan 2 ปีที่แล้ว

    wow, this video is great because of your personality and energy, it make the video less of just normal tutorial and more of a conversation and because of that it is very easy to learn and catch on to things, so thank you this helps a lot!!!

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

    Daniel is a true expert in explaining things.

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

    hey, i know im a bit late, but the way you explain it and manage to mix in the humor is really awesome
    thank you for the knowledge and the laughts i got from this vid

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

    wow, this idea is brilliant !
    Imagine you work on a movie and someone requests "random shapes". You think about it, make an algorithm as best as you can...and then win a huge prize, because you invented something so inovative

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

    when i discovered processing/cinder/OF I knew i had to use it for design, thanks for sharing your knowledge

  • @RedsBoneStuff
    @RedsBoneStuff 7 ปีที่แล้ว

    Thank you for doing something helpful for humanity. These tutorials really are the best.

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

    I watched the 2:30 hours version before this. You are awesome. Keep up the good work.

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

    Congrats to 1 million subs.

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

    Great series!
    With an awareness of how pedantic this is: if you divide by half, you double!

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

    Ok i am gonna say that:
    Providing this content for free is making you top 1% human, but your energy is at different level. Bless you 🫶🏽🫶🏽

  • @donatellobruno
    @donatellobruno 8 ปีที่แล้ว

    I love this. Thank you so much for all your videos Daniel!

  • @DevDungeon
    @DevDungeon 2 ปีที่แล้ว

    Beautiful explanation! I didn't realize it was so simple.

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

      its not lmao, he didn't explain the entire thing..

  • @fabianrohrhofer
    @fabianrohrhofer 2 ปีที่แล้ว

    simply love your style of beeing

  •  7 ปีที่แล้ว

    i love the tron movies, great video series dan!

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

    bro youre literally the best

  • @maddriven07
    @maddriven07 3 ปีที่แล้ว

    Man I love this guy!

  • @marinahurtado4808
    @marinahurtado4808 4 ปีที่แล้ว

    You have saved me from failing a german p5js course (i don't speak german)), thank you

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

    Very helpful and very fun! thanks!

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

    the world need to create x number of clones of you sir, x being total teachers required in the world

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

    thank you for making this information edible for my brain

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

      Glad to hear!

    • @lithampiyakhe2588
      @lithampiyakhe2588 5 ปีที่แล้ว

      LMAO dude.. Yeah.. This is exactly the sort of thing that would make my mind choke!!

  • @jorgeferreira6727
    @jorgeferreira6727 3 ปีที่แล้ว

    Something about this Perlin noise explanation made remember the Fourier Transform on periodic signals.

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

    wow, I created my own noise a few years ago when I was 12, and it's basically perlin noise.

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

    That tron from 1986 is amazing. every scene is like a painting.

    • @JavSusLar
      @JavSusLar 3 ปีที่แล้ว

      Actually 1982. Jeff Bridges is the main character!

  • @ChrispyByDefault
    @ChrispyByDefault 6 ปีที่แล้ว

    Great video!

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

    "I'm dividing it by half

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

    thank you sir for this tutorial .... i'm from india 🚩❤

  • @ankita-mishikar116
    @ankita-mishikar116 2 ปีที่แล้ว

    And how I seriously want him to do a perlin noise performance video is just hilarious

  • @AnkushSingh-hi6gj
    @AnkushSingh-hi6gj 8 ปีที่แล้ว +2

    Your videos are very informative. Thanks for making such awesome videos.

  • @PolyRocketMatt
    @PolyRocketMatt 6 ปีที่แล้ว

    Very helpful!!!

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

    "Perlin noise performance art"

  • @geckobra
    @geckobra 3 ปีที่แล้ว

    I heard about perlin noise when I was watching minecraft videos. It is very interesting to learn what it is :DD

  • @TheFishKing64
    @TheFishKing64 3 ปีที่แล้ว

    The start of the video was basically Dan saying how bad his art is while trying to draw stuff and i love it

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

    Your videos are amazing!!! You can show us art, science and programming.
    Thanks :)

  • @elperro38
    @elperro38 7 ปีที่แล้ว

    This channel is love

  • @jooyeonchoi7500
    @jooyeonchoi7500 7 ปีที่แล้ว

    I want you to be my lecturer, hands down you're the best!

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

    Wonderful 😊

  • @claudiussramos5228
    @claudiussramos5228 2 ปีที่แล้ว

    Amazing

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

    You should get a perlin noise digits book!

  • @Gapklm
    @Gapklm 2 ปีที่แล้ว

    I just get into this topic that I am start thinking I am superlate. Good to know this. Thank you I will sucscribe your video.

  • @Priya_dancelover
    @Priya_dancelover 2 ปีที่แล้ว

    You are awesome 😎

  • @CodingwithIndy
    @CodingwithIndy 4 ปีที่แล้ว

    master at work!! Informative and Enjoyable! How does he do it?!

  • @prestonchen2046
    @prestonchen2046 6 ปีที่แล้ว

    You are too cool!

  • @davypeterbraun
    @davypeterbraun 2 ปีที่แล้ว

    Love him

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

    6:14 I am looking forward to that, let me know when it comes out.

  • @erinweiss8172
    @erinweiss8172 2 ปีที่แล้ว

    he learned how to edit his videos! mazal tov!

  • @jos9573
    @jos9573 7 ปีที่แล้ว

    I love how you're pretty much doing what you mentioned at 6:14 nowadays with your million random digits book. :D

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

    9:28, nope, if you're dividing it by half then you're doubling it, but don't worry we get the point, great video

  • @terayu3166
    @terayu3166 3 ปีที่แล้ว

    But what's the reason that Perlin Noice is so important that you willing to make a bunch of videos around it? Or just for fun haha. And much thanks for all of those videos : ) their influences are propound. I built almost all of my p5 skill based on them!

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

    you rock

  • @cunty
    @cunty 3 ปีที่แล้ว

    been after an effect like the one at 0:22! any links on how to make one?

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

    just watched tron. the correct one.

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

    1:31 as a matter of fact, TRON wasn't even nominated in the Best Visual Effects category. Academy members considered they were cheating because they used computers. Clairevoyants...
    (Perlin received the Oscar in 1996 for the technical achievement, but the film never did)

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

    Do you work for the company that made Processing? You're on the home page

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

      Yes, although it's really just a small group of volunteers: processingfoundation.org/

  • @knodelcrafter6888
    @knodelcrafter6888 8 ปีที่แล้ว

    How many Open Series do we have

  • @MarinusMakesStuff
    @MarinusMakesStuff 4 ปีที่แล้ว

    I can't seem to find the video in which to make the work that is shown in the beginning. Could it be that it is missing?

    • @TheCodingTrain
      @TheCodingTrain  4 ปีที่แล้ว

      here you go! th-cam.com/video/BjoM9oKOAKY/w-d-xo.html

  • @bronxbassist
    @bronxbassist 2 ปีที่แล้ว

    still looking for the perlin noise performance art follow up video

  • @luisjoseprofesor
    @luisjoseprofesor 4 ปีที่แล้ว

    Would you have a video where you finally make the "hair like" piece you show at the beginning? I couldn't find that example on any of the 12 videos of this (great) video series. Thanks!

    • @TheCodingTrain
      @TheCodingTrain  4 ปีที่แล้ว

      Ah, sorry, I think this is what you are looking for? th-cam.com/video/BjoM9oKOAKY/w-d-xo.html

  • @wandeson3205
    @wandeson3205 5 ปีที่แล้ว

    A paper with explanation detailed about this for study this topic?

  • @jeremyholden9159
    @jeremyholden9159 2 ปีที่แล้ว

    ken Perlin revolutionized video games from his work on tron the movie. but did little to change tron the video game.

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

    You are describing fractal value noise (en.wikipedia.org/wiki/Value_noise). Perlin noise isn't fractal by default and is a variant of gradient noise, not value noise.

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

    Hi, I love watching your video's and I'm learing a lot.
    Could you publish your processing code for this? Thx!

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      It's on github now: github.com/CodingRainbow/Rainbow-Code

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

    "Halving" is the word you're looking for.

  • @danielf.7151
    @danielf.7151 7 ปีที่แล้ว +1

    I know I'm super late to the party, but the wuestion is bugging me: a while ago, I saw a video on value noise, and it was descirbed the same way. so, does that mean that perlin noise and value noise are the same?

    • @portalsrule1239
      @portalsrule1239 6 ปีที่แล้ว

      Super late to the super late. But I think this will answer your question.
      computergraphics.stackexchange.com/questions/3608/benefit-of-perlin-noise-over-value-noise/3609

    • @owengrimm1370
      @owengrimm1370 5 ปีที่แล้ว

      @@portalsrule1239 Super late to the super late to the super late, but hi!

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

      @@owengrimm1370 Does still late?

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

    Me gusta

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

    2 or 3 short videos... *looks at 14 video playlist in sidebar*
    Alright cool let's gooo!

  • @syedmuhammadaliraza3069
    @syedmuhammadaliraza3069 2 ปีที่แล้ว

    Sir can't it be created like
    Let x=1
    x=+(Maths.random()*2)-1
    //x adds no between -1 and +1

  • @clairek5894
    @clairek5894 2 ปีที่แล้ว

    09:20 Dan coins the term "halving", which crypto analysts borrow in "bitcoin halving"

  • @ThatGuyNamedBender
    @ThatGuyNamedBender 3 ปีที่แล้ว

    Does he have a Processing version of these tutorials?

    • @angelcaru
      @angelcaru 3 ปีที่แล้ว

      Yes! This is a remake of the original NOC, which was built on Processing, on p5.js.

  • @cap-advaith
    @cap-advaith 5 ปีที่แล้ว +1

    1234321234545676567............omg u are great at explaning things!!!!!

  • @simantakdabhade4770
    @simantakdabhade4770 8 ปีที่แล้ว

    is it is a more gradual random ?

    • @TheCodingTrain
      @TheCodingTrain  8 ปีที่แล้ว

      I would say a more "smooth" random.

  • @alexsindre2426
    @alexsindre2426 5 ปีที่แล้ว

    a tab on video on 0:03 is not clickable

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

    1D is a line.

  • @SaintPepsiSanCoca
    @SaintPepsiSanCoca 7 ปีที่แล้ว

  • @0_-
    @0_- 4 ปีที่แล้ว

    random.uniform(past - 0.25, past + 0.25)

  • @richardjamesbunker
    @richardjamesbunker 2 ปีที่แล้ว

    It's now 2021 and the question is do we have a Perlin Noise performance video yet? +1 from me please!!!

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

    Minecraft uses 3D perlin noise to generate its terrain

  • @BlueyMcPhluey
    @BlueyMcPhluey 2 ปีที่แล้ว

    9:22 "I'm halving that amplitude. I'm having it? I'm having it for lunch! -- I'm dividing it by half! Whatever!"
    x/(1/2) = 2x
    so... you're doubling it? 😂

  • @khanlakhno2757
    @khanlakhno2757 5 ปีที่แล้ว

    7:50 bookmark for me

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

    ahahahah I like how you graphed "random" it followed a very distinguishable pattern

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

      finbob08 he said it himself

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

    How is that one dimension?
    You have Time and the number Value/Range

    • @HISEROD
      @HISEROD 4 ปีที่แล้ว

      The noise algorithm has only 1 input; so, it is 1D noise. But, the graph of this noise is indeed 2D. Take the 2D distance function *distance(x, y) = √(x^2 + y^2)* for example. You wouldn't call it a 3D function, but an additional dimension is required to visualize it (2 for the inputs + 1 for the output).

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

      @@HISEROD I get it, thank you so much.

  • @sofiagarcia3581
    @sofiagarcia3581 8 ปีที่แล้ว

    LOL perlin noise performance art

  • @hargous
    @hargous 4 ปีที่แล้ว

    I don’t know how I got here, I just wanted some Persona 5.
    Well, it might be useful later for me.

  • @sergodobro2569
    @sergodobro2569 2 ปีที่แล้ว

    Isn't it just a fractal noise, not perlin? Video is still great and interasting to watch!

  • @pietrononame4945
    @pietrononame4945 2 ปีที่แล้ว

    Where is the Noise function in Android Java?

  • @Leo-lx6oo
    @Leo-lx6oo 4 ปีที่แล้ว +1

    11:01 when you realize acupuncture won't heal you

  • @wizwildworld2407
    @wizwildworld2407 2 ปีที่แล้ว

    end 11:32

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

    I like your videos. But what you explain in this video is not Perlin noise. It's value noise. Perlin noise uses gradients, and doesn't use cosine interpolation, but linear interpolation in combination with a fade function instead.