Tapering the Width Attribute of a Polywire node when your object consists of many separate objects (hairs)

   8881   8   1
User Avatar
Member
5 posts
Joined: March 2019
Offline
Hi all!
I am very new to Houndini and I was wondering if anyone could help me tackle this issue:
I am wanting to extrude hairs along my imported alembic and have a width ramp to adjust the width at various points.

Heres what I have done so far:
1. Import my curves as an alembic into Houdini.
2. Converted them to a nurbs curve and resampled them.
3. Attached a polywire node.

From here on I have experimented with various options, but haven't been successful.

The most promising appeared to be creating an attribwrangle node above the polywire.
Here is pictured:

However, it isn't working as expected… I think my point numbering would have to be on a per-hair basis for it to work? I am not too sure. I am wondering if it would work, if I separated each curve and somehow renumbered them to be the same (eg, each had 0-20 points), however I couldn't work that out. Heres what my numbering is like currently:

Attachments:
houdini1.PNG (902.2 KB)
houdini2.PNG (395.6 KB)

User Avatar
Member
310 posts
Joined: July 2012
Offline
I'd suggest packing the geometry, then using a connectivity with a for each to make each curve a separate object. Using a resample sop, disable max length and set max points to 20 to get a consistent amount for each curve. Then, I'd also suggest trying to control the width with color. Use a ramp from red to black with red being where you want the widest part of the curve, then multiply the width attribute by @Cd.r. If you need more help, post a hip!
User Avatar
Member
192 posts
Joined: Oct. 2018
Offline
You can use a UV Texture set to Rows & Columns on the points. You then make a wrangle where you say:

f@u = v@uv.x;

f@width = chramp("remap", f@u) * ch("size");

And then delete your uv attribute.
User Avatar
Member
5 posts
Joined: March 2019
Offline
Midasssilver
I'd suggest packing the geometry, then using a connectivity with a for each to make each curve a separate object. Using a resample sop, disable max length and set max points to 20 to get a consistent amount for each curve. Then, I'd also suggest trying to control the width with color. Use a ramp from red to black with red being where you want the widest part of the curve, then multiply the width attribute by @Cd.r. If you need more help, post a hip!
mkps
You can use a UV Texture set to Rows & Columns on the points. You then make a wrangle where you say:

f@u = v@uv.x;

f@width = chramp("remap", f@u) * ch("size");

And then delete your uv attribute.

Hi all,
Sorry for such a late reply!
I have come across this problem again (I never managed to solve it last time, but now I am very determined to solve it and learn houdini better)
Any help will be much appreciated!
I am still new with houdini.
Here is a HIP file I am working with.
I can't work out how to use a connectivity node to separate out the curves, unfortunately.
My goal is to extrude a tube along the curves and have a width ramp so I can taper the tips and roots.

(I managed to get a box to extrude on samples points using a sweep node, but after hours, am still struggling haha)


Any help much appreciated!

Attachments:
hairCurvesExtrusion.hipnc (44.2 KB)
Capture.PNG (423.5 KB)

User Avatar
Member
738 posts
Joined: Dec. 2006
Offline
Your file has an alembic node in it without the accompanying alembic file. Put a stash node after it, stash and repost.
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
5 posts
Joined: March 2019
Offline
mrCatfish
Your file has an alembic node in it without the accompanying alembic file. Put a stash node after it, stash and repost.

Ah! My appologies. Thank you for your insight.
Here is a new scene with a stash node, and my current workings.
Cheers

Attachments:
hairCurvesExtrusion.hipnc (6.9 MB)

User Avatar
Member
5 posts
Joined: March 2019
Offline
My co-worker helped me figure it out this morning using this method, posting incase it helps anyone else.

Attachments:
houdiniExtrude.PNG (948.3 KB)

User Avatar
Member
192 posts
Joined: Oct. 2018
Offline
Here's your file with the method I was describing too.

Attachments:
hairCurvesExtrusion_mk.hipnc (7.0 MB)

User Avatar
Member
5 posts
Joined: March 2019
Offline
mkps
Here's your file with the method I was describing too.

Awesome! Thank you for that, have learnt a lot!
  • Quick Links