Need random bend direction
810 4 2-
- dhuiting
- 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,
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,
-Dan Huiting
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
-
- toadstorm
- 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]
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]
-
- dhuiting
- 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
-
- toadstorm
- Member
- 404 posts
- Joined: April 2017
- Online
It's pretty straightforward once you understand how to generate the attributes you need. Hip file attached.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
-
- Quick Links