Jump to content

Polyextrude Distance Scale


Homer0

Recommended Posts

Hi all, i've purchased the Helloluxx training "Tea and Cookies", and i've encountered a problem with the Polyextrude, since the course was made in Houdini 13, when you could use local variables in the parameters.

Problem is, if i try to drive the extrusion distance based on the object color, it works only if the "Divide into" is set to Individual components; which in my case is not usefull (i'm doing a tea spoon, trying to give it an extrusion higher in the handle than in the tip).

Any workaround for this issue?

Thanks ^^

 

Link to comment
Share on other sites

unfortunately it doesn't work. As i said, it works good when the geometry Y is located on Y=0. If you have a geometry with some point above 0 and others below; this methos flattens everything to Y=0 before it starts.

The solution would be to move the Point position along their normal, adding the value to the existing position; but sadly i don't know how to do such a thing.

 

Here's the scene:

Spoon.hipnc

Edited by Homer0
Link to comment
Share on other sites

Yep, now it works. Another solution that a user suggested on another forum was to use Displace Along Normal vop, tried that and basically it's the same ^^

Btw, i'm trying to undestard the VEX stuff, but i couldn't find a list of parameter to use. I searched in the help with no luck. Is there somewhere a list with all the parameters like @P , @N, @Cd, etc.?

Also i noticed, in your expression, that the + makes all the difference, correct me if i'm wrong:

@P.y = @N.y * @Cd.r;  = the Y position is egual to the Y normal multiplied for the red color channel

@P.y += @N.y * @Cd.r;  = the Y position is egual to the Y normal multiplied for the red color channel, added to the current Y position

Link to comment
Share on other sites

Hi, Yes your assumptions are correct. You could also do it in VOPs with the displace along the normal. 

which basically is what I did but just with VEX, sometimes is just quicker to write some code than going to VOPs.

@P.y = @P.y + @N.y * @Cd.r;

the += is just a shorthand operator

Here are some site that might help you as well.

https://www.sidefx.com/docs/houdini15.5/vex/snippets

https://www.sidefx.com/docs/houdini15.5/vex/lang

Edited by Sepu
  • 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...