Coding Adventure: Hydraulic Erosion

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2024
  • In this coding adventure I attempt to implement a simulation of hydraulic erosion to make a procedural terrain look more natural.
    If you're enjoying these videos and would like to support me in creating more of them, I have a patreon page here: / sebastianlague
    Interactive demo: sebastian.itch.io/hydraulic-e...
    Full playlist here: • Coding Adventures
    The project is available here:
    (updated version) github.com/SebLague/Hydraulic...
    (version at time of this video) github.com/SebLague/Hydraulic...
    Resources:
    www.firespark.de/resources/do...
    ranmantaru.com/blog/2011/10/08...

ความคิดเห็น • 1.1K

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

    The terrain looks absolutely awesome after the simulation

    • @Cat-vp8vt
      @Cat-vp8vt 2 ปีที่แล้ว

      Ikr?

    • @jubite9565
      @jubite9565 7 หลายเดือนก่อน +1

      @@porsellaAh yes, as we know, realism = aesthetics, almost like you didn’t take a single art class in school

    • @timonix2
      @timonix2 3 หลายเดือนก่อน +1

      @@jubite9565 What is this comment even? ofcourse realism = aesthetics. we life in a world full of beauty after all

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

      @@timonix2 Realism does not equal aesthetics. One google search.

  • @bjarnes.4423
    @bjarnes.4423 5 ปีที่แล้ว +2717

    Maybe other than just a height map, you also make a "hardness map" for how much erosion takes place

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

      That would be so cool, could get plateaus, vistas, plains etc!

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

      oh yeah, and to that idea he metioned at the end of the video i say, create an algorithm that roughly simulates the physical and chemical processes, which take place to form the different sediments in the first place ;)

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

      Thats not that hard to implement, i reckon.
      I suppose there is a part where the amount of erosion is calculated as some sort of value, that value could be multiplied by some value from a 2d array like a pixel value, normalized, of course. Shouldn't be hard to implement in theory

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

      Hi, the guy from the mentioned paper here, I actually did implement this. It is briefly mentioned in section 5.2 in the paper. What I experimented with was multiple layers of terrain, basically just a stack of heightmaps, each with a different hardness. When the top layer had 0 material left, I started to erode the next layer and so on. but deposited sediment always got put in the top most layer, which was very soft as to represent sand. That way hard rock also got turned to sand , kind of.
      I also tried to implement it based on 3D noise. With just a 2D noise map I did not really like the results, it was too obvious and unnatural. But this needs a lot of parameter tweaking to get nice results. In the end my time ran out to finish the paper, so I didn't experiment with it anymore.

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

      @@BillieJoe512 awesome, thanks for the explanation! Definetely have to take a look at your paper.. one question: did you think about the possibility of cave-forming? I also had the idea of multiple 'ground'-layers in mind, pointing directly downwards from the uppermost layer, but the possibility of caves seems to add a lot of complexity to this.. I guess with a 3d-noise-map it would be possible, but would still require some considerations..

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

    "multiplied by the wrong variable"
    *nod nod* Definitely a programmer.

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

      I get it? Don't you?

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

      Lol

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

      How do you do that?

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

      @@SilasC 1 asterisk on each side of the word or phrase

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

      You either feel like you downed 5 bottles of nyquil, or 5 cans of red bull. There are no in betweens.

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

    One day, geologically accurate Minecraft terrain generation would be a reality.

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

      ...jay?... i guess?

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

      You would introduce lag if you are creating new land and then changing it afterwards to simulate erosion. Also, I suspect there would be an issue with water drop size and distribution if the idea was to have in-game rain erode the land after generation. Things like World machine do make the land look great zoomed out, but in-game you would be hard pressed to notice much difference between that and vanilla or one of the popular biome mods

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

      Yeah, its called Dwarf Fortress XD

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

      @@Ironbuket if you trained an AI to create similar hight maps to images fed from this guys video, it could blend the Y height of each surface block in minecraft with the Hight map to create a "simulated" terrain generation without the extra lag that comes from the simulation. basicaly deep-faking heightmap "faces" onto the terrain.

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

      We, the people of Minecraft, will annihilate you and your supporters as heretics...

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

    That's quite incredible :) ! The complexity of what you're doing blows my mind away. I sure look forward to joining you on more coding adventures !

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

      Thanks Noa :)

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

      I just wish I could code on he's level.

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

      @@conan5743 practice, practice, practice, practice, practice, practice, practice and more practice...

    • @1234macro
      @1234macro 5 ปีที่แล้ว +31

      @@SeppahBaws Well, not practice. Research.

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

      @@1234macro Well, not only research. BOTH practice AND research!

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

    Sometimes TH-cam recommendations can take you to a magical place. Holy shit.

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

      Willmakk Tell me about it! I have never watched none of this kind of videos and now im like whaaaat this is so cool!

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

    4:15 looks better than almost any mountain I've seen in a game ever.

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

      While this is true, in many games terrain like this isn't very desirable, it's harder to limit traversal, this erosion by it's nature tends to create slopes that aren't that steep, and flat areas, authored terrain, while less natural, gives more freedom with how the designers want the player to navigate through it. There are often gameplay considerations on top of the art.

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

      @@DreadKyller A friend of mine made this mountain in Minecraft, what do you think of it?
      www.reddit.com/r/Minecraft/comments/gjnya5/a_mountainous_landscape_i_just_finished_today/

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

      @@DreadKyller I wonder if that's true. While this method changes the texture of the terrain a lot, it doesn't change the overall shape much. So the initial heightmap could be designed to specific design parameters before the procedural engine takes over.

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

      @@DreadKyller but this may a be a really good generator of an inacessible area that you'll simply see changing as a background

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

      @@DreadKyller It will be applicable in future's procgen games - games like NMS or Elite (not now, but when atmospheric planets are implemented) could use this heavily.

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

    2:40 "Which brace placement style do you use?"
    Sebastian: "All of them. At the same time!"

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

    Then you can implement things like "a surface with vegetation will erode less then a rock/soil surface", "vegetation doesn't grow above a certain altitude", implementing different hardness for the soil...

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

      yes ,......... the Algorithm also this factor considered.................................... while eroding (amount to erode) * p_factor...........at a point
      this p_factor vary from 0 to 1f
      - 0 means no_erosion(Like Rock)
      - 1 means complete erode

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

      @@oren7404 rocks definitely erode. Should be like 0.05 erosion on big vegetation, and 1 in high altitude rocks

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

      hey maby you could do that, the code is in the description :^)

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

      I'm not sure that vegetation slows down erosion in the real world. Real erosion of solid rock is mostly due to frost, so it tends to affect areas that are saturated with moisture. And the roots of plants can act like crowbars as they needle into rock fissures, pushing things apart.

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

      @@nagualdesign Vegetation definitely stabilise the soil, look it up.

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

    I hadn't realized how critical erosion was to proper-looking terrain until I saw the before and after images side-by-side. It was a big improvement. Well-done!

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

    Yes, yes, yes! Please do this with voxels! That was absolutely awesome!

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

    Hey Sebastian, I just saw you uploaded this video today and I wanted to say thanks for all your videos! I have been following some of your series (the blender animation; the procedurally generated terrain) and wow, I simply have not seen another TH-camr delve this deep into these Unity topics as far as you do. You explain everything very clearly, go at a very good pace, and the videos are just really good quality. This is the kind of stuff you would take an expensive class for, it's so good! Keep up the great videos!

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

      Thank you :)

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

      I completely agree, His work is simply inspiring and I love your procedural videos. Amazing work man! ❤

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

      agree, although I have finished the series yet, I found Seb's topics brings me the fundamental part of fun, interesting and challenge of coding to me.

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

    Magnificent. The result looked so natural, it was very satisfying.

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

    I'm a geologist learning programming as a hobby This is just the kind of inspiration I need. The after-simulation terrain looks so much more realistic. Very well done.

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

    I'm so incredibly impressed by your procedural renders. Please keep doing these in this format and at this length.

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

    this kind of stuff (hydraulic action, land formation, weathering, etc) really fascinates me, so it's awesome to see you simulate it and be able to adjust variables and time. Really cool XD

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

    Sebastian, what you're doing is absolutely amazing! That terrain looks incredible. As a passionate computer science student, you motivate me to try out new experiences like that more! Keep going you're amazing :)

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

    This is amazing, it looks so much more real. I never thought about it consciously, but mountains have always had a weird look to them, and that has to be why. I don't get out a ton, but every time we drive by the mountains, I see really similar patterns. It was immediately recognizable, I had to pause in awe. The before is vaguely recognizable too, as terrain I've seen in (especially older) games a lot. To think you can have it improve on it that much with just .75 of a second is amazing to me.

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

    So SO bloody cool!
    Your's and CodeParade's channels have never failed to blow my mind with programs time and time again.
    Keep it up!

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

    Super impressive Sebastian! Thank you so much for stepping through it for the benefit of us all. Really wonderful channel you've created here.

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

    Very cool stuff...way over my head on the calculations, but very interesting to hear how you came up with the solution. Thanks for sharing.

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

      That's the first thing to realize that most calculations already exist its just finding the right ones to meet your need that's the big task

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

    It's such a beautiful moment when we are getting more accurate with terrain generation.

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

    This is incredible. This is so incredible you have no idea. I'm so happy you're starting a new series just dedicated to *cool stuff*, really looking forward to it!

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

    Your video format is amazing. It feels engaging and I never felt bored. Do more of these please.

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

    Me: **has never coded in my life**
    Sebastian: **makes a tiny mistake**
    Me: Ah yes, a trivial mistake, I too have struggled with this

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

    Thats so cool. Finding a video on a random youtube streak that takes advantage of a paper produced at "your" university.

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

      That's what i just thought!

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

    This was fascinating. Beautiful results sir.
    Really loved the commentary and the included bugs/bloopers. Real shit.

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

    Wow, this was recommended to me by TH-cam and I'm stunned by how amazingly well this method worked. Great job!

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

    I cannot wait for the tectonic based voxel terrain. Cool video!

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

    ahh, it is so interesting that an untrained eye does not even recognize what is missing on the terrain before the water-simulation. But this texture that is being formed by your simulation makes it look vastly more realistic!

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

    I have literally never coded or watched a coding video but this was in my recommendations and I actually enjoyed it. Keep up the good work, and I look forward to seeing many more adventures with you!

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

    Oh man, your channel is awesome. I came across it today and cannot stop watching your videos. There are plenty of youtubers teaching programming or game development but what you are doing here is so explorative and so cool. Keep up the good work, genius!

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

    Voxels with different densities and cohesive stability (and color) could produce some spectacular terrains.

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

    Hey Sebastian ! Ive been watching your tutorials for quite a while now and now i just have to write this. Thank you so much for sharing your knowledge ! The things one can learn from you are beyond any value and tought in a very competend way. I spent some time following your tutorials about procedural mesh generation since i am working on a strategy game. I learned a lot from you and applied the stuff to unitys terrain system. After that i started to expand and alter the code and searched for ways to implement hydraulic errosion. Thou i found the paper you are referring to as well, seeing this now is just so awesome ! If of any interest, I changed the first noise octave to a ridged noise to get something more like mountain ranges, maybe that is interesting for someone.
    I have a question though ... is there a reason to use a mesh object instead of unitys terrain ?

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

      Thanks, happy my videos have helped you! Not really -- I used to dislike the terrain system, but apparently it's much better now. I should really take a look :P

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

    This is amazing! Thanks for the walk-through. I'm very impressed how you describe the concept thoroughly without making a video taking 40 minutes.

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

    Hey Sebastian, you contents are unique and your way of explaining things are just awesome. Thank you so much for your support. Learned a lot from you.

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

    You're a wizard Harry.
    Seriously though, I wonder how you manage to find the logic behind such cool-looking results. My brain doesn't even meet the minimum requirements to do half the work you did here. I think I'm gonna try the project you uploaded on your Github, it looks promising. Have fun with that project :)

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

    Another thing to consider in this is wind erosion. Climate, season, and weather manipulation could also add a lot of realism to this. Then use PhysX fluid simulations to find where rivers and lakes should be. Vegetation also adds to how terrain develops over time.
    It'd be cool if you could export all of this into a game engine, then make it to where the game engine itself can procedurally generate random terrain based on all of these factors.

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

    wow, this is incredible, I love the look of the finished result, can't wait to dig through your code

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

    One of the most underrated youtuber ever. You did high quality stuff since the begin. Thank you for that!

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

    3:33 lmao the magic of programming.

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

    I finally found a video where all the comments aren't memes or "Why did I get recommended this". Blessed

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

      Ill make sure to cross you off the Area 51 raid list...

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

      Why did I get recommended this?

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

      People who comment like you are part of the problem

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

    OMFG!! can't believe that youtube finally recommend me something like this! Was looking for this for the last two weeks!
    Thank you so much for being so thorough, and sharing the code!!

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

    Wow, that simulation did wonders for the terrain! I had no idea just how much of a difference a thing like this would make.

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

    How dare you to be so amazing!! Now you leave me no choice but to worship you and follow you channel!

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

    Now please apply this to your Procedural Planet series!!!

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

    This is amazing, both intriguing and straightforward. I would definitely like to see more of the Coding Adventure series in the future. Can't wait!

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

    This was really fascinating to watch! Looking forward to the rest of the series

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

    This would be a great candidate for compute shaders tutorial.

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

      Or it could be used to showcase Unity's new Burst compiler

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

      @@torginusTrue... overall, though. I think GPU would win if you scale the map to bigger size.

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

      @@mustafageo You would need to tweak the simulation a bit, but you could definitely get some great performance out of it.

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

      You got your wish haha

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

      @@brendankapp5237 Its time to implement my evil plan by the suggestion and learn from it :) I have a couple of projects that can incorporate compute shaders perfectly e.g. (th-cam.com/video/36kmJCELT0w/w-d-xo.html This example is on cpu). I learned most things a while back but didn't get to actually implementing things in my projects as I didn't have time. I was using 2D textures but I think I will switch to compute buffers as they are more flexible. Maybe I will try something in the next weekend and see how it goes :)

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

    You think we might not like it
    I JUST SUBSCRIBED, I LOVE THIS

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

    Wow, this is really amazing. Thanks for making these videos. They deserve a lot of attention

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

    Wouw, Sebastian you are quite an inspiration for me as a coder. I have been following your videos for a while now and you just keep doing baffling work. Your procedural world series got me through my thoughest assignment ever, and I couldn't be more grateful. And now this, this is just amazing. Your ability to use research and experience to create truly new and impressive work is astounding.

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

    That's really cool stuff, I've been looking into trying this myself at some point but I never got to it. There are a bunch of other erosion mechanics that can be implemented alongside this as well, to add further detail.
    Also, unrelated to the video really, but I saw in another comment that the animation on the intro was Delaunay Triangulation. I've been trying to understand how that crap works for a while now and I don't seem to get it; and all the videos on TH-cam about it either don't actually explain anything, or are awful attempts at it.... Could you make a video about it maybe? It'd be super useful for a lot of procedural mesh generation problems!

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

    "a series which is proberbly a lot less exciting than it sounds", are u joking, this is insane.

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

    Sebastian, your work is so inspiring. Well done, and please keep going.

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

    The results you got are just incredible! I'm now fully convinced that every terrain generator should have this.

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

    "Coding adventures isn't as exciting as it sounds, It is just a thing where I share my little projects"
    I watch these Coding adventures as if there my top 3 fav shows combined

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

    Store the paths of the water and use it in terrain colouring

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

      Great_
      x , y ...................... texture2D......................................Material.main_texture = texture2D;

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

      Add up the number of times that a precipiton has passed through each pixel. Use that information not only to determine the reduction in elevation, but also(perhaps in combination with local flatness/slope)a “wetness index” to feed into a vegetation algorithm.

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

    The complexity and depth of the topic and its research and implementation is just phenomenal. I needed to re-watch the video several times to fully understand it, but it's extremely interesting nonetheless. Looking forward to more coding adventures!

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

    Awesome video ! Great explaination, and I was really surprised to see how good the final terrain looks !

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

    Great Work..................was that Delauny_Triangulation at start of video

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

      Thanks! Yes it was.

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

      @@SebastianLague You should make a video about how it works, there are no real good explanations that I could find, that weren't either awful explanations, or so deeply technical I couldn't wrap my mind around them anyway. To see a walkthrough of an actual code implementation would be awesome!

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

      1 . set of random points
      2 . Triangulate them by Triangle_splitting_Algorithm...................
      3 .
      a . now loop through all Triangle .......... make a circle
      b . check if neighbour point to triangle is inside..........or............on && outside The circle
      c . Flip edges Accordingly _......................till none remains

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

    Is there a way i can get a heightmap back out of this program after its done eroding?

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

    Sebastian. I always find anything you do interesting, if not
    breathtaking. I just wish there were more of it. I know you do
    what you can.

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

    Beautiful work. These kinds of projects are very exciting.

  • @AB-pr4uc
    @AB-pr4uc 4 ปีที่แล้ว +3

    Also, could this hydraulic erosion be procedurally generated? Can the program make a high-def normal map, reduce the vertices for easier computing, and then project the normal map to give the illusion of a higher def terrain? Very curious...

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

    I'd be interested to see how this could be adapted to running parallel on the GPU.

    • @moth.monster
      @moth.monster 5 ปีที่แล้ว

      Unless erosion is a main game mechanic I don't think we need to worry about that.

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

      Would be intresting though, what kind of gameplay might involve interactive erosion?

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

      @@moth.monster
      maybe he works in a field that would benefit from this
      or maybe he wants to build a mountain house and he wants to try to find the best spot for it and generations to come
      the graphics card isn't all for games

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

      @@MyFilippo94 "From Dust". A modern version of "From Dust" in either sandbox, or game form would be perfect.

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

    exactly what i was just thinking of coding, i think first i will watch any tutorials i can find thanks for the share!
    amazing result and good work

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

    This was awesome! It makes such a transformation on the terrain that makes it more natural, more smoother where it should be. This is so difficult to achieve on 3d modelling in a natural way. Really incredible!

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

    “Potential pitfalls” 🙃

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

    Well… It's a good start! Your going to be limited to certain types of techniques though, if you stick with only using a height map. To get really realistic terrain, you'll need to move to volumetric pixels, or some way to simulate voxels. (You might be able to simulate voxels for the purpose of erosion, because the really relevant part of using voxels, is the exposed surface of the voxel terrain, because that's where the erosion is happening. So if you had multiple planes of different materials, with both a height map for depth, and a masking/clipping layer for presence, you have whatever is sticking up above the surface of the other layers, take the erosion, and effectively protect the layers below it.) You should also consider how plant life impacts erosion, because I happen to know that it has a very significant effect. A carpet of grass will dramatically slow soils from eroding, and plants can also contribute to eroding rock, if there are any cracks where roots can get into. And constantly flowing water will also make it hard for plant to grow, such as is the case with rivers and such. And consider that plants have a much harder time growing on different materials.
    You should look up some information on how the first plants and fungus got their start on this planet. There was apparently some type of organism that evolved to very, very, slowly, digest bare rock. And it would pile up, creating a foundation for the first stiff plants to grow in.

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

    There's no other place like your channel on the internet. Thanks for your work !

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

    What a great idea for a video format! I would be glad to see more like this

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

    The graphics looks like unity, there are unity files in your repository, and the manual says to open in unity... so why is the project a vscode project?

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

      feha92 you can make things for unity in vscode

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

      VSCode is just a fancy text editor. You can edit C# files in it

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

      @@bammam5988 old necro xD and yeah, I clearly had no idea how unity worked back then, figured it was an IDE.

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

    You are such an amazing game developer, programmer and content developer, Sebastian!
    Thank you so much for sharing all of these with us. It feel's so good to know i can come to your channel to get awesome tutorials with great practices.
    Also, it may sound a bit, silly? But even though i really like Unity, because i love programming, i'm very afraid of it hindering my progress as a programmer because it "does too much for me". But, thanks to you, i can remember that it just allows me to focus on other things, and not have to worry myself about some things like graphics (which is a fascinating area on its own!) and still come out with quite complex ideas.
    Thank you so much from Venezuela!

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

    Just the fact that the code is actually availible makes me so happy. You're great, I just want to play with erosion too now. Keep up the good work!

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

    You Sir, are a gentleman and a scholar. Thank you so much for all your work and the fact that you always give us the source code so we can learn how you did your stuff. I've been working on my game for 5 years and I must say without you there's no way I'd be this far.
    Thank you so much!

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

    your videos are always so inspiring and I always feel like experimenting with code after watching them! thank you!

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

    Very interesting actually! It's super cool to see stuff like this in action and just how possible and manageable it is

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

    It's like a prayer come true. I finished your land mass generator tutorial series only a week ago!

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

    Thank you forever for starting this series.

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

    dude thats pretty cool, keep up that Kind of projects, i enjoy whatching them develop

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

    This is so amazing and peaks my curiosity. Keep on doing what you do it's awesome!!

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

    Wow, +1 sub. I didn't know stuff like this were possible. I tried to get into map design years back and it was a lot of work to get anything decent so I stopped. After seeing this, I am getting inspired again. Keep up the good work

  • @julian.kollataj
    @julian.kollataj 5 ปีที่แล้ว

    Very cool! Both the erosion effect and fractal "e-scape" :) particularly liked the merging of the shapes!!

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

    I've been binging these since I got a better computer. These are awesome for personal projects, thanks Seb!

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

    Incredible video, Sebastian! Absolutely loved it!

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

    oh my god thats so fucking amazing. it honestly kinda motivates me to do things like that on my own as well. like, observe something on nature and try to recreate it in unity with some kind of algorithm that someone has published on a paper or something. i bet watching the end result working is the best feeling ever

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

    This is really awesome and beautiful. Always impressed by your work.

  • @LV-nm8ow
    @LV-nm8ow 4 ปีที่แล้ว +1

    This is really inspiring, thanks for sharing! Procedural approaches emulate nature best

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

    That's so cool! Every day I think Im getting better at programming and then I see this... What you do is incredible, and I hope I too will one day be able to do this kind of thing on my own.

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

    Thanks, once again, Sebastian for sharing your knowledge! I was thinking the other day about hydraulic erosion.

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

    Really effective and looks very realistic. Great work - keep it up.

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

    Excellent, educational and enjoyable. Great work Sebastian!

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

    Really love this series! Just found last night.

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

    when stuff gets broken down into steps like this it shows how simple things can be, it just takes the right kind of mindset to set out about setting up the steps. i need more vigilance. but you have inspired me

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

    This is awesome! I really liked the added sound effects

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

    Thank you for making this! I was working off of your tutorials and tried to take this next step but got overwhelmed

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

    Keep doing what you do, man. Very cool stuff.

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

    I really love all of your videos. I am not a coder so I can never experiment with what you made so I would really love if you made more videos off of all of your videos, with the ideas you have at the end.