Jump to content

could I use a custom attribute in the attribute transfer node?


Recommended Posts

Hello everyone

 

sorry if this is a silly question, i am still learning Houdini, coming from softimage. 

 

I love the attribute transfer node, but i am having a problem with the node. It might be me, but it doesn't seem to take or custom attributes. only global variables. 

 

I created a "blend" attribute to control the "distance threshold" within the attribute transfer node. but it gives an error saying "unable to evaluate expression(Undefined variable..

 

could I use a custom attribute in the attribute transfer node? 

post-15310-0-99325600-1456705353_thumb.j

Link to comment
Share on other sites

I've been playing around with this node for a bit and I think the distance threshold is only run over once, meaning it can only have one value for all the interpolated points.

 

It doesn't take custom attributes for me either. You can force one in there with a point expression  -  point("../attrib_create",@ptnum,"blend",0)  but @ptnum always evaluates to 0, so it'll always pull the value off of point number 0. Kinda pointless.

 

If you want to store a custom value for it, you might as well use a detail attribute and get it with a detail expression.

 

I'm not exactly sure what you are after as you didn't upload your hip file. Does that answer your question?

Link to comment
Share on other sites

If you want to do this, you can do this inside a forloop, grouping the points by certain blend value range.

 

If you are feeling more ambitious (and performance is an issue), you can attempt writing some vex (wrangles) for this, to create your own transferring node, not technically beginner stuff, but probably the best way to do this. (fastest cooking times, except for probably HDK nodes)

Link to comment
Share on other sites

I had time to play around with this tonight and see if I could get it working. Using a foreach, I was able to have different blend values stored on the points that were then used by the attribute transfer sop. (good idea acey195)

 

I set up the sine waves radiating after the foreach was done.
 

I found it much more effective to use the blend attribute to control blend width rather than distance threshold, as its the gradient that I used to create the sine wave.

 

Hopefully this helps - there was a bunch of stuff to set up on the foreach nodes. I think this is the simplest way you can get it to work though. Theres a few expressions I had to use to pull the correct data in.

 

 

16_02_29_radiating_sine_waves.hip

post-7586-0-10639500-1456808126_thumb.gi

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