How to limit Join Geometry? Geometry Nodes

How to limit Join Geometry? For example, I want to create 5 butterflies in 5 frames, and then stop the creation process, but so that the current geometry is preserved.

compare node with time/frame input to switch. switch switches between input geometry and empty/nothing geometry.

3 Likes

Or use repeat zone instead.

Hope that helps.

2 Likes

aye, repeat zone triggered by the frame to start would be much better, but mebbe OP isnā€™t on 4.x yet. :slight_smile: even with 3.x, thereā€™s probably a better location for the switch than what i posted to make it more efficient (rather than joining ā€˜nothingā€™ every frame past until end of geometry, better branch culling) but will leave that to OP to experiment with. :slight_smile:

1 Like

One problem I have is keeping up with what node is in each version!

1 Like

Yes, it worked!

Can I compare, for example, not with frame, but with quantity vertex?

1 Like

aye, can compare with whatever youā€™d like (and have access to) :slight_smile:

thereā€™s probably a few ways of doing itā€¦ from keeping a ā€˜current countā€™ (starting at 0, if you have no flutterbyes to begin with), and then adding the vertex count of the joined geometry to that, outputting that sum in the simulation output (thatā€™s how you ā€˜keepā€™ variables in sim.nodes, just like you ā€˜keepā€™ geometry thatā€™s been added)ā€¦ use a switch right after the sim.input to compare the count to

Can you show what the node will look like?

Attribute statistic node will give you a vertex count.

Hope that helps

2 Likes

unfortunately, i am lacking time this morning (iā€™ve a production to run this morning at the theatre)ā€¦ i can do so this afternoon (6ish hours from now).

i will point out that if youā€™re using the same butterfly mesh to add, itā€™ll be more efficient to do so the way youā€™re doing now, not via vertex count. vertex count could be handy if you have multiple different flutterbyes youā€™re adding in one at a time, and want to keep the vertex count capped around a given number.

Okay, had a few to work this up. Now, this is a bit above what you asked for. This is not the most efficient way if youā€™re only adding multiples of the same thing over timeā€¦ the logic you have will do that better.

But this does have some logic to:
a) handle objects of varying vertex counts
b) cap them at a given number, not adding any more
c) stop adding stuff, or even trying to, once that occurs (after a few retries)

so you might have the max count at a point where 2 spheres can fit, but not 3ā€¦ but mebbe 2 spheres and 16 cubes canā€¦ this will handle that.

both image of node setup, and blend file attached. good luck! :slight_smile:

VertexCountCutOff-Sim.blend (1.6 MB)

1 Like