Connect attribute value with two different state nodes

Hi everyone. As a junior rigger / animator I am currently working on a facial rig and faced a probably basic issue but cannot find the answer on the internet so here I am.

I am working on the eyelids and used a script to earn time and have a nice blink for the eyes, the blink was input in an attr “blink”, but then I’ve been working on the inverse state : opening of the eyelids, that I first input in a second attr “open eyelids”.

Then I found it was stupid to have them on separated attr, so I’m basically trying to simply have only one attr “eyelids” based on 3 values (0 / 1 / 2) or ( -1 / 0 / 1 ) where 0 would be the basic eyelid position, -1 the blink and 1 the opening of the eyelid. Knowing that the blink and the openEyelid are in a 0 - 1 range ( 0 = no effect, 1 = 100% effective )

I succeeded doing so with the Condition node, but realized that it was a boolean switch, what I need is the right utility node to progressively open or close my eyelids, if anyone have a solution.

Here is a picture of my actual node editor.

I tried to play with the setRange and remapValue utilities but I couldn’t find much information on the internet as they seem to be mostly use for other purpose.

I also tried to use the driven keys but unfortunately, as my eyelids positions are set with my node editor, as soon as I set a driven key it break the connections and avoid me to get the position of the other ones.

As it seems pretty basic issue for a rig, I hope anyone here can share a solution to do it through the node editor.

Could there be a float condition node ?

Thank you in advance !

Well, I finally found the long version solution ! So in case someone would have the same issue, here is my final node editor set up to control blink and opening of the up and low eyelids with a 0 / 1 / 2 range.

As you can see I left the 4 attributes I first made and connected my main attributes to them through several math manipulations. Then I hid them in the channel box to control them with the main attributes only (Eyelid Up and Eyelid Low).

I just wish there was a float condition utility to reduce the number of nodes for this pretty basic trick and even though I found out there actually was a float condition node in Maya 2020, I couldn’t find any informations about how it work while it didn’t have the same parameters as the original condition node, I guess it doesn’t have the same function.

Here is how it looks like if anyone wants to add information about it.

This topic was automatically closed after 96 days. New replies are no longer allowed.