Baking a Navigation Mesh for a Heightmap Terrain in Godot 3/4

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

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

  • @niko__dev
    @niko__dev 2 года назад +5

    Hello! I, too, someday will get to creating a landscape on Godot 4 for my game. I will study how you did it.

  • @dueddel
    @dueddel 2 года назад +2

    Yep, can absolutely agree, Game Dev Journey is an awesome channel! (Also yours is, otherwise I wouldn't have subscribed to it quite some time ago…😉)

  • @-Name-here-
    @-Name-here- Год назад

    I never knew about @tool and that is so crazy I’m gonna abuse it everyday from now on 😂

  • @litstoat1697
    @litstoat1697 2 года назад +2

    would be a neat thing to have a navmesh allocator which caches navmeshes at various points in the world as needed and discards them when no longer needed. If you are chased by an enemy and you leave the bounds of an allocated navmesh a new navmesh would be allocated for the AI which is chasing you which would include you and the ai in its bounding "cube".

  • @luffymonkey6523
    @luffymonkey6523 Год назад +1

    You should use static body as collider, currently you have only collison node. Static_Body --> Collision_node.

  • @jaredjones6570
    @jaredjones6570 Год назад +1

    I'd subscribe 100 times if I could. This channel is wonderful.

  • @amorpilo9666
    @amorpilo9666 2 года назад +3

    NavMeshes look for StaticBodies to bake, not collisions. A collision without an StaticBody will be ignored. That's by design so you can use Areas, RigidBodies, KinematicBodies, etc. (Which also have collisions) with NavMeshes.

    • @actualdevmar
      @actualdevmar  2 года назад

      Not true. You can choose the type of node that will be parsed as geometry for navmesh baking and you have 3 options: meshinstance, collider, or both. If you choose collider nothing happens. Static bodies have nothing to do with it.

    • @amorpilo9666
      @amorpilo9666 2 года назад +2

      ​@@actualdevmar Static Collider means StaticBodies.

    • @dmaz123
      @dmaz123 2 года назад +3

      @@actualdevmar yeah I'm pretty sure he's right... you need a static body as parent to that collider you added.

  • @jmbiv_dev
    @jmbiv_dev 2 года назад

    Sorry for a long question, but in a previous video you mentioned that you were using an individual IK chain for each hand. I'm trying that in my game, too, but it's meant that I have to manually define different gun positions for being idle, running, and aiming, and then each of those has to have another separate position depending on what type of gun is being held (rifle vs pistol, for example). Your animations and weapon controls look awesome, so just figured I'd ask - can you break down a bit how you define where the gun should be when running/shooting/etc? Do you combine animations and IK, or is it pretty much all IK? Thanks man - the game is looking awesome and your video breakdowns are super helpful.

  • @havidarou
    @havidarou 2 года назад +1

    I'm wondering, how do you mix the procedural/on the fly part of loading the terrain with actual landmarks in your map? (Example, a house that needs to be placed in a particular place)

  • @VojtechLacina
    @VojtechLacina 2 года назад +1

    Nice progress. Even at this time I dont understand everything You talk about, I hope one day I will use it :). BTW whats the video ending song name please?

  • @Chevifier
    @Chevifier 2 года назад +2

    If I remember correctly you can create custum navigation meshes in blender and import it to godot using a flag iirc🤔 i know in this case it wouldn't be useful since you're using the height map terrain. But then again you can using the height map png file in blender to generate it pretty quickly 🤔

    • @actualdevmar
      @actualdevmar  2 года назад +2

      In this vid I'm focusing on Godot only. You can of course make a navmesh in Blender but still you should bake a navmesh inside Godot from the one you import, otherwise you're losing the ability to adjust the navmesh and all of its settings (like agent settings), which means that every time you change your level in Godot you have to go back to Blender and redo the navmesh. Also, you can't export a heightmap terrain as a mesh into Blender - you'd have to recreate your terrain in Blender first which is tricky because Belnder uses a different vertex displacement algorithm...

    • @Chevifier
      @Chevifier 2 года назад

      @@actualdevmar I mean to export the png file that the height map creates. But your right you definitely lose the flexibility of regenerating it on the fly. I was talking more of a contained level built inside blender.

  • @TokisanGames
    @TokisanGames 2 года назад

    Great info, thanks!

  • @christianbrenner984
    @christianbrenner984 2 года назад +1

    Regarding the mesh construction: I wonder if it would be faster to have the SurfaceTool take the mesh data from a PlaneMesh via "create_from" and then modifying its vertices based on the heightmap. There is also "generate_normals", so changing the height should be sufficient.

    • @actualdevmar
      @actualdevmar  2 года назад +1

      Tried it. Surface tool works very similarly to immediate mesh but takes a little longer to build the mesh. It's a more powerful tool and the better option when you're building meshes for in-game use. But here I'm just building a mesh so I can bake a navmesh from it and then discard it so I went for a faster/simpler option.

    • @christianbrenner984
      @christianbrenner984 2 года назад

      @@actualdevmar I would have thought that by using the SurfaceTool, more of the work happens in engine-internal parts written in C++. So I'm a bit surprised that the gdscript solution is faster. But the SurfaceTool probably isn't optimized for this strange corner case.

    • @alixey59
      @alixey59 2 года назад +1

      @@christianbrenner984 In my procedural terrain project in Godot 3.x I ended up with manual way using ArrayMesh. SurfaceTool and ImmediateGeometry were really slow. Manual creation of the vertices, calculating normals, uvs, and indexation of the vertices made in C# turned out to be at least 10 times faster than using Godot's tools.

  • @adrian-ioanmunteanu3027
    @adrian-ioanmunteanu3027 2 года назад

    I see that you are using Godot4.
    Could you give us your opinion and experience with it so far?

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

    can I download Immediate mesh script? great video

  • @vishnuviswanathan4763
    @vishnuviswanathan4763 2 года назад +1

    for the algorithm

  • @akash0156
    @akash0156 2 года назад

    Are you used GD script?

    • @actualdevmar
      @actualdevmar  2 года назад

      Yes. The code you saw is gdscript.

    • @akash0156
      @akash0156 2 года назад

      @@actualdevmar can you upload video on only game footage not code, only game footage