No video

Coding Adventure: Hydraulic Erosion

  Рет қаралды 890,704

Sebastian Lague

Sebastian Lague

Күн бұрын

Пікірлер: 1 100
@bjarnes.4423
@bjarnes.4423 5 жыл бұрын
Maybe other than just a height map, you also make a "hardness map" for how much erosion takes place
@alexthebassist23
@alexthebassist23 5 жыл бұрын
That would be so cool, could get plateaus, vistas, plains etc!
@TheLeontheking
@TheLeontheking 5 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@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..
@Henrix1998
@Henrix1998 5 жыл бұрын
The terrain looks absolutely awesome after the simulation
@Cat-vp8vt
@Cat-vp8vt 3 жыл бұрын
Ikr?
@jubite9565
@jubite9565 11 ай бұрын
@@porsellaAh yes, as we know, realism = aesthetics, almost like you didn’t take a single art class in school
@timonix2
@timonix2 7 ай бұрын
@@jubite9565 What is this comment even? ofcourse realism = aesthetics. we life in a world full of beauty after all
@jubite9565
@jubite9565 6 ай бұрын
@@timonix2 Realism does not equal aesthetics. One google search.
@supercomputer276
@supercomputer276 5 жыл бұрын
"multiplied by the wrong variable" *nod nod* Definitely a programmer.
@pieflower6419
@pieflower6419 5 жыл бұрын
I get it? Don't you?
@anandsuralkar2947
@anandsuralkar2947 5 жыл бұрын
Lol
@SilasC
@SilasC 4 жыл бұрын
How do you do that?
@RoxOn413
@RoxOn413 4 жыл бұрын
@@SilasC 1 asterisk on each side of the word or phrase
@darkthunder301
@darkthunder301 4 жыл бұрын
You either feel like you downed 5 bottles of nyquil, or 5 cans of red bull. There are no in betweens.
@Blackthornprod
@Blackthornprod 5 жыл бұрын
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 жыл бұрын
Thanks Noa :)
@conan5743
@conan5743 5 жыл бұрын
I just wish I could code on he's level.
@SeppahBaws
@SeppahBaws 5 жыл бұрын
@@conan5743 practice, practice, practice, practice, practice, practice, practice and more practice...
@1234macro
@1234macro 5 жыл бұрын
@@SeppahBaws Well, not practice. Research.
@tiskolin
@tiskolin 5 жыл бұрын
@@1234macro Well, not only research. BOTH practice AND research!
@mfaizsyahmi
@mfaizsyahmi 5 жыл бұрын
One day, geologically accurate Minecraft terrain generation would be a reality.
@Akab
@Akab 5 жыл бұрын
...jay?... i guess?
@Ironbuket
@Ironbuket 5 жыл бұрын
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 5 жыл бұрын
Yeah, its called Dwarf Fortress XD
@noahmarchais804
@noahmarchais804 5 жыл бұрын
@@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 5 жыл бұрын
We, the people of Minecraft, will annihilate you and your supporters as heretics...
@willmakk
@willmakk 5 жыл бұрын
Sometimes KZbin recommendations can take you to a magical place. Holy shit.
@Jamboraama
@Jamboraama 5 жыл бұрын
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 5 жыл бұрын
4:15 looks better than almost any mountain I've seen in a game ever.
@DreadKyller
@DreadKyller 4 жыл бұрын
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 жыл бұрын
@@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 4 жыл бұрын
@@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 4 жыл бұрын
@@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 жыл бұрын
@@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.
@castortoutnu
@castortoutnu 5 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@oren7404 rocks definitely erode. Should be like 0.05 erosion on big vegetation, and 1 in high altitude rocks
@MajorTommmm
@MajorTommmm 5 жыл бұрын
hey maby you could do that, the code is in the description :^)
@nagualdesign
@nagualdesign 5 жыл бұрын
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 жыл бұрын
@@nagualdesign Vegetation definitely stabilise the soil, look it up.
@ThePlacehole
@ThePlacehole 5 жыл бұрын
2:40 "Which brace placement style do you use?" Sebastian: "All of them. At the same time!"
@usualunusualkid7149
@usualunusualkid7149 3 жыл бұрын
@Sushifu ?
@usualunusualkid7149
@usualunusualkid7149 3 жыл бұрын
@Sushifu what do you mean? I didn't get the joke.
@mvmlego1212
@mvmlego1212 3 жыл бұрын
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 жыл бұрын
Yes, yes, yes! Please do this with voxels! That was absolutely awesome!
@alicepersson9568
@alicepersson9568 4 жыл бұрын
Me: **has never coded in my life** Sebastian: **makes a tiny mistake** Me: Ah yes, a trivial mistake, I too have struggled with this
@dmitri8117
@dmitri8117 5 жыл бұрын
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 KZbinr 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 жыл бұрын
Thank you :)
@T0xIcNigHtMarE
@T0xIcNigHtMarE 5 жыл бұрын
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.
@dawsonhampton5949
@dawsonhampton5949 5 ай бұрын
"Welcome to Coding Adventures, a series which is probably a lot less exciting than it sounds." That is most definitely not true!
@Banaannaa
@Banaannaa 2 ай бұрын
agreed
@user-nj1qc7uc9c
@user-nj1qc7uc9c 3 жыл бұрын
0:03 it is a lot more exciting than it sounds, hence why im rewatching all your videos instead of studying
@dinkledankle
@dinkledankle 5 жыл бұрын
Magnificent. The result looked so natural, it was very satisfying.
@fywq1649
@fywq1649 4 жыл бұрын
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.
@CamperJohn
@CamperJohn 5 жыл бұрын
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 жыл бұрын
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 5 жыл бұрын
It's such a beautiful moment when we are getting more accurate with terrain generation.
@imRelaxHD
@imRelaxHD 5 жыл бұрын
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 :)
@MyDarkMe
@MyDarkMe 5 жыл бұрын
Thats so cool. Finding a video on a random youtube streak that takes advantage of a paper produced at "your" university.
@Acrid93
@Acrid93 5 жыл бұрын
That's what i just thought!
@charlesallensworth4384
@charlesallensworth4384 5 жыл бұрын
Voxels with different densities and cohesive stability (and color) could produce some spectacular terrains.
@badgoy8439
@badgoy8439 5 жыл бұрын
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
@andershusmo5235
@andershusmo5235 5 жыл бұрын
Wow, that simulation did wonders for the terrain! I had no idea just how much of a difference a thing like this would make.
@Aeroxima
@Aeroxima 5 жыл бұрын
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.
@projectb6573
@projectb6573 Жыл бұрын
i have watched this video tens of times and i still love it
@TheLeontheking
@TheLeontheking 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!
@geronimoushendrix4762
@geronimoushendrix4762 2 жыл бұрын
I really love this project. The difference between the raw model and when it was simulated was so big. It looks so much more realistic. Imagine that he would add generated trees and snow, and added a hightboundary for the grass.
@Plapp_
@Plapp_ 5 жыл бұрын
You think we might not like it I JUST SUBSCRIBED, I LOVE THIS
@mimikal7548
@mimikal7548 5 жыл бұрын
This is astounding and yet not that complex... and generating random terrain with the different resolutions of noise is ingenious! I'm going to try this myself and see if I can do anything else with it...
@bur1t0
@bur1t0 5 жыл бұрын
It's called "Perlin Noise", named after Ken Perlin. It's also worth looking into Simplex Noise, which avoids some of the limitations of Perlin Noise, can be faster to calculate, produces better results, and is not patent encumbered (Ken Perlin patented his method, although I think the patent has expired by now).
@emototheextremo5571
@emototheextremo5571 5 жыл бұрын
I finally found a video where all the comments aren't memes or "Why did I get recommended this". Blessed
@noahmarchais804
@noahmarchais804 5 жыл бұрын
Ill make sure to cross you off the Area 51 raid list...
@apersononlineyes6554
@apersononlineyes6554 4 жыл бұрын
Why did I get recommended this?
@Roaxial
@Roaxial 4 жыл бұрын
People who comment like you are part of the problem
@anthonyrepetto3474
@anthonyrepetto3474 4 жыл бұрын
Another helpful factor: during inundation, because MANY droplets are falling simultaneously, they merge and form a coherent LARGE channel, which will give your mountain ridges more varied, fractal distribution of ripples, instead of the 'straight hair' look that the current method produces. You'll be able to tell the difference when you look carefully at the pattern of flow - your current model produces numerous parallel small channels, while actual mountains produce 'fronds' that merge into larger streams and rivers.
@mustafageo
@mustafageo 5 жыл бұрын
This would be a great candidate for compute shaders tutorial.
@torginus
@torginus 5 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@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. (kzbin.info/www/bejne/aWfOnn15erGHZtk 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 :)
@ezequielblanco8659
@ezequielblanco8659 5 жыл бұрын
This looks awesome! It reminds me of someone who created an application that not only generates terrain, but also speculates where rivers would form, where people would establish settlements, which settlements would grow into bigger cities, what path would become roads and even added a name generator with some very complex linguistic rules.
@ezequielblanco8659
@ezequielblanco8659 5 жыл бұрын
mewo2.com/notes/terrain/
@xaytana
@xaytana 5 жыл бұрын
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.
@sparrowsion
@sparrowsion 4 жыл бұрын
Just tried integrating the terrain compute shader from this with the infinite terrain generator from an earlier series (still sad that eps22+ of that were never made). It looks like, if you've got a bunch of terrain chunks to calculate, it's quicker to do CPU calculations parallelised across multiple threads than sequential ComputeShader calculations (which have to be called from the main thread). Also, just a big thumbs up to all of these tutorials. As someone with 20+years professional coding who picked up C# and game writing barely a year ago, I find far too many Unity tutorials assume you know all about game dev and nothing about coding, or nothing about either and don't want to be bothered with code. Sebastian's work pretty much hits the right balance for me.
@caspera3193
@caspera3193 5 жыл бұрын
I cannot wait for the tectonic based voxel terrain. Cool video!
@potatopassingby
@potatopassingby 5 жыл бұрын
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
@darcksage1
@darcksage1 5 жыл бұрын
3:33 lmao the magic of programming.
@matheusviniciusdemoraes9420
@matheusviniciusdemoraes9420 10 ай бұрын
THIS IS SOOO INCREDIBLE these maps reminds me of a dear ps1 game of mine, Front Mission 2
@fatman9644
@fatman9644 4 жыл бұрын
"a series which is proberbly a lot less exciting than it sounds", are u joking, this is insane.
@nilstrieb
@nilstrieb 4 жыл бұрын
The mountain looks extremly realistic! Imagine this model with realistic textures and lightning!
@pepsi_or_orange_juice
@pepsi_or_orange_juice 3 жыл бұрын
"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
@Allplussomeminus
@Allplussomeminus 5 жыл бұрын
Truly a cornerstone of Unity. You, my good sir, are a pillar.
@LuukeFX
@LuukeFX 5 жыл бұрын
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 жыл бұрын
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
@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!
@jjjames4484
@jjjames4484 5 жыл бұрын
How dare you to be so amazing!! Now you leave me no choice but to worship you and follow you channel!
@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
@quasar4780
@quasar4780 5 жыл бұрын
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 :)
@a_ghoul
@a_ghoul 2 жыл бұрын
I am doing my senior capstone on generating realistic terrain but unfourtunetly I had such little time to actually work on it. This is so much cooler than anything I have ever done and am now feeling jealous. Nice job hahah
@SimeonRadivoev
@SimeonRadivoev 5 жыл бұрын
Store the paths of the water and use it in terrain colouring
@oren7404
@oren7404 5 жыл бұрын
Great_ x , y ...................... texture2D......................................Material.main_texture = texture2D;
@ColinPaddock
@ColinPaddock 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.
@Colgruv
@Colgruv 3 жыл бұрын
Ugh! You solved this problem way better than I did. I'm gonna adjust my solution, then work on perfecting my method for generating rivers: - Store a copy of the initial terrain heightmap and shift all points downward 1-2 meters, give it a water texture - Each time a droplet flow direction is generated, add it to a normalized flow field map - Use the flow field map to create a dynamic scrolling texture shader for the water terrain The parts of the original terrain that were impacted the most by the erosion process should reveal "holes" where the water terrain pokes through, and that terrain should show the water moving downhill.
@NickStagakis
@NickStagakis 5 жыл бұрын
Now please apply this to your Procedural Planet series!!!
@DreadKyller
@DreadKyller 4 жыл бұрын
I've never seen Hydraulic Erosion done like this, one droplet at a time. It's almost always done with a water map, where you start wit the water map randomly filled and then iterate over the whole map, letting the water flow from higher terrain with higher levels into terrain with lower combined height and water content. Each tick a sediment map has it's value increased by a number depending on the current saturation of the water which is calculated using the amount of water in the cell vs the amount of sediment. When you transfer water between cells you transfer a relative percentage of sediment, leaving behind some sediment, for example if 20% of the water moves to a neighboring cell, only move maybe 15% of the sediment, which increases the saturation in the cell it came from. After every tick of moving the water, do a pass where you remove a small amount of water from each cell while not changing the sediment levels, increasing the saturation and essentially simulating evaporation. Periodically add more water to cells. Repeat this for a number of iterations. One iteration can start before the previous one finishes as well, just make sure more water evaporated in that time than you add back to it, otherwise you'll end up flooded. To get fancy you can change the amount of sediment carried by the distance between the two cells, so that steeper slopes carry sediment faster, and make flat slopes deposit sediment slower. This takes more work per iteration but less iterations, a couple hundred iterations and you'll have similar results, potentially less depending how well your settings are balanced. Nonetheless this is interesting, but where the process above takes the same number of iterations no matter the size (but increases the time per iteration), versus single droplets which would require far more iterations for larger resolution maps, changing the scale of the map doesn't change the settings required to get the same results, and ensures a more even distribution because the process ensures everywhere will be touched by water to some extent, while it's possible for random chance to completely ignore a section when working on individual droplets.
@World_Theory
@World_Theory 5 жыл бұрын
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.
@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
@Mythricia1988
@Mythricia1988 5 жыл бұрын
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 KZbin 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!
@IAmMadMattDog
@IAmMadMattDog 5 жыл бұрын
As someone with no more than a basic understanding of programming this video was really well presented and easy to follow. I was able to grasp the concept and the results were fantastic to watch happen, it was pretty entertaining.
@BurdLunkhurd
@BurdLunkhurd 5 жыл бұрын
Is there a way i can get a heightmap back out of this program after its done eroding?
@soejrd24978
@soejrd24978 9 ай бұрын
Still one of the best gamedev video's out there. This is amazing!
@AB-pr4uc
@AB-pr4uc 5 жыл бұрын
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...
@ScientObject40
@ScientObject40 2 жыл бұрын
Thank you forever for starting this series.
@feha92
@feha92 5 жыл бұрын
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 5 жыл бұрын
feha92 you can make things for unity in vscode
@bammam5988
@bammam5988 3 жыл бұрын
VSCode is just a fancy text editor. You can edit C# files in it
@feha92
@feha92 3 жыл бұрын
@@bammam5988 old necro xD and yeah, I clearly had no idea how unity worked back then, figured it was an IDE.
@gelerson1642
@gelerson1642 5 жыл бұрын
I'm so incredibly impressed by your procedural renders. Please keep doing these in this format and at this length.
@oren7404
@oren7404 5 жыл бұрын
Great Work..................was that Delauny_Triangulation at start of video
@SebastianLague
@SebastianLague 5 жыл бұрын
Thanks! Yes it was.
@Mythricia1988
@Mythricia1988 5 жыл бұрын
@@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
@staudinga
@staudinga 5 жыл бұрын
Wow, this was recommended to me by KZbin and I'm stunned by how amazingly well this method worked. Great job!
@SirNightmareFuel
@SirNightmareFuel 5 жыл бұрын
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.
@genisguillem
@genisguillem 3 жыл бұрын
The image in 4:18 just blew my mind. Amazing video. I must learn Unity now, I want to replicate this.
@CHICKSTER118
@CHICKSTER118 5 жыл бұрын
“Potential pitfalls” 🙃
@starlorddab6414
@starlorddab6414 5 жыл бұрын
Potentially literal pitfalls xd
@bismajoyosumarto1237
@bismajoyosumarto1237 4 жыл бұрын
Haha yeah, 2:07
@seyeruoynepotsuj
@seyeruoynepotsuj 5 жыл бұрын
I'm an earth scientist who works alot with real lie height maps and mapping software, so this kind of video fascinates me - though I know very little about coding.
@Luuuuuuuuuuuuuuuu
@Luuuuuuuuuuuuuuuu 5 жыл бұрын
You can apply the stream power law function on the mesh, rather than via particles. There can be some numerical diffusion, but it gets applied evenly to the whole domain, rather than where a random particle starts and ends
@elijahtommy7772
@elijahtommy7772 5 жыл бұрын
Wow this is actually pretty awesome, looks like real mountains with the ridges and everything.
@CrazyTayo
@CrazyTayo 2 жыл бұрын
Thanks for blowing my mind. Looks like I need to embark on a coding adventure of my own now.
@iivin4233
@iivin4233 8 ай бұрын
There are so many things that could influence your pre-rain terrain: astral bombardment, wind, waves. Honestly, I don't know if there ever was a period in Earth's history, other than when Earth was still molten and coalescing, when rain did not coexist with all the other forces acting on terrain. I hope that isn't overwhelming. I'd enjoy watching this project continue.
@tyguy104
@tyguy104 10 ай бұрын
I've got the modulo operator in Scratch. And that's all I need. I mean, I can now zoom into the matrices and submatrices of the grid world. With modulo, you can make 4X3 grids, or 8X6 grids, and you know? And you can also make them go into the neighboring tiles of the sub-matrix that you're in at the time, with the camera. The coding for this is tedious, so I can see why amateurs don't do it. However, it is cool and it is all through modulo for a grid within a larger grid.
@michaeldemanche4162
@michaeldemanche4162 2 жыл бұрын
Another factor which effects how rocks erode which other commenters haven't mentioned is (an)isotropy. Rocks typically form with a non-uniform fracture orientation based on the stress environment during the formation of those fractures. So rocks in a certain mountain range might be more likely to fracture along non-uniformly oriented planes. I don't know the coding side of it, but I think something in that direction could add a certain "naturalness" to the appearance of the landscape.
@JeremiahDunn
@JeremiahDunn 4 жыл бұрын
I actually wrote my thesis on something very similar, it was an interactive terrain simulation. I completed it the same time as the referenced paper, I think everyone must have had the procedural terrain bug from watching the No Man's Sky trailers. It was a combination of several different systems, a simple vegetation model, a heightmap-based water simulation with an erosion and deposition model, a soil slippage model and a simple weather model. Definitely something I need to revisit.
@thegeigercounter27
@thegeigercounter27 6 ай бұрын
the start of an era
@creativebeetle
@creativebeetle 5 жыл бұрын
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!
@Magnogen
@Magnogen 3 жыл бұрын
I've been binging these since I got a better computer. These are awesome for personal projects, thanks Seb!
@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!
@vinicius.maciel
@vinicius.maciel 2 жыл бұрын
that's incredible. the terrain is amazing after the erosion
@vinotinto8547
@vinotinto8547 5 жыл бұрын
There's no other place like your channel on the internet. Thanks for your work !
@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!!
@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.
@LV-nm8ow
@LV-nm8ow 5 жыл бұрын
This is really inspiring, thanks for sharing! Procedural approaches emulate nature best
@CutcliffePaul
@CutcliffePaul 3 жыл бұрын
I love these videos - especially the "So I pressed Run and sat back but then this happened..." bits! 😁
@Scarletraven87
@Scarletraven87 5 жыл бұрын
SMOOOOTH valleys with rocky shapes emerging in the right spots. 9/10
@lightpixeldotnet
@lightpixeldotnet 5 жыл бұрын
This was fascinating. Beautiful results sir. Really loved the commentary and the included bugs/bloopers. Real shit.
@DesertCookie
@DesertCookie 5 жыл бұрын
The results you got are just incredible! I'm now fully convinced that every terrain generator should have this.
@Sartious
@Sartious 3 жыл бұрын
all of this takes me back to Bryce, Vue, and Terragen. Very cool!
@blockybeggar6423
@blockybeggar6423 2 жыл бұрын
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.
@morgan1719
@morgan1719 5 ай бұрын
High altitude peaks don't get rain. The reason mountains don't turn into giant spikes is because temperature changes at high altitude do the major work in mechanically breaking the rock apart, while wind and moisture also play a part (especially water seeping into cracks and freezing, then gravity brings down all the fractured bits. Where trees begin, you also get a lot of rain, but roots and animals also get involved. You can be sure that temperature's mechanical action is the main driver of peak destruction because no peaks are rounded by the gentle polishing of wind and water, rather they and all the rocks that fall from them are jagged.
@EricDaily
@EricDaily 5 жыл бұрын
Super impressive Sebastian! Thank you so much for stepping through it for the benefit of us all. Really wonderful channel you've created here.
@spacehooliganzack7429
@spacehooliganzack7429 5 жыл бұрын
The very biggest thing that you could do to make the results of this look even more amazing would be to implement a treeline where grass either stops growing, or grows much less densely above that line. Awesome project though!
@mequedo
@mequedo 5 жыл бұрын
Very convincing shapes, looks very real.
@WonderVidose
@WonderVidose 5 жыл бұрын
This would be amazing for a game taking place in 99 in game days change the terrain dynamically and allowing the player to see the world change
@pe1900
@pe1900 3 жыл бұрын
0:03 "...a lot less exciting than it sounds" oh my friend it is MORE exciting you are so good
@zexcedes5236
@zexcedes5236 3 жыл бұрын
Sebastian is going to use all these coding adventures to make a real life/full dive simulation. It has begun
Coding Adventure: Procedural Moons and Planets
22:48
Sebastian Lague
Рет қаралды 1,7 МЛН
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 363 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 7 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 47 МЛН
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,7 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
Coding Adventure: Ant and Slime Simulations
17:54
Sebastian Lague
Рет қаралды 1,9 МЛН
Coding Adventure: Solar System
12:12
Sebastian Lague
Рет қаралды 853 М.
Coding Adventure: Clouds
12:50
Sebastian Lague
Рет қаралды 1,2 МЛН
Electromagnetic Aircraft Launcher
15:09
Tom Stanton
Рет қаралды 744 М.
Coding Adventure: Terraforming
22:23
Sebastian Lague
Рет қаралды 1,4 МЛН
I Spent a Week Making an AI's Video Game Idea
17:51
Sebastian Lague
Рет қаралды 3,2 МЛН
Coding Adventure: Atmosphere
22:00
Sebastian Lague
Рет қаралды 1,1 МЛН
Coding Adventure: Marching Cubes
6:18
Sebastian Lague
Рет қаралды 1 МЛН
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,8 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 7 МЛН