Need random bend direction

   810   4   2
User Avatar
Member
43 posts
Joined: June 2021
Offline
I'm following this tutorial (https://www.youtube.com/watch?v=qIP_Ai4Had4) and trying to make a grass generator. I have grids copied to points with random orient and scale, and I want to bend in random amounts with random directions. I have the random bend amount working, but the bend direction is all going one way (see screenshot). I want the bend direction pointing many different random directions and have that be controllable some how for randomness amount.

I've attached a .hiplc file of where I am at so far. If possible to respond with a working hiplc file that would be great!

thanks,

Attachments:
Screenshot 2025-07-31 at 4.09.05PM.png (7.2 MB)
Grass Bend.hiplc (184.7 KB)

-Dan Huiting
User Avatar
Member
2658 posts
Joined: June 2008
Offline
You might want to consider using instances.
Edited by Enivob - Aug. 1, 2025 09:45:52

Attachments:
rnd_grass.gif (1017.3 KB)
ap_random_vex_rotation_instance_grass_080125.hiplc (244.2 KB)

Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
404 posts
Joined: April 2017
Online
It's possible to bend each instance uniquely, but as Enivob said it's not going to be efficient at all because each copy will be unique and you lose all the benefits of instancing. It might be better to make a few variants with different amounts of bending, then randomly instance those variants to points.

If you do need to deform each instance individually, it has to be done in a for/each loop. See the example here: https://www.toadstorm.com/blog/?p=942#for-each [www.toadstorm.com]
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
43 posts
Joined: June 2021
Offline
toadstorm
It's possible to bend each instance uniquely, but as Enivob said it's not going to be efficient at all because each copy will be unique and you lose all the benefits of instancing. It might be better to make a few variants with different amounts of bending, then randomly instance those variants to points.

If you do need to deform each instance individually, it has to be done in a for/each loop. See the example here: https://www.toadstorm.com/blog/?p=942#for-each [www.toadstorm.com]

I think this is a great idea. I could use a little help setting it up please. Do I make say, 5 variants spaced out so they aren't touching, merge them, add connectivity SOP with custom attribute, then use that attribute to drive random copying to points somehow?

I just need help setting it up. If possible to send a screenshot or even better a .hiplc example that would be great!
-Dan Huiting
User Avatar
Member
404 posts
Joined: April 2017
Online
It's pretty straightforward once you understand how to generate the attributes you need. Hip file attached.

Attachments:
copy_to_points_variants.hip (870.5 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
  • Quick Links