Jump to content

Carving Multiple Curves By attribute (HIP file attached)


Recommended Posts

Hey guys! 

I have a bunch of hair strands here, they each have a PRIM attribute "dist" that is the distance from the center of the hair bunch between 0-1. 

i would like to carve each curve by the dist attribute. 

I have successfully accomplished this in the hip file, but i used a foreach node, which is way too slow for my taste, anyone have a faster way of doing this pleaaase? It's slowing my hair node by 100% 

H13 

dropbox, and attached 

https://www.dropbox.com/s/phb074flfkdp4gy/carve_help.hip 

 

 

 

XWxi69M.png

carve_help.hip

Link to comment
Share on other sites

I don't think you can do that because Carve SOP doesn't support $PR or any custom variable unfortunately. I think it's designed to carve geometry at once using the same settings. Consider submitting an RFE to SESI so they could implement it :)

Link to comment
Share on other sites

daaamn okay. Yes i noticed it doesn't support custom local variables, would be nice! I posted it up on sidefx forums.

 

I tried doing it by deleting points, but i didnt get such a nice interpolated result that you can get with Carve or extreme amount of points.

 

edit: what's an RFE?

Edited by Vivi
Link to comment
Share on other sites

It's basically Request For Enhancement, that you can submit from here:

http://www.sidefx.com/index.php?option=com_content&task=view&id=768&Itemid=239

 

Someone might come up with a different approach. I think you could resample and then delete, and then convert them back to NURBS if they were NURBS, but that would also increase cooking time.

Link to comment
Share on other sites

  • 1 year later...

There is a method here using a attribWrangle:

 

 

Workflow is basically to basically create new geo on top of the old geo.  Sample the points from the old prims, and rebuild new prims but using an attribute to drive how far along the UV direction of the curve, then delete the old prims.

Link to comment
Share on other sites

  • 1 year later...
On 7/14/2015 at 6:14 AM, mawi said:

Try this...

 

Put down a measure SOP and set it to measure the perimeter of your curves.

After that a primitive wrangle and write.


#include <groom.h>

adjustPrimLength(0, @primnum, @perimeter, @perimeter*@dist);

groom.h is a included file containing some functions used in the grooming tools and one of the functions is...


void adjustPrimLength(const int geo, prim; const float currentlength, targetlength)

Really Cool technic ! Thanks so much!

  • Like 2
Link to comment
Share on other sites

  • 8 months later...

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...