Best way to reply vegetation of this scene

Hi everyone! I would like to replicate this attached scene:

This is the link to the site

The biggest problem I find it on the vegetation. I initially created the plants in Blender using an addon called “Bagapie” (which use blender geometry nodes) and exported the whole scene to gltf. unfortunately the file is really heavy due to the many polygons that the addon has created to make the plants so… it’s not the correct solution.
So I thought to export 2 plants primitives from blender (with as few polygons as possible) and using in three.js instanceMesh, like in this example

But unfortunately it uses only one .glb and I don’t understand how to merge two glb into one plane. How can I do?

However, I remain in doubt about the best solution because if I check in browser inspector element, in this example, there aren’t the .glb files of each primitives tree so probably the instanceMesh hasn’t been used.
So I don’t understand how it was done… do you have any ideas about it?

Thank you very much (sorry I was a bit long in the question).

I suggest you export both meshes separately. In this way, the assets are easier to manage (e.g. when you want to replace or update one).

You don’t necessarily need instancing for rendering vegetation. It’s a valid option, yes, but sometimes the entire grass geometry is merged into a single one. That works not only for static vegetation but also for animated ones (depending on how you write the respective shader).

However, for this particular use case it’s probably better to export the entire scene as single asset. This makes it easier for designers to create/author the scene in a DCC tool like Blender. The wind animations could be added after the import of the asset by extending a built-in material with some vertex displacement.

2 Likes

Ok thank you for your suggestion. I found this useful addon for blender that allow to export geometry nodes in gltf maintains instances, so there is no problem with size of the gltf: GitHub - takahirox/glTF-Blender-IO-EXT-mesh-gpu-instancing.

1 Like