How would I transform a string attribute into a float to use in random.
I am trying to use the name attribute produce by the assemble SOP which is string to randomly give color to each primitive.
but rand (@name) will not work… I assume because it requires a float.
Any ideas?
String to float for random
6210 2 1- Nicolas Heluani
- Member
- 280 posts
- Joined: Dec. 2015
- Offline
- megasets
- Member
- 85 posts
- Joined: Aug. 2010
- Offline
could be worth checking out the atoi vex function
http://www.sidefx.com/docs/houdini15.0/vex/functions/atoi [sidefx.com]
http://www.sidefx.com/docs/houdini15.0/vex/functions/atoi [sidefx.com]
Edited by megasets - Sept. 13, 2016 14:03:28
Sam Swift-Glasman
Art Director
Five AI
Art Director
Five AI
- Nicolas Heluani
- Member
- 280 posts
- Joined: Dec. 2015
- Offline
-
- Quick Links