POP influences geometry outside network after collision

   1669   6   2
User Avatar
Member
31 posts
Joined: April 2015
Offline
Hi

i have a pop network and after the hit of the particle with a surface(popattrackt and popcollisiondetect by id ) i want that the point with the same id on the surface changes its attribute - but somehow i dont get it working by vex:

if (@stuck > 0) {
    
    setpointattrib(1, "shown", @id, 1);
}

1 -> the secondary context geometry
“shown” -> the attribute i want to change - to one

did i do something wrong
or isnt that even possible
or do i have to reference the surface geometry after the merge with the pop network?

Thanky for help!
Edited by Neonzone - Feb. 12, 2018 19:17:53
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
isn't it the first geometry the one which is passed trough?
Edited by matthias_k - Feb. 13, 2018 05:44:06
English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
simple example…
could be done smarter…

but maybe you're looking for attribute transfer
to tranfer the “hit” from the particle to the surface,
then the collision surface id is not the particle id.

to do this, you need “attribute transfer” node.
Edited by matthias_k - Feb. 13, 2018 06:11:06

Attachments:
transfer.hip (77.5 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
31 posts
Joined: April 2015
Offline
oh nice point() solved the problem Thank you
User Avatar
Member
31 posts
Joined: April 2015
Offline
matthias_k
simple example…
could be done smarter…

but maybe you're looking for attribute transfer
to tranfer the “hit” from the particle to the surface,
then the collision surface id is not the particle id.

to do this, you need “attribute transfer” node.


but is it possible to get all points by another attribute - and then by another ….
in vex - something like:

allpointsbyattribute = getallpointsbyattribute(points, attributename, attributevalue);
allpointsofpointsbyattribute = getallpointsbyattribute(allpointsbyattribute, attributename2, attributevalue2);
Edited by Neonzone - Feb. 13, 2018 15:19:47
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
You can loop over arrays or maybe use groups …
I don't know what result do you need.
English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
8594 posts
Joined: July 2007
Offline
you can use findattribval() and findattribvalcount() to get all (or some of the) points with exact value of some attribute like id or name

or specifically for those 2 there are functions idtopoint() and nametopoint() to get the first point with the matching value of id or name attrib
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links