Procedural Landmass Generation (E02: Noise Map)

Welcome to this series on procedural landmass generation. In this episode we create a grid of perlin noise values and render them to the screen as a texture.
The source code for this episode can be found here:
github.com/SebLague/Procedura...
If you'd like to support these videos, I have a Patreon page over here: / sebastianlague

Пікірлер: 674

  • @scattershotshow
    @scattershotshow7 жыл бұрын

    For anyone getting the "Multi-object editing not supported" issue when adding the [CustomEditor] code. All you have to do is deselect your MapGenerator object, and then select it again. So for example just click your 'Plane' object, and then click back on to 'MapGenerator', and the button will show up.

  • @benjamin.burton

    @benjamin.burton

    6 жыл бұрын

    Thank you!

  • @bjarnes.4423

    @bjarnes.4423

    6 жыл бұрын

    Thanks!

  • @kevinalexisvaldezzamora6916

    @kevinalexisvaldezzamora6916

    6 жыл бұрын

    Thanks!!!

  • @makethemdieslow

    @makethemdieslow

    5 жыл бұрын

    Yup, thanks a ton!

  • @BeautifulLuxury

    @BeautifulLuxury

    5 жыл бұрын

    Thank you Scattershot. For a moment there I thought it was a feature only supported in the pro version of Unity :)

  • @JonesCrimson
    @JonesCrimson7 жыл бұрын

    Some scripting tutorials I set to 1.25 speed. With yours I don't want to miss a fraction of a second.

  • @OliOAKASquekyboy

    @OliOAKASquekyboy

    5 жыл бұрын

    ok thx

  • @matthewspencer6669

    @matthewspencer6669

    4 жыл бұрын

    I love the way he talks, so I'm the same. No homo

  • @MoonJumpMania

    @MoonJumpMania

    4 жыл бұрын

    I just got used to watching every single video to 2.0 speed. Regular speed has just become too weird for me. The only problem is that heavy accents become extremely difficult to understand.

  • @InsertName74284

    @InsertName74284

    4 жыл бұрын

    thanks bud

  • @Josh_Gone

    @Josh_Gone

    3 жыл бұрын

    Me after skipping 3 minutes of programming: *I'm gonna pretend I didn't see that*

  • @FatTyrant
    @FatTyrant2 жыл бұрын

    Shout out to the comment section for saving me hours of messing about with the code. You guys truly are godsent.

  • @mehmedcavas3069
    @mehmedcavas30694 жыл бұрын

    Dude this tutorial is awesome. The best thing is that it does not only teaches you landmass generation it also shows you how to make a custom editor and write better codes. thanks a lot

  • @Topherbullock
    @Topherbullock6 жыл бұрын

    In case anyone else gets tripped up and the texture is not applying: make sure your material's 'Shader' is set to "Unlit/Texture".. I had it set to "Unlit/Color" and it took me a while to realize why it was grey.

  • @WolfsRainESP

    @WolfsRainESP

    6 жыл бұрын

    MVP

  • @briannasingh1421

    @briannasingh1421

    5 жыл бұрын

    Thank you! I had same issue.

  • @benevolenttumour

    @benevolenttumour

    4 жыл бұрын

    Thanks man, thought I was going insane for a while there.

  • @advancex_87

    @advancex_87

    2 жыл бұрын

    I have it set to Unlit/Texture and its still gray

  • @CooChewGames
    @CooChewGames7 жыл бұрын

    Would just like to give a massive thank you for this tutorial having spent an entire day reading, listening and watching, with growing impatience, to a large swathe of Unity information (or lack of it). This was a breath of fresh air and nothing less than inspiring. It is deserving of chocolate :-)

  • @bigpapsi
    @bigpapsi4 жыл бұрын

    This is the most interesting way to learn unity and game development. Thank you.

  • @numgun
    @numgun8 жыл бұрын

    Finally youtube recommended something great for once, subbing to this channel now. : ) Good a/v quality, well designed format and useful universal topics. I'm here to stay. :D

  • @hogoromootsutsuki4079
    @hogoromootsutsuki4079 Жыл бұрын

    There is one thing VERY important that you NEVER even ONCE mention in this series, and that is ram memory management. the thing about your stuff is that it eats up alot of ram, make sure you clear your array and null them when done clears up ram memory I work with a cube based component building game. and I noticed lots of ram usage from un-nulled arrays. fixed that up and almost no overhead. i am currently revisiting your tutorials to use them with my pixel cube stuff to create a procedural voxel map. other than ram management your tutorials are awesome

  • @tobenaigemu1612
    @tobenaigemu16127 жыл бұрын

    Love your video's mate! A lot of other tutorials say that the tutorial isn't for beginners yet carry on for ages explaining the basics of what they're doing. You get straight to the point while still explaining what your doing in a quick and understandable fashion. Thanks! :)

  • @SethDecker89
    @SethDecker898 жыл бұрын

    Extremely excited for this series. Off to a great start.

  • @sakari.niittymaa
    @sakari.niittymaa5 жыл бұрын

    Whoa! This was one of the best tutorial what I've seen for unity. Thanks!

  • @studyASMRcoffee
    @studyASMRcoffee3 жыл бұрын

    All I have to say is thank you!! For your help, explaining and no afraid to try to teach hard subjects in coding unity.

  • @Swesen
    @Swesen4 жыл бұрын

    9:40 If you are doing this in the new HDRP or URP to know what material texture to replace with your noise to display it. You need to use sharedMaterial.SetTexture("_UnlitColorMap", texture); Instead of sharedMaterial.MainTexture = texture; To find the textureID ("_UnlitColorMap") for the shader you use right click the dropdown menu for selecting your shader(at the top in the inspector) in your material, and "Select shader". The textureID is in the properties of the shader where you will find a list of names that often makes sense. The shaders no longer use the textureID that mainTexture references so you have to find it your self. Hopefully this saves anyone the 2h I spent on finding this.

  • @firad2526

    @firad2526

    3 жыл бұрын

    Thank you!

  • @-vanitas5229

    @-vanitas5229

    3 жыл бұрын

    Thanks !

  • @jordanjob7656

    @jordanjob7656

    3 жыл бұрын

    Thank you

  • @thomassjoholm8623

    @thomassjoholm8623

    3 жыл бұрын

    Thanks!

  • @RoverFlushed

    @RoverFlushed

    3 жыл бұрын

    thank you

  • @themirlabs
    @themirlabs4 жыл бұрын

    i love your tutorials already. This perlin noise editor is so helpful!

  • @YourFutureHero7
    @YourFutureHero77 жыл бұрын

    By far the best tutorial for procedurally generated landmasses!! You are quick but there is a rewind button XD. Thank you for the tutorials! Please keep them coming!

  • @SebastianLague
    @SebastianLague8 жыл бұрын

    Hi everyone, welcome to episode two! Source code for each episode will become available over here: github.com/SebLague/Procedural-Landmass-Generation I hope to get the next video out this Wednesday (10th Feb). On the off-chance that anyone wishes to transcribe/translate this video, you can do so here: kzread.info_video?v=WP-Bm65Q-1Y

  • @cousinofcelsius6860

    @cousinofcelsius6860

    8 жыл бұрын

    This gave me an idea for a platforming game. ...The platform heights change over time periodically xD Keep up the good work

  • @tymewiz806

    @tymewiz806

    8 жыл бұрын

    +Sebastian Lague ive transcribed it

  • @SebastianLague

    @SebastianLague

    8 жыл бұрын

    +tymewiz Thank you very very much, that's awesome! I've made some small edits and added them to the video.

  • @MrSteenstra

    @MrSteenstra

    8 жыл бұрын

    +Sebastian Lague I've translated the video to Dutch, and have submitted it for verification. Hope it helps!

  • @SebastianLague

    @SebastianLague

    8 жыл бұрын

    +MrSteenstra Awesome, thanks for making it accessible to a wider audience!

  • @Smarterthandumber
    @Smarterthandumber7 жыл бұрын

    This is awesome as a Unity tutorial for people who already can program! Excellent work mate!

  • @BauskeMedia
    @BauskeMedia4 жыл бұрын

    I dont understand a word I just watch this for the soothing voice and the nice images

  • @killerk8t
    @killerk8t4 жыл бұрын

    thank you so much for this! this will totally help me get into programming like i've always wanted.

  • @utkarshjha1071
    @utkarshjha10717 жыл бұрын

    Brilliant !!Never found anyone like this before! You're just amazing !

  • @KeithRaymond99
    @KeithRaymond994 жыл бұрын

    Firstly, great tutorial. Good speed, perfect amount of explanation of what certain things are and why they're done and overall just useful tutorial. Quick note to hopefully help save some people time if they're following along using LWRP. I wasn't getting anything shown on my plane despite the code being run, checked w/ logging, and went to the internet. Turns out the fog feature in LWRP boilerplate got me again. Go to Window > Rendering > Lighting Settings. Under "Other Settings" uncheck the fog or lower it.

  • @donotSSL
    @donotSSL6 жыл бұрын

    These are well done tutorials indeed, keep up the good work!

  • @h4babi
    @h4babi3 жыл бұрын

    Exactly what I needed, thanks for the amazing work! I'll be using this tomorrow

  • @bastiaantheboss4976
    @bastiaantheboss49763 жыл бұрын

    I love how you use 'color' and 'colour' to make everyone happy XD

  • @tz4601
    @tz46013 жыл бұрын

    In 15 minutes this taught me more about actually doing stuff with/in Unity than five hours of official Unity Learn courses. Of course those courses have to assume zero programming experience, but still -- very impressed with the clarity and information density. Still useful half a decade later!

  • @vrtech473
    @vrtech4738 жыл бұрын

    can't wait for the next episode !! Thanks !

  • @user-xb6fl9ri6g
    @user-xb6fl9ri6g3 жыл бұрын

    I have never been so excited to see snow on my monitor - ty

  • @kristianthaler6525
    @kristianthaler65252 жыл бұрын

    I'm having so much fun scaling my noise texture, this video taught me a lot.

  • @DTGplays
    @DTGplays8 жыл бұрын

    I have absolutely no idea what you're doing, but thank you, your tutorials helped me a lot :D

  • @bukkit_esp81

    @bukkit_esp81

    7 жыл бұрын

    Dont follow a tutorial without knowing what are he doing, so, comment what is creating in every line, and you will know what is happening, easy

  • @rustyryan4473
    @rustyryan44734 жыл бұрын

    I feel like i need to pay you for this. Its too good.

  • @aaimanazlan
    @aaimanazlan8 жыл бұрын

    thank you so much! Your videos are always very useful and I learn so much!

  • @clementv4171
    @clementv4171 Жыл бұрын

    Thank you for the sweetest unity tutorials🍬

  • @gilleswalther5964
    @gilleswalther59644 жыл бұрын

    Lot of new tricks in here, looking forward to the next video

  • @suparki123
    @suparki1234 жыл бұрын

    Just wanna say that as someone who has experience numerical programming (but not unity), it's really nice to find a tutorial that assumes programming knowledge and of such high quality.

  • @Art9681
    @Art96818 жыл бұрын

    Great job. This is fantastic.

  • @stevie_rof
    @stevie_rof8 жыл бұрын

    Hi sebastian, great series. Keep it up.

  • @adamodimattia
    @adamodimattia5 жыл бұрын

    Wow... This is so good and still free... I think I'll become a patron :)

  • @michaelplzno
    @michaelplzno Жыл бұрын

    Very helpful and well made series!

  • @eggpoison5182
    @eggpoison51822 жыл бұрын

    God I love this channel so much, it's so helpful

  • @15Sivle
    @15Sivle7 жыл бұрын

    This is Very good! I'll have to adapt this to apply it to unreal, but thanks for this, it's exactly what i was looking for!

  • @Owl90
    @Owl90 Жыл бұрын

    This is incredible. Thank you!

  • @aminmkyt4191
    @aminmkyt41912 жыл бұрын

    I watched the tutorial again for 3 minutes, slept for 1 hour, finally woke up and now your voice is gonna make me sleep again

  • @64revolt
    @64revolt7 жыл бұрын

    Your videos are awesome. Just wanted to say that.

  • @lawrencehoward460
    @lawrencehoward4605 жыл бұрын

    I found that with the finished code for this episode, certain Scale values would result in pure grey images. And, though the first 20~ seconds of this video reference something like this occuring... it didn't quite feel right to me so I did some tinkering. ***EDIT: But I should mention here that if you stick with the series, Sebastian later adds an "Offset" value, which appropriately picks from the Perlin Map - rather than the early code from this episode seemedly picking from the same point over & over.*** Looking at the current Unity Docs example for PerlinNoise, the prefered way to pick sampling co-ords is closer to what 'adrian anta' presented some time ago: float xCoord = x / noiseTex.width * scale; float yCoord = y / noiseTex.height * scale; float sample = Mathf.PerlinNoise(xCoord, yCoord); (I cast both x & y as floats in my example after seeing some systems had issues resulting in solid textures) Using the code example from my comment here I was able to achieve much more reliable / non-solid results. Hope this helps!

  • @Dezomm
    @Dezomm2 жыл бұрын

    Bonus tutorial on some editor magic. I have used Unity quite a bit but never before done any custom editor stuff, so that was really interesting to learn about. Thanks for a great tutorial!

  • @hakanviajando
    @hakanviajando2 жыл бұрын

    Great video. Looking at old videos and practicing to improve my understanding to understand your new amazing videos better :D

  • @Internalerror_
    @Internalerror_ Жыл бұрын

    Thanks! I've been searching how to get it and this is brilliant :D

  • @dannyclear685
    @dannyclear6856 жыл бұрын

    15 min tutorial but i use atleast 5 hour to learn gg

  • @ineeda12step92

    @ineeda12step92

    3 жыл бұрын

    Same here! Lol

  • @user-fr3pp5wu7o

    @user-fr3pp5wu7o

    2 жыл бұрын

    Same here 😭😭

  • @JacobKinsley

    @JacobKinsley

    2 жыл бұрын

    Better than someone that needs 5 hours and just acts as if 15 minutes is enough to understand

  • @Sakupenny

    @Sakupenny

    Жыл бұрын

    "I take"

  • @agdwhite5421
    @agdwhite54214 жыл бұрын

    You are incredible my man

  • @Daednumai
    @Daednumai7 жыл бұрын

    Brilliant tutorial, thanks.

  • @jeffreynavarro5228
    @jeffreynavarro52284 жыл бұрын

    Thank you so much for making these videos for free I'm new to unity and want to get into gamedev : )

  • @thegreatestmoo
    @thegreatestmoo6 жыл бұрын

    How would you go about making a variable to control the space between land masses? Like if you want there to be lots of water between them, also the size of the land masses?

  • @miles2770
    @miles27707 жыл бұрын

    You just got your 65,000th subscriber.

  • @normanmatthewarcillas9746
    @normanmatthewarcillas97468 жыл бұрын

    As usual... Awesome stuff (y)

  • @VoidAshen
    @VoidAshen3 жыл бұрын

    it tooks me bout 3 hours to understand the code and get it right but it was worth it

  • @Sweenus987
    @Sweenus9875 жыл бұрын

    If anyone is coming back to this and wants to use the HDRP, to get the texture to update, replace the ...sharedMaterial.mainTexture... part with "textureRenderer.sharedMaterial.SetTexture("_BaseColorMap", texture);"

  • @jordanjob7656

    @jordanjob7656

    3 жыл бұрын

    Thank you :)

  • @Zajozor
    @Zajozor4 жыл бұрын

    When using LWRP, this is how you set the texture of a material: `TextureRenderer.sharedMaterial.SetTexture("_BaseMap", texture);` (but be sure to google what it actually does :) )

  • @jupiterbjy

    @jupiterbjy

    4 жыл бұрын

    You saved my life.. just a reminder, LWRP is renamed to URP.

  • @Hello-qg4yk

    @Hello-qg4yk

    3 жыл бұрын

    jupiterbjy And if you use HDRP?

  • @gustavbok4298

    @gustavbok4298

    3 жыл бұрын

    @@Hello-qg4yk To use it with HDRP you have to go with "textureRenderer.sharedMaterial.SetTexture("_BaseColorMap", texture);"

  • @jvcmarc
    @jvcmarc6 жыл бұрын

    3:04, instead of doing the if statement and setting scale to be 0.0001, I made a ternary like so: scale = scale == 0 ? float.Epsilon : scale; will this work?

  • @Gantics-Antics
    @Gantics-Antics5 жыл бұрын

    I've never used unity before. For c# I usually just used XNA or managed directX for 2D rendering - but this looks terribly easy! Definitely giving it a go. :) Thanks for the easy to digest video. Definitely subbing.

  • @ormstoodotcom7634
    @ormstoodotcom76346 жыл бұрын

    You are awesome man! 😃👌

  • @elturkocharro4106
    @elturkocharro41064 жыл бұрын

    Thank you for this tutorial!!

  • @jesse2535
    @jesse25357 жыл бұрын

    For anyone that have a blank or gray plane, dont forget of set sampleX and sampleY to x/scale and y/scale.

  • @mowztouch4873

    @mowztouch4873

    6 жыл бұрын

    also don't forget to cast x and y as floats float sampleX = (float)x / (mapWidth*scake); float sampleY = (float)y / (mapHeight*scale);

  • @colepoppleton1002

    @colepoppleton1002

    3 жыл бұрын

    @@mowztouch4873 where would that go. In 'Noise'? if so what line?

  • @josepadilla9735
    @josepadilla97356 жыл бұрын

    Agradezco muchísimo los subtítulos en español, gracias por tu contenido

  • @nico-i
    @nico-i4 жыл бұрын

    Awsome Tutorial!

  • @photonman54
    @photonman548 жыл бұрын

    That converting a 2d array to a normal array really threw me for a loop (no pun intended). i had to draw it out to understand what was going on there. As a newer programer I did have to watch through a couple times and comment my code to fully understand what was going on. Good tutorial I learned lots of stuff from it.

  • @a.p.3571

    @a.p.3571

    6 жыл бұрын

    Hey I know you wrote this comment a really long time ago, but if you remember, could you please explain how you understood the conversion? I'm trying to figure it out myself and am having a really hard time doing so.

  • @Aethelvlad

    @Aethelvlad

    2 жыл бұрын

    @@a.p.3571 2D array looks like (x1, x2, x3, y1, y2, y3). multiply the length of x entries against the length of y entries, in this case the result is 6. your new 1D array with a length of 6 will hold the same values (x1, x2, x3, y1, y2, y3). the result of doing this is the same as separating the dimensions x/y of the array and stringing them together in sequence x/y. as he said, this had to be done because our noise/height maps are 2D arrays but color maps for textures can only be stored in 1D arrays, no x/y.

  • @Zombine50
    @Zombine507 жыл бұрын

    I remember watching this as it was coming out, thinking that I could understand and follow everything, just having started programming. Wouldn't say that I'm any good at it right now either, but the fact that I can actually follow this, makes me so happy.

  • @MehmetSarkd
    @MehmetSarkd8 ай бұрын

    This is a goldmine.

  • @Raycast74
    @Raycast742 жыл бұрын

    Hey, I may barely know any programming whatsoever. And Unity may not even run on my laptop. But this stuff is great, thanks man for all you do. Hope you see this.

  • @tushar4491
    @tushar4491 Жыл бұрын

    it worked! thank you so much!!

  • @divega7974
    @divega79748 жыл бұрын

    This is such a great tutorial. You have a great talent for making everything completely understandable! Any chance you plan on doing a procedural planet tutorial anytime in the future?

  • @Corummo
    @Corummo7 жыл бұрын

    Masterpiece!!!

  • @totola2022
    @totola2022 Жыл бұрын

    For everybody wondering why their noismap looks different than the mesh (later in these episodes): You have to mirror the x-values of the color[] from the noisemap ;-)

  • @Luciferdelight

    @Luciferdelight

    Жыл бұрын

    how did you solve gray mesh generated ..?

  • @aidanwansbrough7495
    @aidanwansbrough74955 жыл бұрын

    Really interesting!

  • @therealkendricklamar310
    @therealkendricklamar3103 жыл бұрын

    thank you for this!

  • @jeffhan4119
    @jeffhan41194 жыл бұрын

    Amazing tutorial

  • @eeveelution8035
    @eeveelution80358 жыл бұрын

    I just stumbled upon your videos a few days ago and I must say they are excellent! Do you have notes on what to do exactly or do you just go off memory when making these? Either way, great job!

  • @SebastianLague

    @SebastianLague

    8 жыл бұрын

    +Eeveelution Thank you :) I do prepare everything in advance for each video. It's a lot of extra work, but it helps to keep the videos focused and (to a certain extent) free of errors.

  • @eeveelution8035

    @eeveelution8035

    8 жыл бұрын

    Sebastian Lague Thanks for the fast response! The extra work really does help the quality of the video, keep up the good work :)

  • @Joy-wt9ng
    @Joy-wt9ng5 жыл бұрын

    Every time I resize the mapwidth or height through the inspector, I encounter an index out of range exception. This does not happen within a certain threshold. Any help?

  • @SaSeshen
    @SaSeshen3 жыл бұрын

    I find it fascinating that with 4 scripts and less than 100 lines of code you built the framework to one of my favorite games of all time: Civ 2, and thoroughly explained how and why the auto map generation feature works the way it does by selecting: age, size, and roughness in the pregame menu... That is insane considering that game is over 20 years old!

  • @mrslake7096
    @mrslake70963 жыл бұрын

    Great tutorial

  • @Siphonife
    @Siphonife7 жыл бұрын

    I just totally ran into the issue a couple days back kinda doin this on my own. Where if you sample integers you get the same value(I ALWAYS GOT 0!). for like 3-4 hours I pulled my hair out xD. devided world coords by 100 and got my terrain. I was so happy. LOL

  • @Steveplays28
    @Steveplays283 жыл бұрын

    4:25 kinda sounds like an exploding creeper lol Awesome tutorial series Sebastian!

  • @hatacoyama1246
    @hatacoyama12464 жыл бұрын

    Damn what a roadster around 2:00

  • @OgreProgrammer
    @OgreProgrammer5 жыл бұрын

    What did you do at 5:55 to make the empty object disappear from the scene window? Must have been a keypress as the mouse didn't move anywhere near a button after leaving the Y axis selection.

  • @sokolmurturi8797
    @sokolmurturi87978 жыл бұрын

    Hi Sebastian, Amazing tutorial man. I was just wondering if i could ask for some help. In regards to your AI path finding how would i get the AI to patrol between two points? any help would be greatly appreciated.

  • @marcoflagg6601
    @marcoflagg66015 жыл бұрын

    thank you so much!

  • @letterslayer7814
    @letterslayer78144 жыл бұрын

    its simple but teaches a lot of concepts :D

  • @lazymastodon1368
    @lazymastodon13682 жыл бұрын

    When I apply the map display script to the MapGenerator object it says “can’t add script component ‘MapDisplay’ because the script class cannot be found. Make sure that there are no compile errors and that the file name and class match”

  • @alanlillicrap937
    @alanlillicrap9373 жыл бұрын

    For those getting just a grey plane try toggling fog off in scene / toggle effects

  • @DeclanCostello
    @DeclanCostello8 жыл бұрын

    I faced a small problem with this tutorial but I realised my mistake after a while. Not paying enough attention to the video, I put in a value 1.0f for the noise scale in MapGenerator. This meant that the map showed a uniform colour without any 'noisy' variation - I thought it wasn't working. After using the 0.3f value Sebastian used I saw the expected behaviour. Just in case anyone else makes a similar mistake...

  • @blitzinbeats2643
    @blitzinbeats26436 жыл бұрын

    IF YOUR PLAIN IS GRAY: CHANGE YOUR NOISE SCALE TO 10, WIDTH TO 100 AND LENGTH TO 100 :) Unity changed their Perlin function, and it now requires smaller numbers for small Perlin. changing noise to 100 means our sampleX and sampleY get divided by a bigger number, making them smaller, making your plain display a very clear Perlin image rather than like, 1 grey pixel of Perlin. Hope this helps someone :)

  • @shubhrojyotikabiraj8322

    @shubhrojyotikabiraj8322

    2 жыл бұрын

    you saved me

  • @manituan
    @manituan8 жыл бұрын

    To make it work I had to alter Noise's method to (I was getting a grey plain texture) float sampleX = x / (mapWidth * scale); float sampleY = y / (mapHeight * scale); as Mathf.PerlinNoise parameters have to be within a range of 0..1 I don't understand why it works in your example though. Great tutorial. Keep it up!

  • @delano4047

    @delano4047

    7 жыл бұрын

    Still doesnt work for me i get a black plain texture even after this

  • @mowztouch4873

    @mowztouch4873

    6 жыл бұрын

    try to cast x and y as floats: float sampleX = (float)x / (mapWidth*scake); float sampleY = (float)y / (mapHeight*scale); Perlin noise can get any value.

  • @nullifier_

    @nullifier_

    5 жыл бұрын

    WOW! Thanks! It worked for me.

  • @lawrencehoward460

    @lawrencehoward460

    5 жыл бұрын

    I thought I'd way in here even though it's a 3 year old comment. It's important to note that Mathf.PerlinNoise's PARAMETERS do not have to be within 0.0f..1.0f, but rather what the function returns is between 0.0f..1.0f. I found that with the finished code for this episode, certain Scale values would result in pure grey images. But the first 20~ seconds of this video to reference something like this occuring... but it didn't quite sit right with me so I did some tinkering. Looking at the current Unity Docs example for PerlinNoise, the prefered way to pick sampling co-ords is closer to what 'adrian anta' presents: float xCoord = x / noiseTex.width * scale; float yCoord = y / noiseTex.height * scale; float sample = Mathf.PerlinNoise(xCoord, yCoord); So to demonstrate that the parameters can be outside of 1.0f: xCoord = 1 / 64 * 100.0f; xCoord = 1.5625f Using the code example from my comment here I was able to achieve much more reliable / non-solid results. Hope this helps!

  • @PolkanGames

    @PolkanGames

    2 жыл бұрын

    You saved me, thank you

  • @raimundaspavilonis8654
    @raimundaspavilonis86547 жыл бұрын

    Nice tutorial!

  • @PBCSandMarci
    @PBCSandMarci4 жыл бұрын

    I did a semester of java so i understand half of what you are doing but its still interesting

  • @lochlynvlad6987
    @lochlynvlad69877 жыл бұрын

    does anybody know how you could make the terrain bigger for example put a limit on how big the infinite terrain can be so that when you walked a certain amount of chucks it would stop spawning chunks or just resize the noise map maybe?

  • @goldenapple801
    @goldenapple8012 ай бұрын

    Working on this in 2d. If the plane is not showing, rotate the X axel . 45 degrees

  • @SpaceCaddy0307
    @SpaceCaddy03078 жыл бұрын

    How do we export the map as an asset for a level? I think it's awesome that we can make maps now but I'm still unable to use them.

  • @MMT--Games
    @MMT--Games2 жыл бұрын

    thank you so much for these videos. you are a life saver :)

  • @harald921
    @harald9218 жыл бұрын

    Awesome. When is the next video coming out? *Waiting anxiously* :)

  • @vitor-a12
    @vitor-a127 жыл бұрын

    how you make this smooth texture for the terrain in the begin of the video?