Mesh from Math - The basics of Marching Cubes

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии •

  • @XanTheDragon
    @XanTheDragon 11 месяцев назад +2

    I am so glad I saw this video in the suggestions after watching the same video you did.

  • @cx123456
    @cx123456 4 месяца назад +1

    A multidimensional array represented as a 1D flat array is called strided array.
    Another, very specialized variant, is bitboard, where you represent a 2D array of booleans as an integer.

  • @nebulae_wanderer
    @nebulae_wanderer 11 месяцев назад

    Damn i was on a threejs implementation of this. Your video helped me a shitton. Also if someone comes here with the issue that the cubes are at the right place but in seemingly random orientation, try flipping the binary index. Turns out I was reading the points in reverse when building it.

  • @eitantal726
    @eitantal726 8 месяцев назад +2

    Simple & short explanation: How to make something that's minecrafty look less minecrafty, with 1st order interpolation

  • @rishabhchopde6709
    @rishabhchopde6709 4 месяца назад

    This video helped me out enough to implement this myself in C# and I was able to generate meshes for implicit geometry. I'm now looking for a way to better approximate it, so I'm looking up how to implement the dual contouring "Surface Nets" algorithm.

  • @jupiterbjy
    @jupiterbjy 7 месяцев назад +1

    I was scratching head watching Sebastian Lague's Marching cube video as it's example is in compute shader with unity which in godot it's hilariously complex to use - now this video helps me understand better.
    Not to say SL's one was bad but found myself dumb to understand it due to engine difference(I think)

  • @devin6329
    @devin6329 Год назад +8

    This is a really great explanation of the marching cube algorithm 👍

  • @JohnLauerGplus
    @JohnLauerGplus 8 месяцев назад

    nice work!

  • @bargledargle7941
    @bargledargle7941 Год назад

    Amazing video! Helped me a lot to understand it and also it's well made.

  • @ThatKid22101
    @ThatKid22101 3 месяца назад

    everyone else:
    me at 0:10: I literally just watched that video!

  • @Elvunen
    @Elvunen 2 месяца назад

    should all of this be in one script ? i have big troubles understanding where the diffrent parts are supposed to be

  • @GES1985
    @GES1985 Год назад

    Is this similar to using the equivalent of minecraft voxels but not rendering them; instead, calculating a flexible "blanket" that smoothly lays over the active (invisible) blocks, and takes their data as reference for what materials/ textures/ actors belong with the rendered "blanket" landscape that spans between the invisible blocks vertices?

  • @pieriskalligeros5403
    @pieriskalligeros5403 Год назад +3

    0:30 I didn't spot the perlin noise? @Deadlock

    • @DeadlockCode
      @DeadlockCode  Год назад

      Yeah, I'm sorry about that. Previously, I had a 30 second 'teaser' where I showed an example of what marching cubes can do but it felt too slow. So I removed it to get straight to the point, but I had forgot that the following scene had a reference to it.

    • @adamebadra3171
      @adamebadra3171 Год назад

      ​@@DeadlockCodeis that hlsl??

  • @austineldredge8003
    @austineldredge8003 Год назад +4

    Created something very similar lately in an attempt to make modifiable procedural terrain at runtime. The issue Im running into is linear interpolating based on noise values to improve the shape of the cubes, have you done any work on this?

    • @DeadlockCode
      @DeadlockCode  Год назад +3

      Assuming you're talking about the thing I hinted to at the end (6:35); I'm thinking about making a video appending this one but that might be a while, since I'm currently working on something else entirely. So I'll try to answer it here as detailed as I can.
      During the creation of the vertices, we place it at the center (6:10) but we want to place it where we expect to find '0' (if the transition were linear). Then we also need the values of the two voxels adjacent to the vertex;
      replace:
      let position = (pos_a + pos_b) * 0.5;
      with:
      let val_a = voxel_grid.read(x + x0, y + y0, z + z0);
      let val_b = voxel_grid.read(x + x1, y + y1, z + z1);
      let t = val_a / (val_a - val_b);
      let position = pos_a + (pos_b - pos_a) * t;
      Hope this helped. If there's anything I explained poorly, feel free to ask.

  • @padaddadada5417
    @padaddadada5417 6 месяцев назад

    Thank you !
    In what language is it written ?
    What do you use to render the image in 3D in your video ?

    • @DeadlockCode
      @DeadlockCode  6 месяцев назад +1

      All the code is written in Rust and I used the Bevy Engine to animate and render the 3D elements of this video.

    • @padaddadada5417
      @padaddadada5417 6 месяцев назад

      Thank you !