Jump to content

Modify grid pattern from Hexagon to Triangle using attribute


Rival Consoles

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. 

 

Link to comment
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?  

Link to comment
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....

  

Tri_Grid.PNG

Hex_to_Tri_Grid.hiplc

Link to comment
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.

Hex_to_Tri_Grid_fix.hipnc

Edited by f1480187
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...