# Curling hair curves with VEX

## Recommended Posts

Looking for some help on setting up a Wrangle that would curl a curve by rotating the last point in the curve around a point centered on the previous point, and doing that all the way down the chain so you get nice curls happening.

Been trying to work this out but I'm missing some knowledge here when it comes to looping through points per primitive, and also I'm not sure how to rotate a point with the rotation origin starting on another point. Basic idea is that given an @N and an @up vector on the curve, it will rotate each point about the previous point's @P using cross(@N, @up) as a rotation axis, by some user defined degrees/rads number.

The code would have to (far as I'm thinking so far) loop through all prims, and then loop through all points in each prim, rotating each one around the previous point.

##### Share on other sites

This is so cool to play with, thanks F1! Lots of things to learn from this bit of VEX code.

If you feel even more generous, I'm trying to work out one more problem with is clumping hair using different clump profiles along two different axes. Right now the clumping scheme is you determine which clump guide to use for a given curve, and then that curve's @P just gets mixed against the guide curve's @P until the two are on top of each other.

The issue with that is you just end up with spiky clumps no matter what, when what you're really after is an effect that leaves the hair curve's @P alone in the @tangent direction, but migrates @P in the @N direction towards the guide curve's @P in the @N direction. Very hard to explain in writing, but take a look at this picture to see what I mean. If you imagine the clumping guides are curled with the kind of VEX code you've setup here, then the hair strands need to clump along the guide's side profile, but not along the guide's front profile.

None of this is for any project I'm working on, I just saw a picture of this kid's hair and had to figure out how to set something up like it in Houdini.

SESI's fur CVEX procedural doesn't really have the inputs needed to achieve this though right now since they just import ClumpP without any information about the @tangent or @N of those clump curves.

Either way though thanks so much for the help, really learned a lot!

Edited by Kardonn
##### Share on other sites

• 10 months later...

Thanks! This is a great help to some flower petals I'm modeling

- Shawn

Oh wow, super !

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
×