tagosaku Posted November 24, 2019 Share Posted November 24, 2019 Hi, I have used Houdini for a few years, but have not used these loop block nodes so much in VOP. This is because it's really hard to understand what's happening on the way and how to use input and output exactly, although I understand SOP level's loop nodes well. Thus, I really appreciate if anyone explain each usage of input and output with typical examples for each block/loop node! For instance, blockA is good for creating primitive line. blockB is convenient with checking nearest points, blockC is same as loop-SOP but faster, etc... Many thanks!! Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 24, 2019 Share Posted November 24, 2019 here you gonna find examples. Quote Link to comment Share on other sites More sharing options...
jimeng20 Posted November 25, 2019 Share Posted November 25, 2019 (edited) Well, I don't know have you ever used loops in vex or not. The loops in vops is the same with the vex. There is not much specifically which one is better for what kind of condition, but normally foreach loops will need to plug in an array to loop over each array element. And do_while, foreach_until and for_until will loop have the condition for stopping the loop. And while loop will have condition to start the loop. Same as vex. So for example if you wanna use point cloud with for loop, better use pcopen and length_in(how many iterations) should be the pcnumfind. And if you wanna use point cloud with foreach loop, better use pcfind or pcfind_radius, cuz the result is an array. If you wanna use while loops, better use pcopen and the condition_in should be pciterate. In for loop, the for_begin length_in is how many total iterations you want it to loop over, and the index_out is the current iteration inside of the loop. So think about in vex, you have something like for(int i = 0; i < 50; i ++), and in vops, length_in is 50, and i is the current index_out, which is the iterator. For example if you plug a contant 0 into the next_in, and call it something like "val", and inside the loop you just addconstant 1, and connect to end_for next_in and named it same as "val", the loop will start, you can see a purple line connect from right to left. It equals like: int val = 0; for(int i = 0; i < 50; i++){ val += 1; } And in foreach loop is very similar, it needs a array to loop over each array elements, the element_out is the current iteration of the array element and index_out is the current iteration. I know loops in vop can be a little bit of confusing, but I hope this can help you for a better understanding. Edited November 25, 2019 by jimeng20 Quote Link to comment Share on other sites More sharing options...
jimeng20 Posted November 25, 2019 Share Posted November 25, 2019 https://www.sidefx.com/forum/topic/49785/?page=1#post-253127 Also I found some topics and hope can help you. Quote Link to comment Share on other sites More sharing options...
tagosaku Posted November 26, 2019 Author Share Posted November 26, 2019 Ideally I want to see comparison, but will take a look at them deeply weekend. Thank you for the link. 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.