Please pardon if noob question. I am using 4.0.2.
I have a mesh consisting of a number of disconnected faces (i.e. after a simulated explosion). I am trying to make each face randomly tumble (i.e. rotate around its face center). If this is possible, it does not seem straightforward at all. I've seen a few related questions on the internet, but no satisfactory answers.
I can iterate through the faces just fine with a Repeat Zone, but there is no obvious transformation to apply to them (separately). Transform Geometry : Rotate applies to all faces at once, around the object origin. Iteration doesn't seem to help.
I've failed to find any possible method using Set Position.
Any suggestions or pointers would be most welcome.
Hi techworker1 ,
The trick is probably to use an Evaluate on Domain Node. You'll need to change things, depending on the exact situation you have, but as a demo:
Thanks spikeyxxx . Transforming instances is straightforward.
Starting with a mesh (say Icosphere with 20 triangle faces), I suppose in theory you could replace them with 20 triangle instances matching L/R/S (not so easy). But for some arbitrary mesh (say a monkey), I don't see how to proceed that way.
Reading the position of points, and transforming their values, would theoretically work. But in Geometry Nodes I don't know how to associate the vertices/points that belong to each face. (In Python it is rather easy.)
You are not giving me enough information to know exactly what to do...
...but if you have disconnected Faces, don't they have Indices, you can use?
Maybe, the Accumulate Field Node is more to your liking?
(And I don't know Python, sorry, so don't try to explain what you want that way 😉).
I'll try to explain what I want better with a crude animated simulation. The object is a single mesh, with all the edges split. I really want to do it for a complex mesh with many faces. Using Geometry Nodes, not Physics.
Maybe it's not possible/practical. Maybe it isn't worth doing at all.
UPDATE: 4.2 has added a new Geometry -> Operations -> Split to Instances which seems to get part way there. But all the instances have Position at the object origin...
I understood what you are trying to do, but I didn't know your setup. I get it now; you would need a Rotate Elements Node, but there is only a Scale Elements Node at the moment...
Let's see if I can figure out a way to do this...(it is indeed not straightforward, but my gut tells me it is somehow possible.)
After spending lots more time on failed experiments, I got something to partially work. Tested on a Cube and Icosphere. Face locations are not exactly where I want them. Pretty ugly, too big for a screen shot. Maybe I can publish a .blend file. Probably not worth all the time spent, but I did learn a lot the hard way.
Basically: Create mesh, split all edges. "Mesh to Points (face)" to create a point in the center of each face. Save position as a named attribute on center points. In a Repeat Zone, for each center point "Instance on Points" using the matching face for Geometry. You can then Rotate Instances, using face center point position as the Pivot.
Cool! Glad you got that working!
I was thinking that something like that should work, but was trying to find a more elegant solution...but so far I couldn't get anything working yet.
Looked at your last version and it seems to work well; it even performs a lot better than I expected (tested on a Suzanne).