add color via point vop fail

   2110   3   0
User Avatar
Member
50 posts
Joined: April 2017
Offline
Hi,guys.

I am new in houdini. I want to add color via pointvop in Houdini 16.for example,there is a sphere in the scene,if the points on the sphere above the zero,add a red color,other points add a blue color. I try this vop setup below(as the screen shot),but fail,could you help me? Thank you!

Attachments:
color switch.PNG (68.7 KB)

User Avatar
Staff
5158 posts
Joined: July 2005
Offline
Are you using polygon sphere, or a primitive sphere? The former has points on its surfaces, wheres the primitive sphere has a single point at the center of the sphere (so that setup won't work). Make sure you're not using Primitive Spheres.
User Avatar
Member
7759 posts
Joined: Sept. 2011
Online
Add attribute isn't for setting the value, just for creation. Connect the color to the Cd input on the geometryvopoutput node or a bind/parameter node to output the value instead. The setattrib vop will also allow setting the value, but is slower than using bound attributes.
User Avatar
Member
50 posts
Joined: April 2017
Offline
Thanks all.as what jsmack said,it is working now!
  • Quick Links