Maybe other than just a height map, you also make a "hardness map" for how much erosion takes place
@alexthebassist23
5 жыл бұрын
That would be so cool, could get plateaus, vistas, plains etc!
@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
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
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
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..
@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
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
5 жыл бұрын
@@oren7404 rocks definitely erode. Should be like 0.05 erosion on big vegetation, and 1 in high altitude rocks
@MajorTommmm
5 жыл бұрын
hey maby you could do that, the code is in the description :^)
@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
5 жыл бұрын
@@nagualdesign Vegetation definitely stabilise the soil, look it up.
@MyDarkMe
5 жыл бұрын
Thats so cool. Finding a video on a random youtube streak that takes advantage of a paper produced at "your" university.
@Acrid93
5 жыл бұрын
That's what i just thought!
@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
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
@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
@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
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
@staudinga
5 жыл бұрын
Wow, this was recommended to me by KZitem and I'm stunned by how amazingly well this method worked. Great job!
@caspera3193
5 жыл бұрын
I cannot wait for the tectonic based voxel terrain. Cool video!
@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.
@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!
@JeremiahDunn
5 жыл бұрын
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.
@fatman9644
4 жыл бұрын
"a series which is proberbly a lot less exciting than it sounds", are u joking, this is insane.
@lightpixeldotnet
5 жыл бұрын
This was fascinating. Beautiful results sir. Really loved the commentary and the included bugs/bloopers. Real shit.
@darcksage1
5 жыл бұрын
3:33 lmao the magic of programming.
@elijahtommy7772
5 жыл бұрын
Wow this is actually pretty awesome, looks like real mountains with the ridges and everything.
@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.
@SimeonRadivoev
5 жыл бұрын
Store the paths of the water and use it in terrain colouring
@oren7404
5 жыл бұрын
Great_ x , y ...................... texture2D......................................Material.main_texture = texture2D;
@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.
@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!
@NickStagakis
5 жыл бұрын
Now please apply this to your Procedural Planet series!!!
@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.
@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 KZitem 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!
@Ne0mega
5 жыл бұрын
It's like a prayer come true. I finished your land mass generator tutorial series only a week ago!
@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.
@JoystickLab
5 жыл бұрын
This is the Best Unity tutorial channel in KZitem and probably the best tutorials among all over internet. Love yoi.😀
@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
@SteveAkaDarktimes
4 жыл бұрын
as a Geographer I find this approach very appealing, and the result is surprisingly accurate. it can be improved of course by incorporating hydraulic head(momentum works ok enough), different rock and soil erosion resistance, subsurface flows(voxels prbly) etc. however I assume you quickly run into diminishing returns in simulationist approach. lots of detail and effort for very little visual difference.
@JoelMartinez
5 жыл бұрын
Stunning results! The eroded terrain 100% evokes a more realistic feel ... I have a feeling that with a bit more work, this could be extended to reproduce not only every kind of terrain found here on earth, but in the solar system!
@OutbackCatgirl
Жыл бұрын
I'd love to see you try to simulate the meandering flow and changes to a river's path over time with static obstacles (representing manmade infrastructure) using soil deposition similar to the way that irl you can simulate chaotic rivers using a sloped table full of sand, a source and sink of water, and a variable amount of coarse and fine sand being added to the in-flow.
@nickhahn3276
4 жыл бұрын
Keep doing what you do, man. Very cool stuff.
@franknord4826
2 жыл бұрын
I went through literally the same bugs when doing my own terrain erosion experiments in Godot just two months after you released this video. Incidentally, multi-material voxel terrain was supposed to be my next thing, but my algorithm for building the mesh was so inefficient because I used random traversal over the voxel data that I never even got to implement erosion on it^^ By now my concept is to implement this in a Blender Addon for semi-procedural world creation, but I haven't gotten to work on that in like a year. :
@toxicc2962
5 жыл бұрын
The after picture looks like it was scanned after a real, snowy mountain omg.
@yeoldpepsi
5 жыл бұрын
that's awesome, imagine the kind of procedural maps that could be made with this kind of code :D
@julian.kollataj
5 жыл бұрын
Very cool! Both the erosion effect and fractal "e-scape" :) particularly liked the merging of the shapes!!
@gththcoc6010
3 жыл бұрын
Hi I just want to tell you that I'm a physicist who works in a really prestigious place, and that I'm impressed by how you make all these complicated(mathematically and physically) things come to life using unity, looks amazing
@flobbinhoodgames8117
5 жыл бұрын
Wow, the erosion really made the terrain look a lot more interesting!
@letsb3nameless665
2 жыл бұрын
looks like real mountains, super impressive!
@josephbloggs6455
5 жыл бұрын
Holy moley this actually looks like a photo from the Mars Rover. I am in awe.
@DominikCZ84
5 жыл бұрын
An improvement I would do is to run those drops simultaneously in batches and let them merge when they meet. That way you will get water flows which is something that is visibly missing - some areas are too smooth and flat while in nature channels and stream beds would form there. It is very nice nevertheless!
@dafoex
5 жыл бұрын
Blow that up big, chuck it into one of those hyper real game engines, and this will look so good! Even here it looks so real! Bonus points if you go into VR!
@glitchedjson4042
4 жыл бұрын
_A series which is a lot less exciting than it sounds_ proceeds to make the best series in all of youtube
@AmeshaSpentaArmaiti
5 жыл бұрын
This is the kind of terrain I image when people say procedurally generated. It's a shame most people stop at blending noise maps. This was a great video, I have a project to do now, thanks!
@florianmisof1988
5 жыл бұрын
dude thats pretty cool, keep up that Kind of projects, i enjoy whatching them develop
@JetSimon
4 жыл бұрын
Really love this series! Just found last night.
@rishimenon5632
5 жыл бұрын
This was really fascinating to watch! Looking forward to the rest of the series
@AustinAure
5 жыл бұрын
Jaw hits floor. That's incredible work mate
@m.i.c.h.o
Жыл бұрын
Easily one of the best creators on youtube
@Charles-ve2yy
4 жыл бұрын
Our man Hans coming in with the clutch.
@shanegrayson7068
5 жыл бұрын
This is awesome! I really liked the added sound effects
@KipIngram
11 ай бұрын
I've watched a bunch of your Adventures videos today, and every one of them is excellent. This is fascinating stuff. I'd really enjoy seeing more on how to actually make the GPU related elements of what you're doing work - I'm afraid that's an area that still seems awfully opaque to me. I'm really interested in numerical/simulation type work, and here I am not really able to use the most powerful number crunching resource I've got.
@bur1t0
5 жыл бұрын
So I would encourage you to keep the original heightmap in the background, so that you can determine the locations and depth of the sediment. IRL, the mountains would be some sort of rock, which would not promote plant growth (or only certain hardy plant growth) and the sediment that collects in the valleys and floodplains would be richer (containing more water soluble minerals) and promote more plant growth.
@elijahbachrach6579
2 жыл бұрын
Still eagerly waiting for that plate tectonics simulation.
@DanielPBullis
2 жыл бұрын
It would be cool to try another experiment where the terrain is comprised of a bunch of compressed rocks rather than a terrain mesh; then the water droplets could flow over the surface in some cases, or flow down in between the rocks in other cases. I think you could end up with scenarios where entire rock chunks break away from the mountain, or gaps in between rocks get wider as water carries sediment away between them.
@btCharlie_
5 жыл бұрын
Omg that final terrain looks amazing
@snootspoup6039
5 жыл бұрын
This is so amazing and peaks my curiosity. Keep on doing what you do it's awesome!!
@zombieguy
5 жыл бұрын
Very nice result, really makes it look like proper terrain.
@MrSaliVader
5 жыл бұрын
This is awesome, it looks so real after the simulation
@TheRainHarvester
5 жыл бұрын
There was a program in the 90s that generated terrain like this. Took forever to render on a 386pc. I started making some particle simulators on my channel...
@TheRainHarvester
5 жыл бұрын
Here's a link: kzitem.info/news/bejne/qmyYrqSAa3mHY44
@Pi7on
5 жыл бұрын
Amazing video. I wish there was more content like this on YT
@polares8187
5 жыл бұрын
Wow. This is awesome. That terrain looked beautiful. Also you have a nice voice.
@Acrid93
5 жыл бұрын
Sebastian, you should sell the script for this on the Unity Asset store- it's an extremely powerful tool!
@shroomy__rxcks
5 жыл бұрын
YES
@konignickerchen7265
4 жыл бұрын
If you used a normalmap instead of a heightmap you could calculate the direction of the droplet much easier simply by referencing the color of the texture at the location.
@barmetler
4 жыл бұрын
This Theo guy is cool, I'm in an online lecture with him right now
@ZeroSleap
5 жыл бұрын
I'm on board.I wanted to make a hydrological simulator, cause im a geology student.And this is exactly that.Nice!
@JackAnderson-vv3tw
5 жыл бұрын
That drumroll followed by the error destroyed my lungs
@coltond563
5 жыл бұрын
Awesome! the results are great! This is really similar to a program called worldmachine actually, maybe take a look because there are other types of effects that you can apply to the terrain other than erosion.
@classicguy7813
4 жыл бұрын
Your voice is like having been propeosed for a date of then you rejected it like hey we are just friends
@Dieterbe
4 жыл бұрын
Sebastian thanks for your interesting videos !
@sinefinehabitarevolo
5 жыл бұрын
Wow this is just mindblowing
@agg4000
5 жыл бұрын
You can pressure Ctrl-d to select more instances of the same variable name, rather than mouse clicking them all manually. It's kind of the best feature of Sublime Text
@lickow3820
2 жыл бұрын
bro this looks like transision from in game map and real life map cuz damn it looks realistic
@chemicalvamp
5 жыл бұрын
Wow thats a very nice result!
@merseyviking
5 жыл бұрын
A more complex and realistic option would be to have a bunch of droplets running in parallel so they interact with each other. You might get deeper channels (that is the word you were searching for!) and more complex confluences and so on. Couple that with different types of rock, and it could look fantastic. It might be hard simulating other geomorphological processes such as shifting and folding without using a voxel system.
@XtrimUniverse
5 жыл бұрын
Damm !!! This was out of world !! Brilliant !!!
@paulusul
5 жыл бұрын
amazing, thank you so much for sharing!! every time I see a video of yours I restart my terrain project :D
@tristanmoller9498
Жыл бұрын
I study at TUM! (Where the paper is from!). You are the reason, why I think it actually makes sense to write a paper at all besides for getting a bachelors degree. You never know, what problems people might face. (Even though Elon Musk said most papers are useless)
@DanielHatchman
2 жыл бұрын
I'd love to see this on your spherical globe map! ❤❤🤯
@ilyamoto
5 жыл бұрын
Awesome! Just what I was looking for. Thanks for sharing.
@uva1312
5 жыл бұрын
Truly magnificent. Keep up the great work.
@iAmTheSquidThing
5 жыл бұрын
It might be interesting to multiply the evaporation by the direction of sun and prevailing wind.
@HurriO4
5 жыл бұрын
Very interesting stuff with great looking results! I think it should be possible to expand this system to generate glaciers between the mountains (where the altitude is high enough). Saving the height of the snow/ice into an extra layer could allow to let it melt away again when a temperature variable goes up (without "melting" the rock of the mountains). At the same time this process could be used to simulate how fast the ice melts at which positions (since it cools its surroundings so it thaws faster at the edges/ where the layer is thinner). And (probably most importantly) the ice could be used to simulate very slow drops of water but with a much larger sediment carrying capacity (depending on the height of the ice layer), allowing the glacier to carve deep paths into the mountain over time! :D Adding another texture layer in the shader should be easy enough (to actually draw the glacier). And changing the shader to be able to use GPU Instancing should allow for much larger terrains because of the performance benefits (only have a single flat square mesh which you draw for every square meter and only set the height values and texture weights in the shader which is insanely fast).
@AngeloGreene
4 жыл бұрын
Love these videos man
@Jmcgee1125
5 жыл бұрын
Really interesting. Nice work.
@nomtijorti
5 жыл бұрын
I've said it before and I'll say it again. You're a fucking genius!
@danidini4444
5 жыл бұрын
Awesome series keep it up!
@TeeDubzz
5 жыл бұрын
Adding an erosion resistance (ie. for rocks vs sediment) so erosion will be uneven on some surfaces could also be cool
@HappoApina
5 жыл бұрын
Don't know a thing about coding, but the simulation was really cool!
@lit3plumber12
5 жыл бұрын
I'm not too sure how other game devs model their maps, but simulating actual physics sounds much cooler (and practical) than drawing the maps out by hand one by one.
@IdgaradLyracant
5 жыл бұрын
You should try a wind erosion pass also.
@smakkacowtherealone
3 жыл бұрын
Please do a voxel version, that would be so cool!
@budzikt
5 жыл бұрын
your channel is gold.
@BDSmithTrucking
3 жыл бұрын
I notice you hit play to run this. Is it possible to add a "generate" button instead so that you can save the map? I'm sorry I'm fairly new to all this, but I know you can add an inspector button to run things. I find natural looking mountains hard to create. I did just pick up Gaia pro on black friday, but still, it'd be nice if i could make some "blob" mountains and then run this script and then save the result.
@pythooonuser2233
5 жыл бұрын
Very cool results there! And a very good video as always. I'm amazed how fast your algorithm runs. Is the 70k threshold for the water droplets based on some equilibrium or just based on testing for giving best results compared to performance?
@robertkolb2288
5 жыл бұрын
This seriously needs to be implemented into a game like Cities Skylines or Sim City... or every game with an open world.
@roguelock7125
5 жыл бұрын
This is a simple simulation, games like Skyrim or fallout wouldn’t hardly run if erosion took place. Maybe some day it could be implemented into open world games but the technology just isn’t there yet
@phillyg3448
5 жыл бұрын
Wow! Super interesting project!! Thanks for sharing!!
@Beaver314
5 жыл бұрын
you are so much smarter than i'll ever be... i dont even know anything about coding, why am i watching this
@r_pasta2228
5 жыл бұрын
This one's awesome and the terrain looks super realistic. Keep up this awesome work. Hey could you also make videos explaining in more detail the work you do. And how did you start learning this in the first place. That would be great to watch.
@rolithesecond
5 жыл бұрын
this is pretty interesting, would like to see different materials and their behaviours implemented as well :D
@sataniccrow82
4 жыл бұрын
amazing as usual, you made me laugh as well. keep going with this kind of contents.
Пікірлер: 1,1 М.