Using an attribute to drive a color ramp color

   1673   7   0
User Avatar
Member
53 posts
Joined: March 2018
Offline
Is this possible? This is just returning 0, in my spread sheet every point has it as like 0.1344. Thank you for your time.
Edited by animationalex - June 12, 2023 18:13:26

Attachments:
Screenshot 2023-06-12 181214.png (82.1 KB)

User Avatar
Member
2537 posts
Joined: June 2008
Offline
Instead of a VOP, drop down a color node and choose Ramp from Attribute from the Color Type dropdown. Type your attribute name without the @ symbol into the Attribute field.
Edited by Enivob - June 12, 2023 19:05:06
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
53 posts
Joined: March 2018
Offline
Enivob
Instead of a VOP, drop down a color node and choose Ramp from Attribute from the Color Type dropdown. Type your attribute name without the @ symbol into the Attribute field.

Thank you for your response. What I am trying to do is create a AI generated color ramp. I am using MLOPs to generate an image from user prompts, then randomly grabbing 5 points, storing their color in an attribute, then reference them to a ramp. I have everything working up to referencing to a ramp.
User Avatar
Member
56 posts
Joined: June 2016
Offline
You can do it like Enivob says. Or if it has to be a vop you could just drive your ramp with the attribute of your choice.

User Avatar
Member
53 posts
Joined: March 2018
Offline
Xue_Yue
You can do it like Enivob says. Or if it has to be a vop you could just drive your ramp with the attribute of your choice.


Thank you for your response
User Avatar
Member
53 posts
Joined: March 2018
Offline
I got it to work, here is how you can put an attribute into a ramp. I had to break out my color into floats but at least it does what I want. edit:typo in code on second image *point(0, 0,"c02g", 0)
Edited by animationalex - June 13, 2023 12:27:44

Attachments:
Screenshot 2023-06-13 122354.png (71.6 KB)
Screenshot 2023-06-13 122310.png (79.7 KB)

User Avatar
Member
56 posts
Joined: June 2016
Offline
Ah, I have to say I didn't fully understand what you wanted to achieve. If you use the point expression like that you can directly access the elements of a vector attribute ("attr" is a vector point attribute in this case):



So you don't have to split it with vex before your ramp.
Edited by Xue_Yue - June 13, 2023 12:40:31
User Avatar
Member
53 posts
Joined: March 2018
Offline
Xue_Yue
Ah, I have to say I didn't fully understand what you wanted to achieve. If you use the point expression like that you can directly access the elements of a vector attribute ("attr" is a vector point attribute in this case):



So you don't have to split it with vex before your ramp.

Awesome, thank you so much for all your help!
  • Quick Links