attr transfer

   1882   4   0
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline
hi..

I'm struggling with the following.. I can't get this to work!

If I have a point with a float type attribute (0-1), e.g. 0.8.
How can I transfer this value over to a (close) primitive that case a prim color and map the float value 3 times (to Cd (to get the greyscale color)?

I tried this for 2 hours now, no luck.

Any input welcome!
m.
User Avatar
Member
2531 posts
Joined: June 2008
Online
You must first type cast the float into a vector, which is what your target, Cd is.
Drop down an attribute wrangle before the attribute transfer and try this code.
v@my_vector = set(f@my_float, f@my_float, f@my_float);
This will create a greyscale color value because all values for RGB are the same.

NOTE: You did not list the name of your float value so substitute your name for f@my_float. Also you will need to transfer my_vector to Cd, not my_float.
Edited by Enivob - May 26, 2017 19:36:30
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline
Ok, thanks for the inputs .. much appreciated!

So playing with this:

Is it only possible to transfer from points to points (with the same attr name and data type) and NOT from a point attr directly to a prim attr (an additional attr promote is needed)?
Edited by deadalvs - May 27, 2017 07:41:47
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline
here's something that works.

Attachments:
attrTransfer.hipnc (63.7 KB)

User Avatar
Member
2531 posts
Joined: June 2008
Online
You got it, attribute promote is a way to migrate attributes from one context to another.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links