Jump to content

Recommended Posts

Hi Everybody,

Im looking at Entagma's shortest path growth by Ben, trying to find a way to randomise the carve sop.

Any ideas, also Im new to Houdini, sorry for being a hassle.

Share this post


Link to post
Share on other sites

I like to do this with the Clip SOP instead of Carve. You just have to smash all your curves into UV space first, so that they're all lined up neatly along a single axis. The Resample SOP can get you the "curveu" attribute, which you can use to move all your curve points into a normalized UV space, and then the Clip SOP neatly trims them. To randomize, just move each primitive up or down before clipping. Then move the points back to their original space.

Attaching an example.

randomize_carve_toadstorm.hip

Share this post


Link to post
Share on other sites

alternatively you could use VEX.

1. create a measure sop (to measure the perimeter)

2. create a primitive wrangle with something like the following code:

//do this after a measure sop

#include <groom.h> 

float factorPerPolygon = fit01(rand(@primnum), .5, 1);
  
adjustPrimLength(0, @primnum, @perimeter, @perimeter * factorPerPolygon);

in above example each curve will be randomly refit between 0.5-1 times its original length.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×