Page 1 of 1

How to read point attrs in MOPs Transform Modifier's vexpression?

Posted: Wed Jun 22, 2022 11:42 am
by surf3d
Hello!
I have two MOPs Instancers merged together. The instances have an attribute set to -1 and 1 to make them translate in opposite directions. I haven't forgot to transfer the attr to instances and I see it set up correctly. It seems like I can't make the MOPs Transform Modifier's read this attribute from points in the vexpression section. I try this vexpression:
translate *= set(i@dir, 0, 0);
Should it work or I do something wrong?

Re: How to read point attrs in MOPs Transform Modifier's vexpression?

Posted: Wed Jun 22, 2022 12:05 pm
by toadstorm
Without having Houdini in front of me, there's one thing I'd check for.

Since you mentioned you merged two Instancers together... you'll probably need to regenerate the i@id attribute to prevent duplicates. You can use the Enumerate SOP or a point wrangle with the expression i@id=@ptnum to do this. Otherwise, having duplicate id values can cause some pretty weird results.

If that doesn't work, could you please attach an example file demonstrating the problem?

Re: How to read point attrs in MOPs Transform Modifier's vexpression?

Posted: Wed Jun 22, 2022 5:55 pm
by surf3d
Thank you so much! You were right, it was the duplicating "id" thing!