Traveling Trees - Explaining My Multimesh Instancer / Godot 4 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ม.ค. 2025

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

  • @actualdevmar
    @actualdevmar  ปีที่แล้ว +13

    Aloha! I've optimized the instancer script (see link in video description). In short, the script now packs locations, rotations and scales to Vector3 arrays (which are much faster than 'normal' or 'typed' arrays) and sends those to a separate thread to apply instance transforms. Collisions have got a simple queuing mechanism. Updates are only run when the player moves by a distance that justifies an update. These optimizations have given me a significant performance boost - ca. 30FPS. CPU throttling has been eliminated.

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

      Do you really need to generate trees behind the camera as well? Or terrain "flow" can only be for what's in front of camera. Not talking about camera view clipping, rather to generate trees and terrain in different LODs only what is front part of camera near plane. Basically that would cut to half number of instances you generate as player moves around. Am I correct?

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

      im using an addon to generate terrain, Heightmap Terrain just incase ya heard of it before, but i couldnt export the heightmap of the generated terrain to use with this custom node, what do i do?

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

      Thank you for making this! I'm trying to implement this with a heightmap that's using png or exr image file. I find that when I point the script to the image file and reload the scene, no trees are generated. If I click reimport on the image asset, they will pop in. This works great in the editor but when loading the game, it does not work. I've tried looking for a way to trigger a reimport once the scene is loaded, but I haven't found a way. Any ideas on how to fix this?

    • @cjdaylight3407
      @cjdaylight3407 8 หลายเดือนก่อน +2

      the links are not working

    • @pairless
      @pairless 6 หลายเดือนก่อน +1

      Can we have an update? it's been 8 months and I was looking forward to this game

  • @willyamcarkey717
    @willyamcarkey717 ปีที่แล้ว +69

    Unity has Sebastian Lague, Godot has Devmar! Great and super professional job! Love your work

    • @mbg4681
      @mbg4681 ปีที่แล้ว +8

      Speaking of, you might enjoy a video by Athillion titled "I Made Sebastian Lague's Procedural Planet In Godot 4".

    • @ДаниилВалов-ж1э
      @ДаниилВалов-ж1э 7 หลายเดือนก่อน

      @@mbg4681 And Martin Donalds videos of course!

  • @loycross
    @loycross ปีที่แล้ว +19

    Not easy to follow for someone who hasn't really touched Godot yet, but as a web dev this feels way more useful than most tutorials, with full explanations on how things work and a general review of the code functionality. Great work, honestly.

    • @actualdevmar
      @actualdevmar  ปีที่แล้ว +12

      Thank you. This was not meant to be a tutorial per se. If I were to explain everything from scratch (including what a multimesh is etc etc) the video would be an hour long probably. Instead I decided to share the script and provide a short 'user manual' for it. But yea, one needs to know their way around Godot to find this useful.

  • @BastiaanOlij
    @BastiaanOlij ปีที่แล้ว +17

    Very well explained! Two small suggestions: move updating the multimeshes into a thread, and instead of triggering the update at fixed intervals, trigger the update if the player has moved beyond a certain radius of where they were before the last update.

    • @actualdevmar
      @actualdevmar  ปีที่แล้ว +8

      Hey Bastiaan, I'm tinkering a bit to optimize this in case someone needs +10K trees to follow them around. Multithreading is a good suggestion. Indeed, in my implementation I update based on movement and not time. I didn't include this because I felt ppl could easily rewrite that part.

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

    Super useful content man. Love these videos, truly.

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

    This is fantastic! So awesome to see practical implementation of lod and object instancing/culling in Godot. Thanks for demoing your process.

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

    I started playing with the 3D side of Godot a while ago and stumbled on your content while looking for terrain stuff. Went on a binge and subscribed; I really like the way you explain things and especially the “why” 😄

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

    I actually really appreciate the code deep dive. You're giving me lots of ideas and the confidence to code them in my own projects.

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

    Everytime you release a new video you convince people of how capable Godot is to make amazing and stunning games, your content is truly amazing! Thank you!

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

    Great Video, man. I think the code explantation wasn't boring at all! I don't like watching people code live on stream or things like that, but a concise explanation like that, I'd watch any day of the week. :-)

  • @vertexdune
    @vertexdune 4 หลายเดือนก่อน

    thank you for making this code open source, you are helping a lot of aspiring developers make their game look beautiful

  • @superschizoscriptures
    @superschizoscriptures 4 หลายเดือนก่อน

    fantastic implementation!!!! over and over I have wondered how far you could go just by instancing things centralized around the player like this. beautiful :)

  • @omaops-tech
    @omaops-tech 3 หลายเดือนก่อน

    Your project is truly inspirational.

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

    I've been following your project for two years. It's awesome to see it keep evolving and getting better! Keep up the awesome work! 👍

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

    The Tooth Ferry sounds creepy awesome. I'm sure it won't disappoint. I'll be waiting for that.

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

    i love how dark this game looks

  • @Alpha_GameDev-wq5cc
    @Alpha_GameDev-wq5cc ปีที่แล้ว

    Love this tutorial-esque style, I’m learning UE5 but a total beginner so this is still so intriguing and educational!

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

    A big thank you for all the hard work. I've known that Godot will be big since 2017. It just needs a few more solutions in videos like this to truly reach its potential. If they get a marketplace for paid assets going that will really help.
    Oh, by the way. When you do things like this you should really setup a patreon or something similar so we can show some love.

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

    I was soo hyped to watch your videos

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

    keep it at this detail level. people will wanna try to build something similar and may lack the understanding in certain parts to be able to do it.

  • @kiyasuihito
    @kiyasuihito 2 หลายเดือนก่อน

    Very cool. Love the deep dive

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

    If you enjoy doing this depth of video, keep doing it! Interesting topic - sparks ideas (and confirms some thoughts on gpu instances and multimesh) even tho I'm personally far far away from using them

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

    Babe wake up, devmar just dropped

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

    Heck yeah..thanks devmar...i wonder for the longest time when u will release this when i first saw ur videos... 🙏 Thanks

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

    Found out about you 10 mins ago with the mower video, AND I'M INVESTED AS HECK

  • @bsangel1276
    @bsangel1276 10 หลายเดือนก่อน

    im new to godot and i didnt understand a shit, but you make it look so easy, found this video beacause wanted to learn about MultiMeshInstance and found something even better, what i can understand is that somehow you save resources by only loading what you need, cool,

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

    Love the code breakdown!!
    Edit: I wish you would breakdown how you do the IK stuff too as that has been challenging for me to get working right.

  • @Polygarden
    @Polygarden ปีที่แล้ว +4

    Great tutorial and great use of Multimeshes! I'm actually wondering how much the load of multi meshes is, when you have lots of different tree, grass and stone instances. (if there is a trade-off point when it's better to use normal meshes instead of multimeshes) All in all it's probably much much less nodes with this method. I will be looking into this technique aswell.

    • @actualdevmar
      @actualdevmar  ปีที่แล้ว +4

      There is a tradeoff. If you want occasional trees (which you might, depending on your design) the it will be way more optimal to use individual meshes as you can then also benefit from geometry settings like autoLod or clipping/fading etc. If you look at the gameplay footage here I'm being accompanied by 625 trees total (chunked, so culled by frustum) for which it makes sense to use multimeshes. The scene in the thumbnail has 1225 trees. The other consideration is how tightly clustered your meshes are. If they're clumped together it's usually better to go with multimesh regardless of instance count. If they're dispersed, use a standard mesh.

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

    Hey, Devmar, been a big fan of your work since watching your wandering clipmap vid a year ago!
    One thing that's always perplexed me though is why you always use square grids for clipping. Don't you end up with a whole lot of wasted detail at the corners and detail-distance missmatch when looking along an edge towards a corner?
    I tried a more circular wandering mesh (while still using square cells if that makes sense) in blender and got much better results, just wondering if there is a reason you don't do something similar in Godot.
    Keep up the amazing work, you're a true inspiration! 👍

  • @CharleyDonar
    @CharleyDonar 3 หลายเดือนก่อน

    THANK YOU!

  • @Marandal
    @Marandal 8 หลายเดือนก่อน

    Oooo an epic tutorial on godot instancing

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

    Maybe he could make playlists for each of the different sets of videos (one for the main devlog, one for the tutorials, ones for the other devlog(s) series)

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

    Great video. Thank you.

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

    Really good example, As an enjoyer of Horror games channels like Coryxkenshin & Peenoiseplays , it got that horror puzzle game vibe. You should use more horror if not creepy themes, no one complains about the graphics of horror games.

  • @TheSunriseGames
    @TheSunriseGames 7 หลายเดือนก่อน +1

    where are you? come back, it's been 7 months.. we need updates

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

    THANK YOU THIS IS COOL AF

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

    Really interesting technique ; quite advanced for a beginner like me hehehhehe

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

    mur godot awesome tutorials please and thank you!

  • @cprn.
    @cprn. ปีที่แล้ว

    Hmm. Am I correct into thinking the right approach to cutting trees then would be to use a second texture that marks where a player cut the tree so that the shader wouldn't spawn there? This way I could use a timer to modify that "don't-spawn-here" texture's pixels over time to reflect re-growing (i.e. scaling the particles). Or am I overthinking this?
    Also, yes, very useful content. Although, I'd prefer it in C# simply because I feel like it'd give a more CV-ready skill. It's not hard to write C# looking at GD, though.
    And I came here because the boss fight demo... Cool as f**k.

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

    Quick question: Why pastebin, and not github?

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

    this is rad, it's almost exactly what I was trying to get out of some other addons/strategies.
    Is it ok to use this as a basis for my own project? Is it ok to use this as a basis for a more generalized/fleshed out addon? Credit will be given, of course.

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

    This super video 👍👍👍

  • @andreasng
    @andreasng 9 หลายเดือนก่อน

    This is magic! 😢😢

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

    It is VERY usefull, thank you for it.

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

    Freaking rad!

  • @418im_a_teapot4
    @418im_a_teapot4 วันที่ผ่านมา

    can you please update the link for the optimized instancer script?

  • @cjdaylight3407
    @cjdaylight3407 10 หลายเดือนก่อน

    I wonder how you gonna implement produceal roads lakes and other things but I think this game already ready to go to steam

  • @Carson.Rhodes
    @Carson.Rhodes ปีที่แล้ว

    How come you use GD script instead of C#. Have you found any benefits of either with your "stress tests" of games, lol. Brilliant work! keep it up!

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

    Hi again, lovely to see another video.
    I'm curious, was this necessary? Godot has auto lod which you can tweak how quickly they swap, it also has frustum culling and distance cullling and such. Was all of that not helpul for this case?

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

      Techniques like this one are meant for scenarios where you have numerous geometries to render that share the same mesh. I mean numerous, as in hundreds or thousands or tens of thousands. Individual mesh nodes become suboptimal over, say, 50 (even with autolod and clipping, which is also quite taxing when you have too many meshes in your scene). In this showcase I have 1000+ trees. No way I'm laying them out manually and updating their positions every few frames.

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

      @@actualdevmar Don't things like terrain plugin and scatter and their equivalents in other engines work like that too, painting tons of trees and foliage and so on?

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

      @@ViktorsJournal short answer is no. This is a different technique.

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

    i left a comment on the water lvl vid, its what i think could be a good boss and welp, that

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

      Im definitely doing a crab boss. It's been on my list for a while.

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

    This is solid, do you have a discord?

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

      not yet

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

      Gotcha! Whenever you create, i will be there@@actualdevmar

  • @theyellowarchitect4504
    @theyellowarchitect4504 2 หลายเดือนก่อน

    Chad.

  • @portalpony477
    @portalpony477 9 หลายเดือนก่อน

    13:36 One second longer video and it would be perfect

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

    Wow and all made in GDScript, no C# or C++, GDScript.

  • @ITHINKTHTSDON
    @ITHINKTHTSDON 8 หลายเดือนก่อน

    Bro can you mentor me on Godot I’ve been using it for some weeks and don’t have any dev experience but I have been doin research but to no avail I have this huge game idea I have everything ready just can’t make it cuh idk what I’m doin in the game engine nor coding I truly believe my game will change the gaming industry TRULY!

  • @monopoliz___2856
    @monopoliz___2856 2 หลายเดือนก่อน

    hope you can get back to game dev or something creative, peace out dog

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

    Evidently, you have attempted to make your video 13 minutes and 37 seconds long.