Graphics

 View Only
  • 1.  Red State, Blue State...Visual Logic?

    Posted 10-27-2016 17:11
    I have no experience yet with Visual Logic, but I'd like to make something that will take the values of 3 text boxes, compare them, and assign one of 3 materials to a 3d object based upon which text box has the highest numerical value in it. So basically, how do I color a state red, blue, or gray based upon which party is winning the state? I've been messing with it for hours with no luck at all.


  • 2.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 18:33

    If Text 1 is max value, Mat1 will be applied.
    If Text 2 is max value, Mat2 will be applied.
    And guess what... If Text 3 is max value, Mat3 will be applied.


    #XPression


  • 3.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 18:59
    What are the multipliers and the add for?
    #XPression


  • 4.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 19:01
    In order to have, 1, or 2 or 3 in Index of Input Selector.

    If Text1 is max, we have 1 + 0*2 + 0*3 =1
    If Text2 is max, we have 0 + 1*2 + 0*3 = 2
    If Text3 is max, we have 0 + 0*2 + 1*3 = 3
    #XPression


  • 5.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 19:16
    when I copy this exactly, my max value output is always 0, and I put values of 20, 25, and 30 into the text boxes. Am I missing something there?
    #XPression


  • 6.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 19:19
    Make sure you've enabled the "blue diamond" in the viewport to activate the visual logic.
    #XPression


  • 7.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 19:21
    It's a miracle!

    Thanks a bunch!
    #XPression


  • 8.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 19:41
    Ok, one more question. How to assign a 4th material if there's a 2 or 3 way tie for the top spot?
    #XPression


  • 9.  RE: Red State, Blue State...Visual Logic?

    Posted 10-27-2016 21:01
    I figured it out.
    #XPression