JacquesLucke / animation_nodes

Node based visual scripting system designed for motion graphics in Blender.
Other
2.29k stars 342 forks source link

Proposal: Hexagonal Distribution #1706

Open Gerstmann-Bradley opened 3 years ago

Gerstmann-Bradley commented 3 years ago

There's a reference from Sverchok "Polygon Grid" node. I'm not sure how far we need this. because its' a much more complex node in reality. Another thing is that I think both vertices of hexagon or Centers of a hexagon are important information that's needed. Current workaround is to Replicate "Circle Mesh" Node so we may potentially get vertices and centers of a hexagon, but it's difficult to make it mathematically correct. Considering the fact we may need both vertices and centers of a hexagon as output. I think we need to make a separate node besides distribution matrices node? What do you think? image image

OmarEmaraDev commented 3 years ago

So a Hexagonal Grid Mesh node?

Gerstmann-Bradley commented 3 years ago

So a Hexagonal Grid Mesh node?

Yes, I think that's acceptable.

dapa5900 commented 3 years ago

@OmarEmaraDev and @Gerstmann-Bradley

I built a setup for this a while ago and think I got the math right based on some algorithm I found online. You can check it out here, maybe it helps:

https://p7s1-my.sharepoint.com/:f:/g/personal/par0001d_belgium_fhm_de/Eq0yQVSYfZNHrVcE-YQ6pTIBZ_zEucGlNTBfCD39bn1zBw?e=iO5ozS

It would be cool, if this can be implemented natively. Thank you

OmarEmaraDev commented 3 years ago

@dapa5900 Seems to be similar to @harisreedhar's implementation in #1707. I want to merge a more general implementation though as I described there.

harisreedhar commented 3 years ago

@OmarEmaraDev I have a patch for Hexagon distribution in Distribute Matrix node. Do you think it worth adding to master?

https://user-images.githubusercontent.com/46858047/117156708-98ec5400-addb-11eb-80f1-d99c97fdf59c.mp4

OmarEmaraDev commented 3 years ago

@harisreedhar Sure.

lgmventura commented 2 years ago

I consulted this reference when programming my music visualization software. It is a very helpful, exciting and interactive reference for understanding and programming hexagonal grids. I strongly recommend it.