Instanced mesh OF instanced mesh?

B"H

I’m trying to find hacks of how to make a LOT of something (for example, HUGE amounts of grass) without destroying performance.

I can make an instanced mesh, which itself gets pretty laggy if its too much and too high poly etc.

but can I make an instance OF an instance, for example first make a grass patch with one instance of a single blade, then another instance of that to save performance, or some other way that I can make a HUGE amount of grass particles just based on a single blade (without butchering performance)?

You cannot make an instancemesh of an instancemesh.

You can instead make instances of clusters of grass bits, each rotated/scaled/colored slightly randomly. For instance a geometry kinda like this:


with a grass thatch one each of those quads.

Then you instance that cluster all over to build up a larger volume.

Full on games use hybrid solutions like Hierarchical LOD to use one representation at far distances, and something more detailed for very close up… sometimes even 3 or 4 different levels of detail.

When hitting performance problems it’s often not the number of triangles, but the number of objects that kills performance.
This is why instancing is a performance win because its a single object.
The general scene graph maxes out in the low 100s/1000s of individual objects, but most GPUs have no problem rendering up to million(s) of total triangles.

1 Like

There are many many many ways to do grass and it’s almost a right of passage for 3d folks.

Here’s a basic video on doing it with threeJS and has a link to his github with an example:

I would also look at: https://www.youtube.com/watch?v=Y0Ko0kvwfgA
There are two more videos where he expands and pushes things further.

Besides those videos there are tons of examples and demos around but Iwould start there