What I've Been Working On: Godot 4.2 Foliage Spawner
ฝัง
- เผยแพร่เมื่อ 27 มิ.ย. 2024
- I hated making this video lmao. Sorry for the wooden voice over. Making videos sucks. So I'll only be doing a video like this when I finish something. That could be weeks or months apart depending on the thing. I also work full time, so. Yeah.
Here's the info:
Assets used:
www.artstation.com/marketplac...
Documentation Links to figure out how to make this:
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/4.0/t...
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/stabl...
docs.godotengine.org/en/stabl... - วิทยาศาสตร์และเทคโนโลยี
The trees used in this demo were meant for linear scenes with controlled occlusion culling. Every single leaf is an individual 4 quads. And I didn't bother to manually edit them to have leaf clusters. As well I didn't generate imposters. Using finished assets with HLOD to drop in imposters at a distance, and properly optimized canopies. This scene would run much faster on the gpu. The loss of performance from draw calls is negligible. Each tree is using 1 material. There's 2 materials total. Godot automatically batches identical models using the same material. There were a total of 8 variations in this scene. So this added only 16 draw calls to the scene. 1 For each mesh type, and 1 for each material on those meshes. Multi Mesh instances would be good for this too, but I didn't feel like the extra effort would be worth the gain here.
wow! ❤
Thanks!
No problem! I'm glad this could help you.
Great video! I encountered similar issues regarding the scene tree where the editor keeps stalling at around 8k nodes. I like how you worked around this problem. I'm going to test it. (other engines manage to place more than 100k vegetation assets in a level and I hope it's somehow possible with Godot too) I ended up using a single thread with an array as a buffer and would spawn trees in waves, like 20 trees every frame until it's done, to avoid that the editor or game is stalling.
Once I started using internal nodes the editor stalling/stuttering went away. I just got impatient with the time it was taking so I sped it up with multiple threads. Ended up being quite a headache so if you're okay with a 20 second wait on a large forest I don't recommend it lol. The editor scene tree seems to really struggle with rendering that many nodes in the scene tree list. I like internal children and then saving them as branched scenes as a work around but it would be nice to not need to enter subscenes to make edits in the future. I'll keep looking for better alternatives.
So is this just like to help keep the listeners mind loaded with technical terms and logic sequences?
I just like talking about the way I did things and some of the challenges I had. There are other youtubers who are better at translating programming to english. Sometimes with some of the things I program, I'm not yet proficient enough to find simple terms or analogies to explain it. Multithreading was definitely one of those topics XD
@@CornRecords972 🤷 really it is good for what I described
do ASMR next
Never!