MENOZ Posted August 7, 2008 Share Posted August 7, 2008 hello, i'm studying an example of point cloud occlusion from the point cloud presentation http://www.sidefx.com/index.php?option=com...&Itemid=137 , and what i see is that i need a loop. but i don't understand how it's structured, it's done in VOP i have a whileVOP, with a constant set to 1 in the condition parameter. but shouldn't this play the loop forever? i see the help suggest to do this too. If you know that the contents of the While operator would be executed at least once, r wit is easiest to use a Constant operatoith an integer value set to 1 as the Condition Value input. Then within the While operator, set up the real comparisons and conditions that will lead to exiting the loop. If the While operator code may need to be skipped over entirely, there may be some duplication of operators inside and outside the While operator. inside the whileVOP i have another "condition" parameter in the subOutput node wired to the pcunshadedVOP. So, a node connected to the "condition" parameter in th suboutpot override the condition given from "outside"? Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 7, 2008 Share Posted August 7, 2008 What does the error message for the if Vop say? Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 7, 2008 Author Share Posted August 7, 2008 What does the error message for the if Vop say? it's about a wrong connection of the BGcolor.. no matter, it works. easily fixable. but it's not here my problem... Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 9, 2008 Share Posted August 9, 2008 (edited) But whilst you have an error the network won't compile. So how do you know there is still a problem with the rest of it? Otherwise your network looks ok... Edited August 9, 2008 by sibarrick Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 9, 2008 Author Share Posted August 9, 2008 But whilst you have an error the network won't compile. So how do you know there is still a problem with the rest of it?Otherwise your network looks ok... well, i don't know why, but the hip with occlusion in the point cloud presentation works, still with the errror message. the error was about a wrong connection of BGcolor parameter. i fixed it, now there is no error message. anyway, my question was: HOW the WhileVOP works? why the help says to use a constant set to 1 as condition of the while? why inside the whileVOP in this example of point cloud presentation i see a connection to the "condition" parameter in the suboutput? Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 10, 2008 Share Posted August 10, 2008 Sorry I thought you were saying it wasn't working. The way it works is to keep looping "while" the condition is true (or 1) So to get it started you pass the constant 1 (true) and then inside there is a condition that will return true or false. This is wired into the while vop condition and overwrites the constant. Once it turns false the while vop will stop looping. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 10, 2008 Author Share Posted August 10, 2008 Sorry I thought you were saying it wasn't working.The way it works is to keep looping "while" the condition is true (or 1) So to get it started you pass the constant 1 (true) and then inside there is a condition that will return true or false. This is wired into the while vop condition and overwrites the constant. Once it turns false the while vop will stop looping. ah ok now i understand! and what about the "condition" parameter in the ifVOP suboutput? thankyou! Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 11, 2008 Share Posted August 11, 2008 Do you why isn't there one? That's because an if isn't a loop so you can't change the condition. The condition is supplied and the success, true or false, is the ouput. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 11, 2008 Author Share Posted August 11, 2008 Do you why isn't there one?That's because an if isn't a loop so you can't change the condition. The condition is supplied and the success, true or false, is the ouput. no, just because an if isn't a loop, i'm asking why there IS the conditio parameter inside the VOP. see the image Quote Link to comment Share on other sites More sharing options...
Jason Posted August 12, 2008 Share Posted August 12, 2008 no, just because an if isn't a loop, i'm asking why there IS the conditio parameter inside the VOP. see the image You need to be able modify the condition inside the loop or it'll never have a chance to eventually [become false and] drop out of the loop. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 12, 2008 Author Share Posted August 12, 2008 You need to be able modify the condition inside the loop or it'll never have a chance to eventually [become false and] drop out of the loop. but, as sibarrick said, the "IF then block VOP" isn't a loop Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 12, 2008 Share Posted August 12, 2008 no, just because an if isn't a loop, i'm asking why there IS the conditio parameter inside the VOP. see the image This is so you can pass it to another if vop to make an if/else statement. Check the help for the if vop I think it explains how you chain if blocks together. Its rather confusing but once you do it it makes sense. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted August 13, 2008 Author Share Posted August 13, 2008 oh, thank you! yes it's a little confusing in the help too.. tanks so much! 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.