Geometry Nodes 2.93: matching points to mesh (not randomly)

Hello,

I am looking for a way to set the points positions, in exemple by matching faces center.

So far I cant find a way to do it. Sorry if my question is a bit confused.
I should make an attribute (called lets say Center), of the vector kind and filled with the result of a face center calculation.

then I need to set the same number of point in the point cloud than the “Center” attribute.

Not sure if it is possible now.
I was thinking of it while watching the very nice video of the procedural building maker.

I don’t know about a way to match the center of a face. But for using the original vertices as instance seeds (instead of generating random points at the surface) you can just omit/remove the “point distribute” node.

Maybe using sub division and some clever boolean or masking will get you edge centers and face centers as well.

1 Like

Hello. this is a late reply but thank you.
Your input was really helpful.

I can use some geometry to display instaces, like this:


next step will be to find how to sort corner points, border points and center points.

Hi, this is not possible yet but has been mentioned by Jacques so it will happen (possibly in the form of a “faces to points” node)

It would be great and extend the field of procedural modeling

Hi SGarnier,
This is probably a very late reply to your question but I’ve just stumbled upon your thread and I think that I may have a work-around for your question. Currently, as Hadriscus had pointed out, it isn’t possible (yet) to set the positions of all the points on a particular mesh to different positions that you want (in this case, central face position). However, by there’s still a work-around for this.

Here is an explanation of how you can achieve it.
First of all, it’s essential that you need to use the “Edge Split” node so that for every face that’s there on your mesh, it gets 4 separated and unique points.


By doing so, now you can transfer these points’ coordinates (points’ position) from the “Vertex Domain” to the “Face Domain” and store it there. The coordinates of these points, when being stored moved from one domain to the other (in this case, "Vertex → “Face”) will be averaged out automatically and you’ll be able to get the central positions of these faces on your mesh.

Now, you can mix the points’ original positions to your new central position and it’ll move all of the points to that central position. However, if you choose to do so, the problem that remains is that you’re left with 4 points overlap on each other, which is very annoying and in most cases, unusable.

To fix this, we need to find a way to get rid of the other 3 points and keep one. This is rather simple, by using the index numbers (combine with a “Modulo” math node) and storing it inside your “Face Corner” domain, you can get the index position for each of the points that’s on your face and then use a “Float Compare” to eliminate the points that you don’t need.

Here’s the screenshot of the full node graph.


You can use these points to instance whatever you want.

2 Likes

Great work you made here. It helps me a lot as I lack bases in these low level operations.

I beleive it is a 3.0 beta version, because I cant find this attribute extract node and the next store persistent attribute.