Assign id by point point colors
1776 2 0-
- tadian
- Member
- 92 posts
- Joined: March 2013
- Offline
-
- animatrix_
- Member
- 5042 posts
- Joined: Feb. 2012
- Offline
Hi,
You can convert your colors into IDs like this using an Attribute Wrangle:
If you want to consolidate the IDs to be ordered without holes, you can add another wrangle like so:
You can convert your colors into IDs like this using an Attribute Wrangle:
i@color = floor ( @Cd.r * 1e6 + @Cd.g * 1e3 + @Cd.b );
If you want to consolidate the IDs to be ordered without holes, you can add another wrangle like so:
int colors [ ] = uniquevals ( 0, "primitive", "color" ); @id = find ( colors, i@color );
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]

-
- tadian
- Member
- 92 posts
- Joined: March 2013
- Offline
-
- Quick Links