2
$\begingroup$

I'm generating a world made of hexagons with dynamically varying heights.

To improve the performance, I'd like to remove all faces that are duplicates, i.e. that

  • are directly facing each other (opposing normals and no distance between)
  • have the same face area

I tried around with raycast and compare nodes but not to a satisfying result. Eventually I'd want it to look like below, that all same-height hexagons have no dividing walls, and only those that have variying heights have. Current Situation Target Design

$\endgroup$
6
  • 1
    $\begingroup$ pls provide blend file so we don't have to rebuild everything manually. thx. $\endgroup$
    – Chris
    Commented Dec 19, 2023 at 13:19
  • 1
    $\begingroup$ Hello, have you tried instancing hexagons and then using the extrude node with the Individual Elements checkbox off ? $\endgroup$
    – Gorgious
    Commented Dec 19, 2023 at 13:19
  • $\begingroup$ @Chris, how do I add a blend file? Sorry, I'm new to this exchange $\endgroup$
    – simatao
    Commented Dec 20, 2023 at 8:04
  • $\begingroup$ Thanks @Gorgius, I just tried that but the "individual" checkbox seems to have no effect. $\endgroup$
    – simatao
    Commented Dec 20, 2023 at 8:05
  • $\begingroup$ @Chris I've uploaded the file here: dropbox.com/scl/fi/lfwrigau9g7amar6uyroe/… $\endgroup$
    – simatao
    Commented Dec 20, 2023 at 8:11

2 Answers 2

2
$\begingroup$

Another possibility:

enter image description here

Its made in two times:

Top part of the node tree: merge only the base vertices, then remove vertices that have more than 3 vertex neighbourg and more than four face neighbourgs.

This first result works well but also removes part of hexagons that are isolated by their height.

Bottom part: merge all and remove vertices that have more than 3 vertices and have 3 faces.

Also works well but also removes part of the contour.

So join the two and merge again by distance.

The result is also around 2.8k vertices.

enter image description here

$\endgroup$
1
  • $\begingroup$ lemon's approach seemed more intuitive and it worked on first try, thanks you both for coming up with fantastic solutions. I'm really impressed what geonodes can do with a little bit of fantasy and lots of math :P bravo! $\endgroup$
    – simatao
    Commented Dec 20, 2023 at 22:40
1
$\begingroup$

you can try this setup here, although i am not sure whether it is very performant - maybe you try that out, i was too lazy ;)

enter image description here

result:

Faces shrink from 3.8k to 2.8k

visualized faces which were deleted:

enter image description here

Hope it helps.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .