Poly extrude and curves confusion...

   5668   7   2
User Avatar
Member
14 posts
Joined: Feb. 2017
Offline
Hi,

Just beginning to wrap my head around Houdini (from Modo/Maya/Nuke).

This is stumping me though.

Create a curve, no problem. In the curve network copy and paste another curve and then feed both into a polyextrude, with the aim of one curve being extruded along the second.

So it sort of works, but the extruded shape *never* follows the path curve exactly. it's always skewed. The distance parameter is also arbitrary, i'd assumed 0 to 1 would be up the full length of the spine curve, but it seems that i have to go over 1 to get it there.

I'm sure this is clearly something i'm doing wrong but i'd really appreciate any pointers as to what i am doing wrong…?

thanks
Paul
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Try the Sweep SOP. Put one curve in the first input and the other curve in the second input. Set the Skin Output parameter to “Skin with Preserve Shape and Auto Closure”. You may need to transform the first input curve, since it's transforming it using a basis constructed from the second input's curve. Hopefully that gets you what you need.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
14 posts
Joined: Feb. 2017
Offline
Thanks Nick,

The sweep seems to follow the path very easily by comparison but it's missing the ability to taper the cross section like the extrude does, drawing a taper curve.

I'll need to do some reading of the sweep SOP and see whether it can be controlled like that.

But even so, i'm still wanting to understand what the distance parameter means or does with the extrude tool, i don't see why i can just get that to work! (Well not enough knowledge from me no doubt!)

thanks
Paul
User Avatar
Member
1743 posts
Joined: March 2012
Offline
With the sweep SOP, if you have a pscale attribute on the second input's curve, it will scale the first input's geometry by that at each point.

I don't know as much about the PolyExtrude node, myself.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
14 posts
Joined: Feb. 2017
Offline
Hi Nick,

Can you point me to any docs explaining how to do that with pscale (i believe there's also a pamount which could be animated to create the sweep along the curve?

Sorry, whilst i understand what i'm trying to do, i don't know houdini well enough to do it yet!

cheers
Paul
User Avatar
Member
1743 posts
Joined: March 2012
Offline
paulinventome
Can you point me to any docs explaining how to do that with pscale (i believe there's also a pamount which could be animated to create the sweep along the curve?
The set of attributes that can be used to affect the transform are described briefly in the description for this parameter: http://www.sidefx.com/docs/houdini/nodes/sop/sweep#xformbyattrib [www.sidefx.com] As for how to create the pscale attribute, I would probably slap together some VEX in Attribute Wrangle, but I realize that's not how most people would do it.

The details of the transformation are described in more detail here: http://www.sidefx.com/docs/houdini/copy/instanceattrs [www.sidefx.com]

Cheers,
Neil
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
343 posts
Joined: Dec. 2014
Offline
Do this in a VEX wrangle:

float scaleramp = (float)@ptnum / (@numpt+1);
float r = chramp(“scale”,scaleramp);
@pscale = r;

And hit the make UI button on the side of the wrangle OP to create the ramp.

This divides the current point number by the total number of points on your curve and stores that as a float in scaleramp, that's your 0-1 ramp attribute that's used in the chramp (channel ramp) interface attribute. The last line sets pscale to the value you set with your ramp.

Attachments:
sweepScale.hip (65.3 KB)

User Avatar
Member
14 posts
Joined: Feb. 2017
Offline
moogtastic
This divides the current point number by the total number of points on your curve and stores that as a float in scaleramp, that's your 0-1 ramp attribute that's used in the chramp (channel ramp) interface attribute. The last line sets pscale to the value you set with your ramp.

Great! This is helping, i really am just wrapping my head around this stuff but this appears to make sense to me. There's a bunch of knowledge i just don't know yet but this is enormously helpful.

Now growing along the spine. There's a local called $PCT, but that's not an attribute. So i can't add say, @pct = 0.5 in that vex. So how would i go about animating a local $PCT in a sweep? Maybe through a ramp too, so to grow the object along the spine?

thanks!
Paul
  • Quick Links