Jump to content

Translating expressions from v14 to v16.5


AnthonyVFX

Recommended Posts

 

Hi there. 

 

I’m having some trouble translating two parameter expressions in this tutorial using Houdini 14 to Houdini 16.5:

https://player.vimeo.com/video/130386299

 

The first expression is for the Value parameter in a attribute create node (given the name “WIDTH”). It is meant to tapper the octopus tentacle geometry. The attribute was created as a Ramp Float (given the name “cross”), in a null node named “Cross_RAMP.” The expression looks like this: 

 

chramp(“../Cross_RAMP/cross”,$PT/$NPT,0)

 

The second expression is meant to help centralize control for the Scale parameter in a sweep node. The expression look like this:

 

point(“../WIDTH”,$PT,”width”,0)

 

So the null where the ramp was created is being tapped in the attribute create node, which is being tapped by the sweep node. 

 

But it is not working. 

 

The errors I get for these offer some leads, but I’m too new to code expressions to sort it out on my own. Wading through the online documentation and trial and error has not yet proven fruitful. I could use some help.

 

Would someone tell me the proper expression to write, either with a VEX snippet, or other such replacement code?

 

Thanks in advance for time and efforts.

 

 

Link to comment
Share on other sites

first of all please format your post next time to make it easy on the eyes. That font size is insane.

Houdini shifted away from using variables prefixed with $ to the VEX style using @ symbol
so chramp(“../Cross_RAMP/cross”,$PT/$NPT,0) becomes chramp('../Cross_RAMP/cross', @ptnum/npoints(0), 0)

instead of npoints(input) which gives you the total number of points in the input you might try using @numpt (a variable that VEX understands). but my guess is that it's not gonna work in expressions, can't test it right now though

in the second expression replace $PT aswell

Edited by 3dome
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, 3dome said:

first of all please format your post next time to make it easy on the eyes. That font size is insane.

Houdini shifted away from using variables prefixed with $ to the VEX style using @ symbol
so chramp(“../Cross_RAMP/cross”,$PT/$NPT,0) becomes chramp('../Cross_RAMP/cross', @ptnum/npoints(0), 0)

instead of npoints(input) which gives you the total number of points in the input you might try using @numpt (a variable that VEX understands). but my guess is that it's not gonna work in expressions, can't test it right now though

in the second expression replace $PT aswell

That font is insane. All apologies.  I cut, pasted, and posted the text from notes on my phone; and as it was my first post I did not recognize it as enormous.

Otherwise, thanks so much for venturing the suggestions. I will give them a shot. 

 

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