Apply a geometry node on each face of a geometry

Hello,

I hope I can describe my problem clearly.

It can be assumed that all faces consist of four points.
I would like to apply my own written Geometry Node to each face of a Geometry. This means that I want to select one face per run and also determine the center of the highest and lowest edge of this area.

Unfortunately, I’m not very familiar with the mechanics of Geometry Nodes. Maybe I’m thinking a bit too much with normal programming languages.

Is it possible?

Thank you in advance and best regards
Erksen

Hi @Erksen and welcome to B.A.

Yes you can achieve what you want, in many ways in geonodes.

I recommend looking into the SIMD programming paradigm, as geonodes is based on this method.

One way to split a cube (apart from split edges) is with a dot product of the normal maybe like this…

Close up

Here I find X Y and Z faces by their normal, separate them and assign a material,

For finding centers of things you have Bounding box, Dual mesh, and subdibvision, these can all be used to determin object placement instancing etc.

There are many tutorials on YT.

I would recommend looking at

Default Cube/CGMatter.

Erindale

Johnny Matthews

Cartesian Caramel.

And some of the Geonodes people on here, Higgsas, Zeroskilz, Sozap.

and of course people in the support section will help you with specific questions.

Geonodes are great fun when you realise a little more how they work, but it can be a struggle at first.

Hope that helps.

3 Likes

this finds the center of highest and lowest edge positions. Mix factor 0 = highest , Mix factor 1= lowest Mix factor 0.5 = center

center.blend (1.1 MB)

in “evaluate on domain” node selecting face domain to apply things in face domain.

2 Likes

Thank you both.

Maybe I’ll explain my project in a little more detail.
I would like to replace all faces that have a certain angle to the ground (currently 30 to 45 degrees) with stairs.

For this I can already calculate the angle between the normal and the ground and select these faces.
As you can see in the picture:

Now I would call my own geonote with replace a face with 4 Vertex.
For this I need the face (mesh) with the 4 points and the start and end point. I can calculate the start and end point with the mesh. So basically the face is the last part, which is still missing.

But I am not sure, how to iterate over all faces.
Is there a way to run through the mesh like with a for loop?

Thanks again and kind regards
Erksen

Here is an example of what it currently looks like.

Yeah, not sure but you need for each loop kind of setup. I think something like that will come to blender but after they made progress with simulation nodes.

Why do you need loops? You have fields.

can do things like this Nuevo Aztec what what:

…from:

Check out Higgsas’ tesselate node-group also.

Good luck!

3 Likes

Just got curious." Tesselate" is magical but keeps your stairs inside the boundaries of the object.

Also "sample uv surface " method (erindale tutorial) seems to work but a bit fiddly and not perfect because of seams.

Your method looks handy, can you share what is happening inside that 2 node groups?

1 Like

Sure (For 3.5): quad grid placement experiment.blend (115.0 KB)

I was just experimenting with the topology nodes to see if I could parameterize the coordinates per face for grid placement.

If you can parameterize your input geometry then you should be able to place any quad-based geometry using that technique (the 2nd image above is the main part that does the mapping from (0-1,0-1) to the quad) - I have no idea how it compares to Higgsas’ technique TBH.

2 Likes

Great, thanks, not too complicated, I will study this. Higgsas is too complicated, need to spend some time to understand, a lot of x y z noodles all over.

Many thanks to all helpers.

I hope that from now on I might be able to do it on my own.

1 Like