Fault Formation // Terrain Rendering episode #2

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

ความคิดเห็น • 17

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

    Clone the sources:
    git clone github.com/emeiri/ogldev.git
    If you want to get the same version that was used in the video you can checkout the tag 'TERRAIN2'.
    Build on Linux:
    cd ogldev/Terrain2 && ./build.sh
    Build on Windows:
    Open the Visual Studio solution: ogldev\Windows\ogldev_vs_2022\ogldev_vs_2022.sln
    Build the project TerrainRendering\Terrain2

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

    The fault formation algorithm is kinda neat. I've never seen that before.Technically speaking, what you've implemented is an infinite impulse response (IIR) filter. Sometimes called recursive filters because they reference values that have already been filtered. They are very computationally efficient, but end up "smearing" the results in the direction they are applied (phase response). The phase response changes based on the composition of the signal, so it can end up warping the shapes of things, and making your mountain peaks slightly tilted. You can avoid this by filtering forwards, then backwards to cancel out the phase response. You can also do even stronger filtering, or combine multiple passes together by using more taps in a single pass for better performance. (edit: oh derp, I see you are doing forwards and backwards filtering, n/m)

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

      Thanks ;-)

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

    0:50 "I know it looks crappy at the moment, but have no FIR". I see what you did there... ;)

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

      :-)

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

    Hey, great tutorial as always. Would it be possible to cover a case of tight AABB for directional light's shadowmap? Like AABB of frustrum + shadow casters

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

      Thanks! I covered a tight light projection frustum in th-cam.com/video/x2FHHU50ktQ/w-d-xo.html. Perhaps this is what you're looking for.

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

    when you create fault formation here, is it operating on the original world map vecor you used in the previous episode or are you effecting and generating a new world. I am applying this function to my current terrain and the results are fine but there is no connection to how it looked before hand

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

      The algorithm is applied on a flat terrain or world map. So you should prepare a grid of vertices in the XZ plane and calculate their Y value using this algorithm. If you disable the algorithm you should be getting the same flat terrain.

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

      @@OGLDEV thank you. I did notice these algorithms tend to start at one side and then the heights drop to the other side. Which would create unnatural terrain as your game world would be high on one side rather than randomised. Do you recommend the next video for that solution. The mid point. Or can I adapt the fractal somehow also

    • @OGLDEV
      @OGLDEV  11 หลายเดือนก่อน

      Did you see this using my code? I don't think it should happen but there could be a bug. Go ahead and compare it to midpoint. Maybe it will work out better for you.

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

    Did someone come up with a better name for a "TriangleList" class? maybe TerrainMesh? I just don't like how "TriangleList" sounds so generic and it could mean anything really

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

      Actually you're the first!
      I'm not a huge fan of the TriangleList name but I kinda got stuck with it and never changed it. Don't worry, we will replace this class with something else in a few episodes. Just keep watching... ;-)

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

      I just called mine Grid

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

    could you make a tutorial for creating water, maybe using flow map? I always wanted to know how it works but I never managed to implement it

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

      There's a video planned later in this series based on the implementation of water in the book. However, it is based on a sine/cosine wave which is not really great. I hope to improve the algorithm by the time we get there. I'm not familiar with flow map but I will check it.

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

      @@OGLDEV I'll be waiting anxiously until then and meanwhile I'll be studying the other contents