Search - User list
Full Version: How to split a primitive in staggered order?
Root » Houdini Indie and Apprentice » How to split a primitive in staggered order?
Precar_Dan
I'm making an acoustic panel generator for ue4. The idea is that the incoming geometry is divided into approximately square polygons that are replaced by a pre-modeled geometry:



After subdivision, I use group by range to get the chess pattern. Everything works fine.

The problem occurs in cases where the incoming geometry does not have the shape of a square.



In such cases, it is better to work with LOT subdivision, since the result is almost square polygons. However, the sequence of polygons changes as the incoming geometry rotates, so the pattern in breaking. I tried using SORT, but it doesn't solve the problem when rotating the geometry — the primitives order changes anyway.






Is there a more suitable solution for this task?
Aizatulin
Hi,

if you want checker pattern, you can also try shortest distance node on the dual graph (primitive -> points) of your geometry. There are probably other ways as well, but in this one you don't have much extra work. Here is a file ...
tamte
you can also use Group Expand + Group Expression Nodes

Group Expand:
- Group Name (you can delete as we don't need to output group)
- Base Group: 0 (or whichever poly you want to expand from)
- check both Require Prim to share edge + Flood Fill...
- check Step Attribute (this will output the @step attribute used in Group Expression)

Group Expression:
- VEXpression: i@step%2
Konstantin Magnus
Graph color node set to 'Polygon edge'.
Precar_Dan
Aizatulin, tamte, Konstantin, Thank you! I'll try those approaches.

Aizatulin, thanks for the file!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB