Jump to content
Rival Consoles

Modify grid pattern from Hexagon to Triangle using attribute

Recommended Posts

Hello all,

Does anyone know how to transform a hexagon grid to a triangle grid but only on the areas where a, let's say, sphere is? I'm thinking about using a geo with attributes to drive the change on the hex grid.

Almost like that simple definition found on mr #mestela wiki's page where the grid size changes according to where the sphere is but instead the change on the grid size i would like to change the grid "connectivity".

Any help would be greatly appreciated. 


Share this post

Link to post
Share on other sites

Hey f1480187,

Fantastic. Great solution and the best part, it is a fast one to process.

Thank you very much for sharing! By the way, that diffusion reaction solution that you wrote is amazing. I've been dissecting it and it looks sharp.

One more quick question, how do you go about translating these visuals found in nature into coding, or maybe i should say, 3d models? I understand the scientific papers analysis that some people do but do you go that deep or is it just years of experience commanding the machine?  

Share this post

Link to post
Share on other sites

It is definitely working! I'm studying Houdini everyday and it is one of the coolest things that i have ever seen in 3D for the last 10 years but definitely presents a steep learning curve which is ok. 

So, i have another question. I'm trying a different approach for the hex to tri grid, having your insight in mind, and it seems that something is not working as expected. Of course...

I built a grid with reverse triangles, transformed it and scaled it like you did, used the "delete" node in order to have a squared grid, and then created a vertex attribute using the "crease" sop and an "offscale" attribute using attribute wrangle for the grid and a sphere that i will use to drive the change. I attached an image showing the implementation and also the scene file.

That "offscale" attribute will drive the offset parameter from the "polybevel" sop. However, the "polybevel" sop requires a vertex attribute which was created using the "crease" sop. When i try to transfer the attributes from the sphere to the grid, nothing happens.

That said, is it possible to have the same result presented by you but using the "create attribute" method where i create an attribute on a secondary geo that is recognizable by the first geo? Man, this looks like a silly question but it is the way that i found to ask it....




Share this post

Link to post
Share on other sites

Debug stuff with visualizers. Attribute Transfer didn't work with vertices, for some reason. Since result must be the same for points, you can use point attribute and promote it to vertices later. offscale must not be zero, otherwise offset won't be scaled. Use very small values like 1e-5. Same thing applies for offset itself: if it is zero, Houdini will "conveniently" refuse to bevel.


Edited by f1480187
  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now