PDA

View Full Version : Conditionnode


Matte
08-17-2007, 08:34 PM
Hey,

Been thinking on and off to try and solve this one now, i cant seem to come up with a solution. Iam trying to make a condition (using conditionnode/s) that only is true when both the first term an second term is 1. Both the first term and the second term is variable, so at times, both terms are 0, which means the conditionnode spits out true (since "Equal" means equal regardless). But i want it only to spit out true when 1 == 1, not when 0 == 0. Been trying to figure out how to use other nodes in conjunction with conditionnodes to solve the problem but so far havnt come up with a solution. Anyone?

/Matte

Piddu
08-17-2007, 11:57 PM
Hi. This is simply a cascade of two nodes. The first one taking the input and evaluating if they are the same, the same taking as input the the output of the first one and the other input should be 1, a costant number. Then you can evaluate even in the second node if they are the same value.

Bye

Derek Wolfe
08-20-2007, 11:33 PM
If your values only range from 0-1, you can use an "average" node and a "condition" node working together to get the result you want.

Take both values and average them.
This will only produce a "1" when both inputs are "1".

Run the output from the "average" node to the "condition" node.
Set it to "equal" and set the other term to "1".

With this setup the output of the "condition" node will only produce a "1" if both of your values are "1".

Keep in mind this is only reliable if the original values are between 0-1.

CGTalk Moderation
08-20-2007, 11:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.