Assign id by point point colors
1304 2 0- tadian
- Member
- 90 posts
- Joined: 3月 2013
- Offline
- animatrix_
- Member
- 4685 posts
- Joined: 2月 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]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- tadian
- Member
- 90 posts
- Joined: 3月 2013
- Offline
-
- Quick Links