Realtime Hydraulic Erosion

Поділитися
Вставка
  • Опубліковано 28 сер 2023
  • I wrote this is implementation of 2D fluid displacement and sediment transport model to simulate hydraulic erosion of soil. The implementation is fully in the GPU and can be used both in a tool to assist on terrain creation or as a realtime game feature where erosion is a mechanic, just like from dust :3. It was a really fun and quick personal project.
    I mainly used this paper as reference inria.hal.science/inria-00402... , but I added my own twist, instead of using advection for sediment transport as the authors proposed, I took a lift on the fluid dispalcement model and used it to estimate the sediment offsets. I didn't do any thorough testing but the results seem more accurate and run faster than the original idea :D
    I also wrote all the shaders and lighting to make it look super cool! It's all PBR and the water reflections are realtime raytraced. It runs quite well on pc.

КОМЕНТАРІ • 9

  • @Dent42
    @Dent42 3 місяці тому +2

    This seems a lot faster than real-time erosion…

  • @janmroz348
    @janmroz348 3 місяці тому

    Nice!

  • @mtk2productions143
    @mtk2productions143 Місяць тому +1

    Awesome video. Do you have the source code for the project?

  • @highonair3695
    @highonair3695 3 місяці тому

    So somebody does remember From Dust!!! Ohh how I have to play that game again. Got your video recommended because I'm playing around with my own terrain generator atm and some kind of erosion estimation or actual simulation is next on the menu.
    Your project looks super cool! Love the water look. I'm also surprised how fast you are able to run that! Are you on a latest high end gpu or is your implementation just that good?

    • @yvancezarinofernandes5508
      @yvancezarinofernandes5508  3 місяці тому

      Yesss! The game is a masterpiece :D
      The simulation itself is really fast and quite accurate, doesn't really need a powerful GPU to run and its very easy to scale up and down. Can also easily run on mobile hardware. Most of the computation happening there is just to make the raymarched reflections on the water hahaha.
      Note that this technique for terrain generation is dense, so it won't scale indefinitely, particle based techniques are usually slower but can be done sparsely if needed.

    • @highonair3695
      @highonair3695 Місяць тому

      @@yvancezarinofernandes5508 Nice! Would you be kind and share the code? Do you have any repo for it? Would love to see what shader magic you were able to come up with for it!

    • @highonair3695
      @highonair3695 Місяць тому

      @@yvancezarinofernandes5508 Nice! Would you be kind and share what you did for the water? Do you have some repo for it? I would love to see what kind of magic you did for the erosion to run so well! Great work.

    • @yvancezarinofernandes5508
      @yvancezarinofernandes5508  Місяць тому +1

      @@highonair3695 Not yet, but I plan on making the repository public under GPL3 when I have some time to come back to it clean up the code and add some proper documentation to it :D

    • @highonair3695
      @highonair3695 Місяць тому

      @@yvancezarinofernandes5508 Got you! Just feel like there's a bunch of great things in one place and it would be nice to learn some more shader fun from your project! :D