View Full Version : Rigging a blink with reaction controller
10-21-2009, 11:33 AM
I am attempting to rig a blink controll onto a dummy but I have hit a snag right from the word go O_O
I have eyes setup as 4 spheres (on for the eyeball, one for the pupil - hemisphered, and two for the eyelids - Sliced)
I have a look at controller set for the pupils to look at a dummy.
What i want to do is add a custom attribute through attribute holder modifier to the dummy that controls the blink (and mabey the pupil dialation), but i cant seem to add the custom attribute spinner into the reaction manager as a master.
if i click on the add master button in the reaction manager then click on the dummy, the rollout goes: Modified Object>Attribute Holder>Custom_Attribute>
and thats it.... no Param1 or blink L or anything...
I cant go further if i cant even add the spinner as a master
any and all help appreciated
10-21-2009, 02:32 PM
When you create your slider in the custAttributes def are you assigning it an animatable type?
ca = attributes test
parameters eyeBlinkP rollout:eyeBlinkR
blink type:#float ui:(blinkSl)
rollout eyeBlinkR "Eye Blink"
slider blinkSl "Blink"
custAttributes.add selection.modifiers ca
Sorry for it having no formatting. Basically you create the parameter, give it a type and tell it what UI item(s) it is connected to. Then you create the rollout and within that make the UI item for that parameter. If you evaluate this code it will add a slider to the top modifier on your object, and you will be able to find that slider in reaction manager, wire parameters etc.
If you look up parameter blocks in the MAXScript help, and then scroll down to the Parameters section you can find all of the types.
Hope this helps. :thumbsup:
10-21-2009, 03:32 PM
i managed to get around it by making a helper slider, wiring that to the blink spinner and using the slider as a master in the reaction manager.
once its created in the reaction manager, can delete the slider and it seems to still work
10-21-2009, 04:21 PM
Woah, apparently my posts just took a bit to show up, thanks for deleting my triple post haha.
I'm glad you figured out a work around, also give what I suggested a try, it should save you having to add the extra steps.
10-21-2009, 05:00 PM
errr...gona sound dense now, but on what would i do that script? what object?
I was wondering if there isn't maybe a better way of doing the eyelids.
I have it at the moment as one sphere with a slice (sphere primitive slice) with a meshsmooth, which i was hoping to use because i like how it looks on the corners of the eyes where the "eyelids" meet. But I realised that i cant do it that way because the "eyelids" cant blink, when it gets to what should be a closed position it flips.
Also tried with the same object using a bend modifier, but it starts getting a little messy.
Im going the 2 spheres route now because i couldnt think of another way, but i dont like how it looks by the eyelid join :(
any other sugestions on making eyelids?
10-22-2009, 12:33 PM
anyone else got an idea for eyelids using only 2 spheres?
10-22-2009, 08:26 PM
You run that code with your control object selected, with whatever modifier you want the slider to be in at the top of the stack. So most likely you would have an attribute holder at the top.
Here are a few images showing what I think you are doing, but I'm not sure without pictures of your character.
Now when the eye goes wide the sphere eyelids stick out too far, so you'd have to play with where your pivot point is, or add more tracks into your reactions to make it fit as you want.
This is what I understand you want, if not please try and clear it up for me.
EDIT: I just re-read that you were doing it with just 1 sphere using slice and that it was flipping when you get it closed. The sphere slice will only flip when the slice value goes beyond 360.0. So you can still get it to work just using slice, but make sure when you set up your reaction you drive the slice to exactly 360.0 at its maximum. Or you could play it safe and do something like 359.5. 360.0 is when it is completely closed. Hope this helps :thumbsup:
10-22-2009, 08:26 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.