Traveling Trees - Explaining My Multimesh Instancer / Godot 4 Tutorial

preview_player
Показать описание
#godottutorial #godotengine

Welcome back to my Godot-focused channel! Today's video is a bit different - we're taking a closer look at a script I've been working on - one that utilises MultimeshInstance3D to spawn a bunch of trees around the player and make them follow the player around the world whilst remaining motionless at the same time. You can create infinite forests with this, or infinite anything (it doesn't need to be trees). The vid isn't necessarily a tutorial. It's more like a casual analysis, where I'll explain the thought process behind each line.

For those of you who love getting into the nitty-gritty of game development, this one's for you. We'll be going through the script step by step, so if you're not into the coding game, you might find it a tad boring. But don't worry, I've got a fun devlog planned for the next video. I'll be introducing a new character - the Tooth Ferry! Stick around for some light-hearted game design fun.

===================
Link to instancer script:

Link to grid creator script:

Link to optimized instancer script (multithreaded):

If asked for a pass code, put 'devmar'.
Рекомендации по теме
Комментарии
Автор

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.

actualdevmar
Автор

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

willyamcarkey
Автор

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.

loycross
Автор

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.

BastiaanOlij
Автор

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

ryant
Автор

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” 😄

GarmrNL
Автор

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.

makebreakrepeat
Автор

Super useful content man. Love these videos, truly.

rje
Автор

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!

aomadeira
Автор

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

vertexdune
Автор

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

squarerootof
Автор

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

superschizoscriptures
Автор

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. :-)

thFaust
Автор

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

Alpha_GameDev-wqcc
Автор

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! 👍

mbg
Автор

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.

bertilorickardspelar
Автор

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.

Thomas_Lo
Автор

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

goldenbuster
Автор

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,

bsangel
Автор

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

generrosity