how to get the id of primitive

   11815   5   1
User Avatar
Member
4 posts
Joined: Nov. 2006
Offline
how to get the id of primitive according to its color?
for example: how can i get the id of primitive (or point ) which variable Cd1>.5?
thanks
User Avatar
Member
19 posts
Joined: July 2005
Offline
First off, welcome to the forums!

Your question is a little bit misleading… For example, primitives and points don't have an ID attribute by default (only particles do). There is however, a point/primitve number each one gets.

Secondly, what happens if 200 points/primitives in your scene have a $CR > .1 ? Which point/primitive number do you want it to return?

Perhaps we can be of more help if you explain what this is for.

On a side note, there is a poppointid expression that might be of use to you if this is for particles.
User Avatar
Staff
3462 posts
Joined: July 2005
Offline
you can use the Group SOP…..
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
4 posts
Joined: Nov. 2006
Offline
Thanks for the reply!!
I just want to select all the primitives or points which have certain indentical attribute, such as color, normal …
I use a Group SOP, and want to use a expression to select I want.
I dont konw which expression/SOP can doing this..

thanks again.
User Avatar
Member
4 posts
Joined: Nov. 2006
Offline
oh~~~ I get the answer
it is need a attribute create SOP to get variable, and then used in expression..
User Avatar
Member
2 posts
Joined: Sept. 2006
Offline
If you were grouping by color like in your first example, the variables you don't need an attribute create sop to create those custom variable mappings (so you can type $MY_VAR), Houdini already gives you those: $CR, $CG, and $CG for Red, Green, and Blue respectively
if (sleepy == true)
add_caffeine();
else
add_caffeine();
  • Quick Links