Honeycomb Pattern Trouble Shooting

   2137   4   1
User Avatar
Member
11 posts
Joined: May 2018
Offline
I'm making honeycomb-esque pattern as practice, but I'm running into a small issue. From my picture you can see I want each honeycomb to have a different orientation on the top part, the bottom is untouched creating a perfect grid. I'm just using a copytopoints making a grid then copying a hexagon for the grid. After that I assumed I would use attributerandomize with “orient” as the attribute. Unfortunately, I think this uses radians by default so the hexagons rotated really wildly with even small inputs. I found it unwieldy so I switched to a pointVOP. With my current set up I'm using “bind -> orient” then converting the output with a radtodeg before feeding into a bind export. This sort of works, but all the hexagons have a certain bias, that is to say, they are all facing generally in one direction. They definitely have random orientation to it, but just not fully what I want. In an ideal world they would have the chance to face in any direction. If that seems confusing if you pick up the project file it will make sense to you.

I'm a bit new to this still, so to anyone with better knowledge than I, some pointers would be great!
Edited by Bobo_The_Imp - Jan. 8, 2019 15:23:43

Attachments:
Honeycomb.hipnc (216.5 KB)
Honeycomb.png (413.7 KB)

User Avatar
Member
2534 posts
Joined: June 2008
Offline
If you are just looking to randomize the points of the top face, you can run some code over the group that is produced by the polyextrude.
// Set distortion range here.
float rnd_Y = fit01(rand(@ptnum),-0.1,0.1);
@P.y +=rnd_Y;

Attachments:
ap_Honeycomb.hipnc (221.2 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
11 posts
Joined: May 2018
Offline
Not quiet, sorry if I didn't explain enough. The tops need to be flat, so using P.y and random fueled by @ptnum doesn't work, as it distorts the top. Maybe that could create a cool warped effect though.
User Avatar
Member
1737 posts
Joined: May 2006
Online
Go back to your attribrandomise, choose a mode that is designed for rotation.

Set the distribution mode to ‘Direction or Orientation’, now they'll be randomly facing in any direction. Enable the ‘cone angle’ toggle, and play with the slider. At 0 the rotation is completely restricted so they only point up, at 180 they can face in any direction, I found about 20 degrees looked nice.

The polybridge thing you're doing will get twisted, there's a toggle on it to reverse the winding and make them bridge correctly.
Edited by mestela - Jan. 9, 2019 19:58:05
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
11 posts
Joined: May 2018
Offline
Yup, that's working much better, thank you so much for pointing that attributerandomize setting out. They began to intersect, which I knew would happen, so I just set an attributewrangle to "@rot = 0;" then I got exactly what I wanted.

Thanks for the help guys.
  • Quick Links