Sothattakesup a lotoftimeandenergytoeatallthetime.
There's a lotoffeedinggoingon, somyweek's airjustkindofinsane.
Butwherewe'rehere, we'rehappy.
We'redoingokay.
And I foundthatitslastweek I'd managedtofinallygetaroundtomaketryingtolivestream.
ItwasSaturday.
Thisweek's a littlebitearlier.
It's Fridayafternoon.
Whoknows?
Maybenextweek I'llbebacktoThursday, so a littlebitdifferent I'veneveractuallydonethisisnottoohappyaboutit.
Actually, I mightwanttochangeisthat I sit.
I alwaysstandwhen I livestream.
I liked a piecearound, movearound, jumparound, justhavethatenergyofstandingandit's kindoflikeitletsmeknowthat I amlivestreaming.
I amperformingin a wayfortheLifestreamrightnow I'm sitting.
So, um, I'm notsosureaboutthat.
Um, I know, but I'm justgonnasitfor a littlebit.
I alsoactually, it's lookingfine.
I have a secondarylight.
Ifyoulookatthis, there's pretty.
There's, like, a prettygood, decentshadowhere.
Have a newlightwhichiscomingfromthisside.
I have a newpolarizingfilteronmycamera, which I thinkishelpingwiththereflectioninmyglasses.
I reallywantedtoeliminatethereflectioninmyglasses, which I think I'vedone a prettydecentjobof.
I don't know.
I can't actuallytellyouwhat I'm lookingat.
Youcan't seemymonitoroverhere, but I dohaveanotherlight.
Thisdoesn't Thisistheemperor's newlighthere, butthis I have a lightthat I couldattachtohere.
I wasgonnaputitrighthereandtrytofillintheshadow.
But I'm notgonnaworryaboutthatrightnow.
I alsoneedtofigureoutaboutrecordingtwodiscsothat, ifanythingthat I dotodayasanyvaluewhatsoeverthat I couldthat I couldworkwithMacha, whoistheeditorforthecodingtrain, andputtogether a videothatwouldbeuploadedseparatelyafterwards.
Forexample, I'd liketotrytodo a codingchallengetoday.
Uh, Tetris, Um, let's justdolet's do a codingprojectthatis, like, totallymanageable.
Andlookattheseimages.
It's thatthatismanageable.
Thatwillgiveme a patternlikethis.
Thismightlooklike a lotoftheseLooklike a paranoidtestelation, Whichthere's Worleynoise, whichis a variationofwhichisthatitsnameforStevenWereley, Buttrulycellularnoise, whichcanbedependingonhowyouimplementit.
It's basically a you'regettingthisBriantestelation, whichisanothercoating.
GloriaPickleand I arereallyintothisnewalgorithmcalledWehrlinoise, and, uh, shesuggestedit, youknow, I thinkso.
Atleastknows, kindofpointedinthedirectionofworldlynoisewhen I waslookingintoherwebpagesand I thought, Let's programitasthefirstcodingchallengefromhome, I'vegot a newsetup.
Thingsareprobablygonnabe a littlebitwonky.
I'm justgonnagive I'm justgonnadomybest.
Honestly.
Like, if I'm recordingthisduring a livestream, I don't knowifthere's evergonnamakeittoeditvideo.
But I thinkmyfriendlittlefriendhere, GloriaPickle, she's gonnahelpmeout.
I'm goingThio, bestrongandgettocoatingsomethingbuiltlike a tank.
Thisone.
Okay, godownthere, girl.
Okay, Gobacktosleepandwe'regonnagetstarted.
UmWhatWhatisworldlynoise?
I'vegotOh, shoot.
Whathappened I hadsetupisallmessedup.
Oh, thisisthewrong, huh?
It's doingsowell.
Physical.
Thiswayback.
Comeon.
Whenever I movedanything, it's not.
I totallylikethewholethingisoutofwhackthisway.
Okay, good.
Okay.
Um, sowhatisworldlynoise?
First, let's justhave a discussionofwhatnoiseis.
And I wanttovisualizenoisein a twodimensionalcanvasin a windowon a computerandthewaythatindividualizednoisenoisebeinganotherwordforrandomnessisbysettingeverysinglepixelcolorof a twodimensionalwindowtosomepixeltosomecolor.
And I'lljustdopurenoisereadiness.
Gonnaopenupmyprocessingwindowhere, and I'm goingtoaddsetupand I'm goingtoadddraw.
I'm gonnamakethewindowsize 400 by 400 let's runthisand I'vegotmywindowoverhere.
Sowithoutworryingaboutoptimizingandrightnow, I'm justgonnastayin a desktopenvironmentprocessingbuiltontopofjava.
So I wassetupfunction.
So I have a setupfunctionupthere, whichgivememywindowsize 400 by 400 inthedrawloop, what I wanttodoisseteverysinglepixel, soeverysinglepixelinthewindowisgoingtohavean X Y location.
I cangenerateovereverysingleFickpixelwith a nestedfourloop.
I wantthingstobeexcess.
Sothis.
Sothisloopherelooksateverysingle X andeverysingle.
Why, thenwhat I wanttodoisseteverypixelatthatexit.
Mylocation.
Sopixelsindexsomethingto a randomvalue.
So I havetofigureoutthepixelsin a processingwindow.
Ourstore, thecolorsareallstoredinanarray, a onedimensionalarray.
So I needtoknowforanygiven X y, whatistheindexintothatarray?
Andthere's a niceformal I canusewheretheindexes x plus y timeswithwithitself.
Now, thisissomething I'vegoneovercountlesstimes, but I'm justgonnagooveritagain.
Thisparticularvideolet's saythat I havemywindowthathas 1234 That's fiveby 1234 It's fivebyfive.
Okay.
Andif I'm lookingoverhere, the x 0123 whichisrighthere.
Andthewhyis 01 whichisrightherenow, if I weretocountthepixelsindividually.
Sothe X valuethreeplusthewhyvalueonetimeshowmanypixelsareineachrow?
Fivegivesmeeight.
Thisistheformula, so I canapplythatformulainmycodehere X plus y timeswith, say, pixelsindexandrunthesketch.
I'm curiouswhat I'm missing.
A reallyimportantdetail.
Let's runit, Seewhathappensanyway.
Yeah, nopoint.
Yourexception.
Whydon't I get a nopointerexception?
Becausethepixelsdon't exist.
I mean, theydoexist.
I seethem.
They'rethey'rethey'repixels, buttheydon't existbecause I didn't knowtheyexist.
They'rethey'rethey'repixels.
That's what I said.
But I don't haveaccesstothembecausetheyhaven't unlockedthekeytotheminmemory.
Andthewaythat I dothatinprocessingisbycallingloadpixelsfunctionpixelswouldbe a pixelwouldbe a goodnamefor a dog.
Sorry, Pickle.
HernameisPickle, notpixellikecolor.
Pixelis a namepixel.
Hi, Bixel.
UpdatePixels.
I alsohavetosayupdatepixelsonce I'vedonewiththepixels.
Therewego.
Sonow I havenoise.
Thisisnotwhirlynoise.
Don't bemisledbythetitleofthewindow.
I haven't implementedWehrlinoise.
Thisispurenoise.
Randomness.
Now I justwanttohaveitrunonce.
So I'm gonnaaddnoloophere.
Sodrawhappensonceand I justget a randomsetofpixels.
LoadPickles.
Look!
Allright, Sowhat I'veimplementedsofarisnoise.
Buttherearelotsofotherkindsofnoise.
I probablyhaven't least 10 videosonsomethingcalledPerlanoiseand a lotofpeopleareyouisthatmyvideosthatarecalledPerlanoiseisactuallynotreallyPerlinnoise.
Theonlyalgorithmispickrandombrightnessvaluebetweenzeroand 2 55 Buteachoneofthesehas a differentkindoftwistonthatwithPearlannoys, Theideaisreallytocreate a smoothnoise, andyougetthesenicetexturesandappearlikecloudsormarble, andyoucoulddo a lotwiththem.
So I wouldloveinmylifetoimplementeverykindofnoisethateverexisted.
I'vedonesomeofthesedifferentvideos.
I implementedthem, but I madeuseofthem.
Butinthisvideo, wearegoingtodoworldlynoise.
Anothernameforthatiscellularnoise.
Okay, wereLeeNoisewasinhisnameforStevenWereleyin 1996 andthere's thisactualpaper, a cellulartexturebasisfunction.
So I encourageyoutopossesvideonowandenjoyreadingthispaper I wouldlovetodo a dramaticreadingofitforyou, but I'm notgoingtoatthemoment, I'm justgonnasticktosomethingvery, verybasichere, whichisjustfollowingwhatliterallywritten.
Butnowthatthosepointshavebeendistributed, thecolorforthisparticularpixelisspecifically a functionofthefirstclosestpointsecondclosepointorthethirdclosest.
Itlooks a littlebitstrange, mostlybecauseofMaxsaid I'm notupset.
Upset.
Good.
Yeah.
I'm gonnaworryaboutthememorystuffin a bit, butthisisthisisthisisgoodenough, right?
now, sothishas a kindofstrange, almostsphericallikequalitytoit.
It's because I startedwiththisthree D spaceandonceagainletmeletmeLet's goback!
And, uh, let's justhavethree d seedfeaturepointsto D features.
Soif I getridofthe Z pointnow I haveyoucanseethislooksmuchmorelike a veroneoitestelationBecauseliterallywhatwehaveiseverypointiscoloredaccordingtoitsclosesttotheclosestpointwehave.
Thislooksexactlyofrunawaytestelationisthedefinitionof a Veronatest.
Elationiscellswherecellsthataredividedbythedividingline, whereallthepointsinthecellareclosestto a particularseedpointerfeaturepoint.
Yougetthesekindoflikeblowinglittlespots, andwhat's interestingaboutthisisrightnowand I don't know.
I don't knowwhattheframerateishere.
Let's let's takeoffnoloop.
Andlet's, uh, let's letmejustprinttheframerightoutfor a secondjusttosee.
Am I evengoingtopossiblyget a reasonableanimationhere?
I'm kindofrunning.
Youcan't seethisbecause I'm coveringit, but I'm runningitlikefiveframespersecond, whichisterrible.
Let's goback.
Let's godownto, like 400 by 400 just 25 seedpoints.
There's lotsofthingswecoulddotooptimizethison.
I'vegot 30 framesfor a secondbecausewhat I wanttodonowthat I thinkwillbefuntolookatiswhathappensif I gothroughandlookatdothissameloopwhere I lookatallthepointsandmovethemaroundrandomly.