Geometry Nodes: affect by loose parts

Hello everyone! Thanks in advance for taking the time to read this,

I’m pretty new to geometry nodes and wanted to give it a try with an animation I’m working on.

I’m not sure if this is the best approach but basically what I want is for each cube to rotate independently and randomally, I know this is pretty “easy” to do if you create the geometry from scratch using geo nodes, but in this case the geometry was already created, all the cubes pertain to the same mesh and are placed in their positions precisely. I need them to rotate randomally on their own axis and I was wondering if there is any way to do this using geometry nodes.

I’m not sure how to do this because if I edit the rotation it affects the whole mesh, I need it to affect each cube independently. Is there any way to do this using geometry nodes? Maybe a command to separate the geometry by loose parts and then affect each cube?

Again, it may seem that cubes habe been created using geometry nodes but it’s not the case, I used a mesh because I needed the cubes to be displaced in a certain position.

1 Like

What are you using the GN for? Might be easier to do the rotation on these cubes as individual cubes (GN doesn’t know their origin nor axes unless you jump through hoops.)

If I had a bunch of cubes, and I wanted to rotate them randomly, I might make each cube a separate object and then, perhaps, give them each a GN modifier that rotated them randomly in its own space. Could use a random seeded from object position, and then just copy the GN modifier to every cube.

with the new simulation nodes (you have to download the experimental build https://builder.blender.org/download/experimental/) you could use this node setup here:

and you would get this:

random island rotation

The node tree adds one island per frame to the node tree. I save the pivot point via the attribute statistic node. Then i convert the mesh to instance and save that pivot point to the instance. Then in the simulation loop i just have to rotate them randomly.

Important: You have to start the simulation at frame 0 so that it works correctly.

2 Likes

Simulation nodes not required.

Good luck.

5 Likes

Thank you so much guys @zeroskilz @Blender_Fun1

Is there any place where I can start learning Geometry nodes that is worth it? Been trying to look tutorials on YT but there is probably good channels that I don’t know about.

Thanks again for your time and for solving my issue!

1 Like

YT Geonodes…recomendations

Erindale
CgMatter/Default cube
Johnny Matthews
Cartesian Caramel.

Are all very good geonodes tutors.

Some of the threads on here are golddust too!

3 Likes

Will check them out 100%, thank you so much!!!

1 Like

Hi, I have somewhat siimilar problem, may be you can help with that?

I need to align all separate objects in mesh to the surface, the same if I used Align Tools with min/max settings, but without separating mesh by loose parts

Its not quite the same… please could you start a new topic and I’ll attempt to help you there.

1 Like

Don’t really understand what you are trying to do here. Can you explain a bit further?