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.
attr transfer
1888 4 0- deadalvs
- Member
- 196 posts
- Joined: Aug. 2011
- Offline
- Enivob
- Member
- 2531 posts
- Joined: June 2008
- Offline
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.
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.
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);
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.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- deadalvs
- Member
- 196 posts
- Joined: Aug. 2011
- Offline
- deadalvs
- Member
- 196 posts
- Joined: Aug. 2011
- Offline
- Enivob
- Member
- 2531 posts
- Joined: June 2008
- Offline
-
- Quick Links