Symbolic Posted September 22, 2009 Share Posted September 22, 2009 Hi, I have a vector attribute inside a POP network that goes into VOPPOPs. ex: val: {1.619553,0.423548,-21.839031} val: {1.608211,0.420283,-21.810768} val: {1.603649,0.420570,-21.822512} val: {1.606146,0.420864,-21.819849} I can isolate the Y component. val: 0.422827 val: 0.423548 val: 0.420283 val: 0.420570 val: 0.420864 then I need to find the lowest value and use it in the rest of the VOPPOP network. So I get: val: 0.420283 val: 0.420283 val: 0.420283 val: 0.420283 val: 0.420283 per particle. It sounds easy, I mean you can do that kind of stuff with an Attribute Promote (Max / Min) at SOP level. But I could not find a way to do it inside VOPPOPs. Any ideas? Thanks. Quote Link to comment Share on other sites More sharing options...
brianburke Posted September 22, 2009 Share Posted September 22, 2009 Yo dude. You'll want to use a for loop in a VOP POP to test the values of all of the particles in your system. You can set the end value to be Npt, and inside the loop use an Import Attribute VOP to get your attribute. You can then test this value against min and max values, returning the value of the current point or the previous point depending on the results of the test. Good luck dude. Quote Link to comment Share on other sites More sharing options...
Symbolic Posted September 22, 2009 Author Share Posted September 22, 2009 Hi brian, Thanks. Will this work with dynamic values? Like: I do not want to set a min value manually. I want to be able to calculate the min value amongst all values. I will be rally happy if somebosy shares an example. Cheers. Quote Link to comment Share on other sites More sharing options...
eetu Posted October 19, 2009 Share Posted October 19, 2009 The way described above isn't that complicated really, you just need to grok the for-loop. (see attachment) I don't quite like it, though - it needlessly goes through all the points per each point (O^2). Any VOP ideas on how to do the loop only once? eetu. ee_voppop_minmax.hip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.