in a VOP SOP context, suppose I have a vector A and it is piped into a “vector to float” node to get its components, A_x, A_y, A_z
And I want to create a new vector B by feeding the x and y components of A into it based on some conditions. the z component of B will always be zero.
what I want to do is:
1. evaluate if A_x and A_y are both equal to zero
2. if they are, then
2.1 set A_x=0 and pipe it into B_x, and
2.2 set A_y=1 and pipe it into B_y
3. if they aren't, then pipe A_x into B_x and A_y into B_y.
may I ask how to do it?
Thanks!
how to perform "if...then" in VOP SOP? [SOLVED]
11455 5 1- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
- mawi
- Member
- 242 posts
- Joined: Jan. 2008
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
thanks, mawi!
However, according to the help file (http://www.sidefx.com/docs/houdini11.0/nodes/vop/and): [sidefx.com] “This operator performs a logical “and” operation between its inputs and returns 1 (if all inputs are non-zero) or 0 (if at least one input is zero). ”
So, this node may not be able to differentiate the following two situations:
1. both inputs are zero
2. one of the input is zero and the other is not
therefore, I'm not sure how to use Add node for my task. can you give a hint?
Thanks!
However, according to the help file (http://www.sidefx.com/docs/houdini11.0/nodes/vop/and): [sidefx.com] “This operator performs a logical “and” operation between its inputs and returns 1 (if all inputs are non-zero) or 0 (if at least one input is zero). ”
So, this node may not be able to differentiate the following two situations:
1. both inputs are zero
2. one of the input is zero and the other is not
therefore, I'm not sure how to use Add node for my task. can you give a hint?
Thanks!
- mawi
- Member
- 242 posts
- Joined: Jan. 2008
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
-
- Quick Links