point manipulation order in wrangle nodes

   1720   3   1
User Avatar
Member
30 posts
Joined: July 2010
Offline
Hi dear friends

The order of implementing of a code on point position in wrangle nodes has made me a little confused. Consider a situation that a point moves based on its neighbors positions. in the next step this already moved point is neighbor to other point. does this point use the already changed position of that point or the original position? I think the it should use the new position but in this way how vex can use the power of parallel computation in it's calculations because there is some kind of sequential nature in these steps.
User Avatar
Member
897 posts
Joined: July 2018
Offline
It will use the original position. As you say it'parallelized so there can't be any feedback between points.

If you want to iterate in sequence you run a detail wrangler with a loop over the points.
B.Henriksson, DICE
User Avatar
Member
30 posts
Joined: July 2010
Offline
kahuna031
It will use the original position. As you say it'parallelized so there can't be any feedback between points.

If you want to iterate in sequence you run a detail wrangler with a loop over the points.

Thank you kahuna031

So you say @P at the start of the calculation has been specified and will not change to the end of the process. and if we had something like:

@P += some vector based on @P

houdini always uses this determined original positions. This way there is a list of output points that wrangler fill it by iterating through original points and this list will return as new @P at last. Now this is clear.
User Avatar
Member
897 posts
Joined: July 2018
Offline
And just to be super clear, attribute variables are writable within the wrangler code.
@P =set(0,0,0);
vector foo =@P;

foo will be 0,0,0.
B.Henriksson, DICE
  • Quick Links