Jump to content

whileVOP


MENOZ

Recommended Posts

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"?

post-1766-1218094827_thumb.png

Link to comment
Share on other sites

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?

post-1766-1218276182_thumb.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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. :D

see the image

post-1766-1218494503_thumb.png

Link to comment
Share on other sites

no, just because an if isn't a loop, i'm asking why there IS the conditio parameter inside the VOP. :D

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.

Link to comment
Share on other sites

no, just because an if isn't a loop, i'm asking why there IS the conditio parameter inside the VOP. :D

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...