Jump to content

Carve with randomize


Recommended Posts

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

Link to comment
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.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...