Description
Hi there,
That's a pretty awesome plugin you have, Terrain3D.
I wanted to share a hacky implementation of foliage I have for Terrain3D, hopefully the authors and/or the community could find interesting ideas in it.
I sometimes do small scale development as a hobby, and I've got my own tools for rendering terrain and foliage in Godot.
If you're interested, my approach is more procedural, letting the user specify the "desired properties" of the terrain, like quest locations etc., and the rest of the terrain is generated via a script.
I noticed that foliage support in Terrain3D is kind of lacking features, specifically manual LODs, collisions and interactivity.
That is not to downplay how amazing the plugin is, it's just lacking this particular feature.
So recently I've taken the time to open source a specific component of my terrain stack, and rewrite it to make it compatible with Terrain3D, check out Foliage3D (currently in a drafty state, but nevertheless it basically already works).
It uses the standard draw call optimization: multimesh nodes organized into a quad tree, guided by the data from a Terrain3D node. Foliage is controlled by textures (which is probably not ideal in the long run, but it's how it's currently implemented).
E.g. I could have a "forest floor" texture and then a "forest road" texture, and I can configure trees to only spawn on the "forest floor" and not on "forest road". I'd then use the Godot editor in a WYSIWYM manner, that is, you're only painting textures. Foliage is only rendered in the running project and is completely defined by the textures. That is perhaps not ideal, but I found it works for my projects and I like keeping things simple.
Perhaps the most interesting aspect of my foliage system is how I deal with interactivity / collisions. Essentially, instances that are close to the player are asynchronously replaced by instanced scenes in the background. That allows any kind of interactivity, like collisions, particle systems (think leaves falling from a tree), etc etc.
In this implementation foliage is non-destructive, but I'd imagine it wouldn't be too hard to support destruction.
Anyway, enjoy and maybe this implementation will give you an idea of what improvements you want to add to the built-in foliage system in Terrain3D :)
Description
Hi there,
That's a pretty awesome plugin you have, Terrain3D.
I wanted to share a hacky implementation of foliage I have for Terrain3D, hopefully the authors and/or the community could find interesting ideas in it.
I sometimes do small scale development as a hobby, and I've got my own tools for rendering terrain and foliage in Godot.
If you're interested, my approach is more procedural, letting the user specify the "desired properties" of the terrain, like quest locations etc., and the rest of the terrain is generated via a script.
I noticed that foliage support in Terrain3D is kind of lacking features, specifically manual LODs, collisions and interactivity.
That is not to downplay how amazing the plugin is, it's just lacking this particular feature.
So recently I've taken the time to open source a specific component of my terrain stack, and rewrite it to make it compatible with Terrain3D, check out Foliage3D (currently in a drafty state, but nevertheless it basically already works).
It uses the standard draw call optimization: multimesh nodes organized into a quad tree, guided by the data from a
Terrain3Dnode. Foliage is controlled by textures (which is probably not ideal in the long run, but it's how it's currently implemented).E.g. I could have a "forest floor" texture and then a "forest road" texture, and I can configure trees to only spawn on the "forest floor" and not on "forest road". I'd then use the Godot editor in a WYSIWYM manner, that is, you're only painting textures. Foliage is only rendered in the running project and is completely defined by the textures. That is perhaps not ideal, but I found it works for my projects and I like keeping things simple.
Perhaps the most interesting aspect of my foliage system is how I deal with interactivity / collisions. Essentially, instances that are close to the player are asynchronously replaced by instanced scenes in the background. That allows any kind of interactivity, like collisions, particle systems (think leaves falling from a tree), etc etc.
In this implementation foliage is non-destructive, but I'd imagine it wouldn't be too hard to support destruction.
Anyway, enjoy and maybe this implementation will give you an idea of what improvements you want to add to the built-in foliage system in
Terrain3D:)