how to find an attribute by ID in vop?

   10530   9   0
User Avatar
Member
303 posts
Joined: May 2007
Offline
in vopsop there is “import attribute” node, it's easy to find one attribute value by point number, is there a same way to find the specific point Id's attribute value ?
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
512 posts
Joined: July 2009
Offline
yeah that's totally possible,
just plug your points into a sort SOP and sort by attribute (id).
Then you have two inputs for your VOP SOP, you plug the normal points into the first and the sorted points into the second.
In VOPs you create two import attribute nodes.
With the first you load the first inputs ID attribute which goes into the number input of the second import attribute. In here you import the desired attribute and now you can do whatever you want with it.
done

cheers,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
303 posts
Joined: May 2007
Offline
just plug your points into a sort SOP and sort by attribute (id).
i'm not sure weather i have completely understand your mean, do you say change point's number to it's id ? if the id is (5,3,1) i can change the pt as(2,1,0), but i can't change pt as(5,3,1)
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
512 posts
Joined: July 2009
Offline
can you please post a sample scene?
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
9 posts
Joined: Feb. 2008
Offline
This is the feature I also like to have. But as far as I know, Houdini doesn't support id lookup directly. What you could do is to use attribTransfer or some point cloud technique to get it. Of cause you can use For loop inside VOP, but it might become slow if you have too many points.

The attached file is something we did before. Hope this is what you are looking for D

Attachments:
id_based_attrib.hipnc (206.2 KB)

User Avatar
Member
512 posts
Joined: July 2009
Offline
Michael your file made me realize hat even though my technique is faster than yours, it only works if the number of points is the same. (or the number of id attributes)
You should send your file with an RFE to Side FX, they always have an open ear for suggestions. (Post it in the Beta forum if you have access).

Until then, if you got an uneven amount of points to compare, pcopen is the way to go

cheers,

Manu
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
You can do it in vop, You just have to convert the ids into a vector first, and then you can do a pcopen with this as lookupposition, it;s a mean hack, but it works. it would be far better if there would be a integer lookup

I did a RFE some weeks ago on this , having a lookup by attribute would be very handy
User Avatar
Member
512 posts
Joined: July 2009
Offline
nice technique, Martin !!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
303 posts
Joined: May 2007
Offline
thank you guys!
in “timeblend” sop, it has this Id support, it's very fast.it seems based on a python script, i have took some time to find it in soptoolutils, but not success!
if you found it, please tell me!
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
9 posts
Joined: Feb. 2008
Offline
You should send your file with an RFE to Side FX, they always have an open ear for suggestions. (Post it in the Beta forum if you have access).

Hi Manu, I did send this to SideFX a couple of months ago when we met the problem. I'd really like to see this feature in the future
  • Quick Links