Giving Pt's an specific point#

   2767   6   2
User Avatar
Member
100 posts
Joined: Aug. 2014
Offline
Hi there, I'm wondering if there is a way to specifiy specific point number values.

Ie. Say I have 4 pts, normally houdini would tell me they are 0, 1, 2, 3 … is there a way for me to.. make point #2… have a point ID of 20.. so its .. 0, 1, 20, 3 ?

Specifically what I want to do is associate a PT# with a group.. groupA is always PT# 37, groupB is always PT# 22.

Thanks for your help.
User Avatar
Member
4731 posts
Joined: Feb. 2012
Offline
Hi,

Point numbers can not have gaps. You can easily do this by using another point attribute such as ptnum. Then use this attribute in your groups.
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
User Avatar
Member
100 posts
Joined: Aug. 2014
Offline
Thanks, I wondered about the gaps.

Could you be a bit more detailed about your ptnum explanation.

Right now my groups are based on pt0, or $N etc.. are you saying an attribute and then use the expression function in the group node to call it.?

Thanks Ken.

PS. I think I have every single animatrix OTL installed
User Avatar
Member
4731 posts
Joined: Feb. 2012
Offline
I made a simple file showing it. So you can just use the local variable in the Group SOP instead of point expression. But defining specific values by hand for each point becomes tedious in any method AFAIK.

If it's a huge list, AttribWrangle in Detail mode would help where you could set point attributes using setpointattrib function per point.


As for Animatrix, thanks for your support, appreciate it

Attachments:
ptnum.hip (66.3 KB)

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
User Avatar
Member
100 posts
Joined: Aug. 2014
Offline
Awesome! Thanks a lot. I see what you did there.

Interesting. You have essentially setup a 2nd set of reference values for the group to look for.

So I can probably just use an attrib transfer to assign the value from the group to the local points.

Cheers, Ken
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
Can be also written as in AttribeWrangle:

if(@ptnum == 2)
i@pointid = @ptnum * 10;

or
setpointgroup(0, “test_grp”, 2, 1, “set”);

or
if(@ptnum == 2)
@group_test = 1;


Okay for a few point but painful for large number of points.
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
I'd suggest group by pattern if you don't have any special reason.
  • Quick Links