Geometry Node with Grid Modifier and randomize Nodes to generate collections?

I’m new to Geometry Nodes. Following a popular “Sugar coated jelly candy” tutorial on YouTube led me down a path.

The tutorial used a point distribution referencing a manually created collection. Makes sense. Each instanced object is a random selection from the collection.

I wondered if I could replace the manually created collection with an algorithmic one.

I’ve been able to create a grid of randomly rotated and scaled cubes. See screenshot below.

As an aside, I got the idea from YouTube to make the grid 1m x 1m x 1m, and this has the side effect of turning X, Y, and Z into loop indexes! Great idea! Not mine.

This is where I’m stuck. Can I now make the resulting grid into a collection. Either in the Geometry Node or as a Modifier after the Geometry Node?

I’d then use that collection as the source for another point distribution&instance node. That would give me automatic generation of random elements.

That last step has me stuck, though. The resulting grid of random cubes doesn’t really exist (I understand that concept - the geometry node generates, but doesn’t actually “create” it).

Can I get around that? Any ideas? Have I missed the blindingly obvious?

P.S. Take this to the next level: A geometry nodes building made up of geometry nodes random apartments each with a geometry nodes random balcony with geometry nodes random contents. Without having to hand-craft each random choice. Each layer is just a bunch of “randomize” nodes creating collections for the “next level up” on the fly.

Hi, I see you are on 2.93.1 for geometry nodes tests I strongly recommend you download 3.1 alpha (or 3.0 beta).
I also recommend not to follow tutorials of geo nodes from before 3.0. that do not use the new fields workflow.
Things have changed a lot! Apart from there being many new nodes, the whole concept of attributes has changed with the new “fields” workflow.
Many existing nodes from 2.93 have changed and much of the workflow is totally different.

As for collections bare in mind that when you give an object a geometry node it is still one object and will only be part of the collection (or collections) relative to that object.

You can however go on and use your grid

inside the geometry node tree, this is perfectly possible.

In the example below (3.1.alpha) the only object I have in my scene is a plane with 4 verts. The grid, cubes and icospheres are created with the new “mesh primitives” nodes and I am not even using the geometry input of the plane at all.

In the orange frame I have a setup that makes a grid of cubes with random scale and rotation, like yours.

Then I have instanced the icospheres onto the faces of those “virtual” cubes.
I used the “realize instances” node because if not the random scaling and rotation of the cubes would also effect the icoshperes.

You should think more in terms of node groups than collections, in my example you could turn the orange frame into a nodegroup for use in other geonode setups, it would always output a grid of randomly scaled and rotated cubes.
You will not be able to recreate this setup in 2.93.1 The nodes are different!

Edit (yet again):
I think it would be better to do this inside one huge setup with node groups for furniture, rooms, windows etc etc.

Disclaimer: I am not an expert, I am forcing myself to do these experiments as I think geometry nodes will be a big thing in the future. :slightly_smiling_face:

1 Like

Really top notch answer! Thanks so much.
What a difference 3+ makes.

The best part of the answer was the “use 3+” bit, I am far from understanding GN properly! :rofl: