Custom randomize size of copied geometry through the new Point node.

   3716   3   0
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Hello gurus. Today's question is something that I feel I'm close to figuring out but not quite.

My set up is simple, Box, Copy to Points, a Grid and finally a Point node to define some parameters.

I'm basically trying to figure out if I can randomize the height of my boxes strictly through the Point attributes.

I can get somewhat in the general vicinity of what I'm trying to do by using the Scale attribute and a rand function like this: value * float(rand(@elemnum))

However I would like to be able to control specifically the size randomness in x, y or z independently. As it is right now, it is applied uniformly to all of my geometry so that while I can achieve the variations in size, the geometry is scaled in x, y and z simultaneously.

So for instance, let's say I wanted to keep the x and z scale the same, but randomize the y scale from point to point in my grid.

Any ideas?

Attachments:
Screen Shot 2018-03-14 at 12.03.58 PM.png (795.9 KB)
Pillars_RandomHeight.hiplc (72.9 KB)

>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
You can take advantage of the vector signature of random, and use swizzling to keep the x and y components uniform.

Attachments:
boxy.png (1.8 MB)
boxy_dance.zip (27.1 KB)

User Avatar
Member
8525 posts
Joined: July 2007
Offline
a little less scary way to set just random z scale for example may be
value * set(1, 1, rand(@elemnum))

or then switching to Attrib Wrangle allow you simpler workflows like
v@scale = 1;
v@scale.z = rand(@elemnum)*10;
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Thank you both, awesome solutions! This is why I love this place.
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
  • Quick Links