PERLIN NOISE in Unity - Procedural Generation Tutorial

  Рет қаралды 264,723

Brackeys

Brackeys

Күн бұрын

Let's have a look at Perlin Noise in Unity.
More on procedural generation:
● Sebastian Lague: bit.ly/2qR3Y3P
● Catlike Coding: bit.ly/11pMR7O
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
► Join Discord: / discord
♥ Subscribe: bit.ly/1kMekJV
● Website: brackeys.com/
● Facebook: / brackeys
● Twitter: / brackeystweet
········································­­·······································­·­····
Edited by the lovely Sofibab.
········································­­·······································­·­····
► All content by Brackeys is 100% free. I believe that education should be available for everyone. Any support is truly appreciated so I can keep on making the content free of charge.
········································­­·······································­·­····
♪ Baby Plays Electro Games
teknoaxe.com/cgi-bin/link_code...

Пікірлер: 256
@Brackeys
@Brackeys 7 жыл бұрын
Hey everyone! Hope you like the video :) This video is very introductory and doesn't go in depth with stuff like how perlin noise is generated or how it can be layered (in octaves) to give more interesting results. If you want to learn more about this sort of stuff I suggest you check out Sebastian Lague and Catlike Coding. They both have some great resources on this! There is a link in the description for that :) Stay awesome!
@basabbink2145
@basabbink2145 7 жыл бұрын
Can you please make a tutorial about how to save options in a options menu, or how to save something in general
@committedcoder3352
@committedcoder3352 7 жыл бұрын
Can you make a 2d battleship tutorial series
@TheJunytramp
@TheJunytramp 7 жыл бұрын
Ho I forgot....... : P
@phillipfrost2699
@phillipfrost2699 7 жыл бұрын
Brackeys are these scripts still in c#? Can i use mono develop?
@TheJunytramp
@TheJunytramp 7 жыл бұрын
Yes the script is in C#. But, don't worry, is praticly the same as Java Script. And yess You can use Mono develop. Juste go to your project pannal, selec the folder you want to put your script, and then right clic, creat--->script--->C#. One it's creat give it a name. Doubble clic on it et VOILÀ. But, be carefull, in C# you have a class at the top of the script and it should be the same as your script name. Don't change it, and don't change the name of you script too. If you change the name of your script, well, you'll need to change the name of your class, Hope I'm clear in my explication. Good luck and good C# :P
@gamedevbaiyi936
@gamedevbaiyi936 2 жыл бұрын
Thank you Brackeys !!! Even though it's a long time since you poseted your last video. The channel still help me consistently. Best luck for you. Whatever now you're dealing with, you get our best hope.
@paytondugas8760
@paytondugas8760 5 жыл бұрын
Dude, you're killing it! Literally every time I look something up with the word "Unity" in it one of your epic videos comes up. Keep up the hard work!
@MaeveFirstborn
@MaeveFirstborn 7 жыл бұрын
You've got no idea how amazing these videos are.
@maldoran9150
@maldoran9150 6 жыл бұрын
really high quality content! Found your channel today and already watched A LOT. thank you!
@blazeminer8197
@blazeminer8197 7 жыл бұрын
Wow i am so amazed at how professional your tutorials are let me just say thanks, thank you for these tutorials u go and make these for us and they are amazing i am truly thankfull
@monishvyas2749
@monishvyas2749 7 жыл бұрын
I take this moment to thank to Asbjørn Thirslund for all of his videos. I learnt unity by watching your videos. I have been following you since "Make a game series", but I never actually shown my gratitude to you. So A biggg thank you to you for all your tutorials whether it be a small one or a complete series. Thanks to you I myself and many like me are game developers.
@xanny57
@xanny57 7 жыл бұрын
Brackeys!! You're awesome dude! I LOVE your content! Thanks to you I've become a game developer!
@Brackeys
@Brackeys 7 жыл бұрын
That's awesome man! Glad I could help :D
@Adrien13Sanctioned
@Adrien13Sanctioned 2 жыл бұрын
Thank you!!! This was all I needed to get my procedural world generation working for my game, this was the only thing I was having difficulty figuring out, thanks! :D
@xxDeath99Starxx
@xxDeath99Starxx 7 жыл бұрын
Nice. I look forward to the tutorial on procedural terrain generation. Thanks for this.
@blitzinbeats2643
@blitzinbeats2643 7 жыл бұрын
Great video, been waiting for this for a long time
@marumisu9560
@marumisu9560 4 жыл бұрын
I wish I had a group of Scandinavian friends to make a game with.
@tate_talk574
@tate_talk574 4 жыл бұрын
I do to but in the au
@stevenmorgan3869
@stevenmorgan3869 3 жыл бұрын
Same but in the us
@gruvexp
@gruvexp 3 жыл бұрын
I am from Norway but I just started learning programming and don't know how 2 make my own games yet
@jesper9622
@jesper9622 3 жыл бұрын
@@Coffianto Minecraft, Battlefield, Teardown and candy crush is made in sweden. And im from sweden and im making my own game.
@latefid
@latefid 3 жыл бұрын
@@jesper9622 and Dani is from norway
@DePistolero
@DePistolero 7 жыл бұрын
You made it look like a piece of cake :) And you nailed a couple of different things so easily and effortlessly here. Thank you :)
@sahirvirmani7369
@sahirvirmani7369 7 жыл бұрын
Can't wait for the terrain generation video. Keep it up
@veno501
@veno501 7 жыл бұрын
Brackeys, my boi did it again! *Our voices are heard!* I salute you! Some people me including wanted this, feelsgoodman when it appears on my feed! Love the recent standalone tuts for deeper understanding of Unity3d.
@axolotl2959
@axolotl2959 2 жыл бұрын
Cool profile picture.
@samuelward9058
@samuelward9058 4 жыл бұрын
Brackeys really apreciate this vid. Thanks !!!
@rambozo_fpv176
@rambozo_fpv176 4 жыл бұрын
Brackeys never disappoints.
@arthurviniciusalvessantana8770
@arthurviniciusalvessantana8770 7 жыл бұрын
oh wow, that was fast, thanks and keep it up with the awesome work!
@LideCantFly
@LideCantFly 7 жыл бұрын
Awesome Video as always =) Thanks for your help
@knifeninja200000
@knifeninja200000 4 жыл бұрын
Love your math involved tutorials
@PROJECTJoza100
@PROJECTJoza100 6 жыл бұрын
3:06 he pasted"for the"?
@galaxyguy4247
@galaxyguy4247 4 жыл бұрын
3:05
@andressweeney-rios5932
@andressweeney-rios5932 4 жыл бұрын
Probably a jump cut?
@thedude4039
@thedude4039 3 жыл бұрын
Wow, I think he did that on purpose so it would line up with what he's saying.
@tjkerman9443
@tjkerman9443 7 жыл бұрын
Instead of putting the generation into the update method, you could just put it into the OnDrawGizmos(). It then allows you to change the parameter. To reduce the calculation amount, you could add a dirty flag with setter on each parameter and only then reproduce a new noise texture.
@Guyonahi
@Guyonahi 7 жыл бұрын
Awesome! Looking forward to terrain generation.
@TheSpacecraftX
@TheSpacecraftX 7 жыл бұрын
Just learned about perlin noise a couple months ago in my graphics module.
@detscadosu2465
@detscadosu2465 6 жыл бұрын
Holy shit thanks so much! I've been struggling because I did not offset nor scale the value! Thanks
@Y3ffer
@Y3ffer 7 жыл бұрын
muchas gracias, por todos tus tutoriales, este tipo de técnica fue usada para realizar la generación de terrenos en minecraft, seria genial que hicieras un ejemplo de como hacer un juego tipo minecraft, saludos desde Perú
@Bhavin_Lathia
@Bhavin_Lathia 7 жыл бұрын
Thanx alot man , please do the procedural generation with terrain soon 😄
@Tbrekke
@Tbrekke 6 жыл бұрын
Remember to move the renderer initialization into the start method!
@TheRayll
@TheRayll 7 жыл бұрын
love it! more please.
@JustKatoh
@JustKatoh 7 жыл бұрын
keep the awesome work coming 😍😘
@jjxtra
@jjxtra 7 жыл бұрын
Thanks for the video! Any reason not to use sharedMaterial on that renderer vs. material which will create garbage / duplicate the material?
@bluegamez3051
@bluegamez3051 6 жыл бұрын
Simply just helpful
@andersonmacedo99
@andersonmacedo99 3 жыл бұрын
I miss you brackeys 💔
@josijahvalic9847
@josijahvalic9847 6 жыл бұрын
Your Face Lighting is Perfect.
@meetboy352
@meetboy352 7 жыл бұрын
Hey Brakeys, could you please make a video on Enemy AI. Your old video on the subject doesn't work too well this the latest version of Unity.
@yoyotvyoo
@yoyotvyoo 7 жыл бұрын
Thank you!
@aymenblack6308
@aymenblack6308 7 жыл бұрын
Perfect Mate, i'm really interested in procedural animation, i can't find any useful explanation on this, if you can make a little exemple on this that will be amazing. keep it up !
@krenciak
@krenciak 7 жыл бұрын
Спасибо! Хоть я из Украины, но с радостью смотрю Ваш канал! :)
@madalinpantaru6246
@madalinpantaru6246 7 жыл бұрын
Great job.
@ojzisineks8542
@ojzisineks8542 3 жыл бұрын
Thank you very much.
@kristianthaler6525
@kristianthaler6525 2 жыл бұрын
I hope you are still reading comments on this channel because I need to tell you how awesome you are.
@Kikikan
@Kikikan 7 жыл бұрын
FINALLY Thank you
@Mikno21
@Mikno21 7 жыл бұрын
Amazing!
@Taki241
@Taki241 5 жыл бұрын
Hello, can i make a specific type of noise when i can declare when i need the max or min values?
@pranavgaur660
@pranavgaur660 7 жыл бұрын
Damn! You should be a professor at some university. You explain things with great ease. :P
@KucharJosef
@KucharJosef 7 жыл бұрын
Can you show how octaves and some other parameters in perlin/simplex noise work in part 2?
@RitobanRoyChowdhury
@RitobanRoyChowdhury 7 жыл бұрын
Look at Sebastian Lague's procedural landmass generation series.
@j-monteiro
@j-monteiro 4 жыл бұрын
If you're using Universal Render Pipeline (URP/LWRP), instead of `renderer.material.mainTexture = texture;` set it instead with `renderer.material.SetTexture("_BaseMap", texture);`
@user-bc7eg4ro3j
@user-bc7eg4ro3j 3 жыл бұрын
Thanks
@lycagos1278
@lycagos1278 6 жыл бұрын
my god i can generate terrain thanks man, you are a unity God
@daski1373
@daski1373 6 жыл бұрын
Hi! I have a question about xCoord and yCoord. When I just try convert int x value from loop to float I get a result like 0,4652731; How it works? for example: loop index x = 1; then xCoord = (float)x; is equal 0,4652731, and next interesting point is...when I divide x to width (width = 256), then xCoord is equal 1. Thanks for help :)
@coolmatt1111
@coolmatt1111 7 жыл бұрын
I don't even make games and yet I find this entertaining
@joebevan160
@joebevan160 7 жыл бұрын
Dam these Pixel are lit fam xD 6:19, Loved the tutorial tho great job :D
@danielesusino9159
@danielesusino9159 7 жыл бұрын
Hey Brackeys, you're videos are awesome, but I have a question : can you make a tutorial on how to make a loading screen? Thanks in advance.
@user-xf8cx9xx4h
@user-xf8cx9xx4h 3 жыл бұрын
Thus could anyone tell me how the Mathy.perlin work actually? I wanna to use perlinNoise in my own fragment, but what I can get is just Position and texture, I `d to achieve the perlin by my own function..........
@michaelbabcock6997
@michaelbabcock6997 3 жыл бұрын
come back please. I am learning ECS and I need your voice to guide me.
@AKindChap
@AKindChap 7 жыл бұрын
Your videos are incredible and they teach so many things. But I honestly had to check my player settings to make sure the video wasn't at X2. Slow doooooooown.
@DePistolero
@DePistolero 4 жыл бұрын
Thank you sir :) Still valid :)
@thamska2694
@thamska2694 2 жыл бұрын
Can you make the texture more sharp?
@gaffertappeexo2281
@gaffertappeexo2281 3 жыл бұрын
thank you¬
@KameariKillScreen
@KameariKillScreen 6 жыл бұрын
How do you animate the seed of the perlin Noise?
@mrsparklepants5636
@mrsparklepants5636 7 жыл бұрын
can you make a video where you are able to pick up guns or weapons with e?
@bukkit_esp81
@bukkit_esp81 7 жыл бұрын
OMG a great tutorial about perlin noise! Sub and like (OF COURSE!)
@lynx-me2ew
@lynx-me2ew 2 жыл бұрын
we all miss you :(
@The28studio
@The28studio 7 жыл бұрын
how can i save the texture on my project for future use ?
@contrl_f5499
@contrl_f5499 2 жыл бұрын
thanks u bro
@eo9132
@eo9132 4 жыл бұрын
How do I make this texture work on a terrain instead? It does not call the renderer in the same way in the code
@SreenathN92
@SreenathN92 7 жыл бұрын
How efficient is it in mobile? Also, can we use Perlin noise in a shader?
@diruiuwu
@diruiuwu 7 жыл бұрын
can you show how to make player jump (BTW i love your vids)
@ClaudChannel
@ClaudChannel 7 жыл бұрын
HELLO BRACKEYS, Tell me please how to animate or let the perlin noise be no static and always update? (Like tv noise) I very need this, please tell what to do :)
@faisalsajjad7396
@faisalsajjad7396 7 жыл бұрын
hey dude, can you make a video about how to make a terrain.
@raigiku7272
@raigiku7272 6 жыл бұрын
where can I get that Visual Studio theme?
@compechdev
@compechdev 4 жыл бұрын
Is there a way to set the color to a gradient?
@kieferabberley3275
@kieferabberley3275 2 жыл бұрын
any idea why the noise isnt appearing? ive checked over the script 4 times now and i cant find any differences?
@sarulaplays6861
@sarulaplays6861 7 жыл бұрын
Hey Brackeys, so my Animation course is going well so far :) We're currently using Maya so if you need any assets I'd be happy to help! Purely for practice as I've only been using it for 3 months now :)
@VoidAshen
@VoidAshen 3 жыл бұрын
when u write the code and it works in the first go That moment is heaven
@Hello-qg4yk
@Hello-qg4yk 3 жыл бұрын
YUP. Everytime I am realllllly happy it worked and **dies of dopamine overdose cause it worked first time**
@Xezian
@Xezian 6 жыл бұрын
it keeps saying that not all paths return a value when it comes to int x, int y
@Redstonemax
@Redstonemax 7 жыл бұрын
Omg! i was just working on procedural map generation in my game, and i saw the notification just next to my code and i'm here like LOL! XD
@piyushharjani5220
@piyushharjani5220 7 жыл бұрын
pls make a video on touch input for touchscreen devices
@roko567
@roko567 7 жыл бұрын
finally!
@RupluttajaGames
@RupluttajaGames 7 жыл бұрын
I would suggest against using perlin noise and implement simplex noise instead, not only does it support n dimensions, it takes way less computing time.
@diogomoreira7275
@diogomoreira7275 7 жыл бұрын
Your videos are always great! Could you in the future do a tutorial on 2D bow and arrow mechanics? It would be awesome.
@diogomoreira7275
@diogomoreira7275 7 жыл бұрын
I had no idea how to even start creating the effect I wanted. With your comment I now know what I have to look and search for. Thanks
@alexvisan7622
@alexvisan7622 6 жыл бұрын
I am making a chunk -based terrain,using perlin noise but the chunks do not allign ... Please help
@FrZifowk
@FrZifowk 7 ай бұрын
Does anyone know how to convert thisinto a terrain
@fate70
@fate70 2 жыл бұрын
I remember the good old times when he was still here *becomes sad again*
@monkeysaur4305
@monkeysaur4305 7 жыл бұрын
Thank you for this tutorial! Have you tried the Timeline & Cinemachine in the new Beta? It would be great if you could do an introductory video for how to use it and how to transition from gameplay to timeline scenes and back again. It looks like it's going to be a big part of the workflow in future.
@critikalowen9522
@critikalowen9522 5 жыл бұрын
¿How i can create Perlin Noise 1D?
@MrBrown78
@MrBrown78 7 жыл бұрын
Hey guys I have a c# question (not the c# in unity) so how do I check if a string contains any word in an array?
@dbzadnenkhiari
@dbzadnenkhiari 7 жыл бұрын
you want to know if your string belongs to an array or if the word contain at least one element from your array ?
@RitobanRoyChowdhury
@RitobanRoyChowdhury 7 жыл бұрын
If I understand correctly, you have an array of strings, maybe keywords?, and you want to find out if a given string, s, contains at least 1 instance of a word in the array. E.g.: string[] keywords = new string[4]{'up', 'down',' left',' right'}; string s = "This is probably some input from the user. Something like move left"; string[] delimiters = new string[]{" "}; // These are what will be used to define a "word" in your string. Here, a word is something separated by spaces string[] wordsInString = s.Split(delimiters, StringSplitOptions.RemoveEmptyEntries); // see msdn.microsoft.com/en-us/library/tabh47cf(v=vs.110).aspx for more info. for(int i = 0; i < wordsInString.Length; i++) { if(keywords.Contains(wordsInString[i]){ HandleKeywordEntered(wordsInString[i]); } } And you might have dictionary mapping strings to actions.
@nadim78nadim
@nadim78nadim 7 жыл бұрын
If(array.Contains(myWord)) or foreach(string s in array ) { if(s == myWord ) { Print... } }
@dbzadnenkhiari
@dbzadnenkhiari 7 жыл бұрын
suppose that you havce an array of string named Array_Of_String , and you have the string named My_String , loop throughe ach elemnent (name it Word ) in the Array_Of_String and inside that loop check if My_String. == Word do something else do something else
@dbzadnenkhiari
@dbzadnenkhiari 7 жыл бұрын
you can do it like this : string[] Array_Of_Strings = new string[2]{"KZfaq","Brackeys"}; string my_String = "Brackeys"; foreach(string word in Array_Of_Strings){ if(word == my_String) Console.WriteLine("the word " + word +" is equal to the string " + my_String); else Console.WriteLine("the word " + word +" is NOT equal to the string " + my_String); } so the output sounds like this : the word KZfaq is NOT equal to the string Brackeys the word Brackeys is equal to the string Brackeys
@sp4ky91
@sp4ky91 2 жыл бұрын
Anyone know how to do this on a texture3d texture?
@martintapp99
@martintapp99 7 жыл бұрын
You could use the var keyword instead of typing the variable type all the time. It makes the code much easier to read. Great vid!
@andrewmasek2170
@andrewmasek2170 7 жыл бұрын
How would I actually apply this concept as I don't want my game to be based off of a texture. Can you make a video with an example of actually applying this principle for procedural generation.
@RitobanRoyChowdhury
@RitobanRoyChowdhury 7 жыл бұрын
He said he would do this next week. I advise you to look at Sebastian Lague's Procedural Landmass Generation series (as well as his Intro into Game Dev, if you're new to unity)
@RupluttajaGames
@RupluttajaGames 7 жыл бұрын
Have a world generator script that implements perlin noise, though I would recommend implementing simplex instead. Then if you're making say a 2D game, iterate through every coordinate you want to generate a tile for (n chunks around the camera to save processing time) and calculate the value (density) of said tiles with simplex/perlin noise, then apply which ever rules you prefer and create a corresponding object there or use from pool to prevent major lagspikes. For more complex world generation you can do multiple passes eg. first pass adding basic features like height of the terrain which determines if there is deepwater,water,sand,grass, rock, snow you name it. second pass to determine where trees and other foliage are located and so on. For roads and caves, you should look into perlin worms algorithm or similar. I am not very good at explaining things, but I hope you got something out of this regardless. If you have any questions feel free to ask. PS. perlin noise doesn't work well with integers so you can just add a offset of .n to get desired result.
@phategames3241
@phategames3241 2 жыл бұрын
It says Texture2d not found and same for Color please help
@atmunn1
@atmunn1 7 жыл бұрын
yay
@noentryclothing7454
@noentryclothing7454 6 жыл бұрын
Does anyone else try to launch the debug mode and unity just stops responding?
@RavenArtzy
@RavenArtzy 3 жыл бұрын
Perfect. I am creating clouds.
@ramg332
@ramg332 7 жыл бұрын
in which programming language do you code your games???
@totallydillion
@totallydillion 7 жыл бұрын
Unity uses UnityScript, it's a form of C#. Unity also uses JavaScript but Brackeys doesn't use it for UnityScript is easier.
@skollyt6594
@skollyt6594 6 жыл бұрын
Please make a Voxel engine tutorial
@xdiatia4197
@xdiatia4197 4 жыл бұрын
0:29 I don't know why but I see a rotating 3 even when pausing the video
@popflop1036
@popflop1036 6 жыл бұрын
This guy is the happiest male I have ever seen
@nicolasarmando778
@nicolasarmando778 6 жыл бұрын
Please superflight procedural generation tutorial
@karanmakvana8810
@karanmakvana8810 7 жыл бұрын
Can you please provide a tutorial for bullet Ricochet in 2d
How to use GitHub with Unity
7:27
Brackeys
Рет қаралды 682 М.
How to turn a few Numbers into Worlds (Fractal Perlin Noise)
15:24
The Taylor Series
Рет қаралды 188 М.
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 3,7 МЛН
New model rc bird unboxing and testing
00:10
Ruhul Shorts
Рет қаралды 24 МЛН
Cellular Automata | Procedural Generation | Game Development Tutorial
15:22
Делаю процедурную генерацию в Unity
13:15
Minecraft terrain generation in a nutshell
25:49
Henrik Kniberg
Рет қаралды 150 М.
C++: Perlin Noise Tutorial
8:52
Zipped
Рет қаралды 11 М.
Coding Challenge 11: 3D Terrain Generation with Perlin Noise in Processing
22:44
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 330 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 696 М.
Perlin Noise in GameMaker Studio 2
14:01
SamSpadeGameDev
Рет қаралды 12 М.
What is Perlin Noise?
7:49
Suboptimal Engineer
Рет қаралды 12 М.
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН