PDA

View Full Version : Dilated Pupils...a wiring issue


GRMac13
10-21-2002, 09:41 PM
I'm trying to rig an easy way to dilate the pupils of my character's eyes. In my short there's alot of lighting changes that go on and I want a realistic effect on the eyes.

As of now I have an X-form modifier on the verts that make up the pupil. By scaling the X-form's gizmo the pupil expands/contracts giving that "dilated" look. It works like a charm.

I don't want to have to keep selecting each eye and the scale tool and doing a manual scale on both eyes. So I figured I could rig something up with wiring a custom attribute slider which is applied to the look-at target on the eyes to the eyes' X-form modifiers' gizmo scale.

OK, so I select the Look-at target, then Wire Parameters>Modified Object>Custom_Attributes>iris_slider. Wire this to the eye's Modified Object>X-form>Gizmo>Scale. The Parameter Wiring dialog box comes up, and I choose a two-way connection between the CA and the X-form's scale and hit connect. Then I get error messages that say "--Unable to convert: 0.0 to type: Point3". and "--Unable to convert: [1,1,1] to type: Float".

So, what do I have to do to get this work? If I can't create a controller for the dilation this way, what other options are there? Please help.

Reality3D
10-21-2002, 09:47 PM
You are trying to wire the slider SCALAR value to a Vector of 3 dimension(Scale Point 3). I would change the default(max 4 and before) tcb scale controller to an euler, and then wire the slider value to the 3 scale values indepently(x,y,z)
Hope this helps

GRMac13
10-21-2002, 10:01 PM
Dude I owe you.

Beers on me.

:beer:

gaggle
10-21-2002, 10:27 PM
Not that I know why, but I would choose a one-way connection: CA -> scale thing.

I think I had some issues with the two-way connection thing once.. but I really don't why or what exactly hm. So, you know, ignore me if everything works, and you can give the one-way connection thing a try if you sense foul play with the wiring :)

3rd Dimentia
10-22-2002, 03:31 PM
I'm pretty sure there is a free plugin for max out there called light meter. I'm sure there'd be a way to hook up the light meter to the iris' of your character. The only thing I'd not be sure of is to set the upper and lower limits so you don't end up with iris' larger than your eyeballs, but I'm sure it would be rather simple for someone who is more into the scripy side of things. Once it is set up, this would be a much easier way than animating it manually.

Ah, I'm way too curious now, I'm off to try it.

OK, found the plugin I'm thinking of, it's called photometer
http://www.max3d.com/plugins/r4/photometer4.zip

Cg.

3rd Dimentia
10-22-2002, 03:50 PM
Well, there goes that Idea. At a quick glance, the plugin doesn't seem to update as well as you'd need it to. And it says it takes shadows into account, but doesn't seem to. :rolleyes:

GRMac13
10-22-2002, 03:53 PM
3rd Dimentia, it was a good idea though. Thanx for the plug-in, I'll see what else I can do with it.

Aaron
10-23-2002, 09:08 AM
For what it's worth, I created a pair of morph-targets for my character's pupils. One features the fully dillated pupils, the other, fully undillated. Morphing between the two gives me the shifting effect. Of course, I'm just a novice, and I've only done it once for one character =) But it worked out for me. It's a little quicker than scaling an X-form mod... YMMV

/me shrugs.

Good luck!

GRMac13
10-23-2002, 10:49 AM
Yea, Aaron, morphing would work, but then I'd still have to select each eye seperately and adjust the morphs accordingly. Setting up a controller like this saves me the effort and makes the process more efficient for my situation. All I have to do is select the eyes' dummy which controls their rotation and now their dilation, so there's less selecting/deselecting. I'd recommend learning as much about wiring and controller types as possible, it definately help to make your characters much more workable and easier to animate.

gaggle
10-23-2002, 12:11 PM
There's no reason why you couldn't wire the morph-weight into a slider?
There are advantages and disadvantages to the different methods of course, but I bet they can all be controlled centrally through wiring and scripting.

3rd Dimentia
10-23-2002, 06:18 PM
You don't have to adjust them each manually, and you don't even have to wire them or use expressions. All you have to do is right click on the morph modifier and select copy on one pupil and select the other pupil and paste instance it onto the other. Then when you adjust one, the one one will follow.


Cheers,

Cg.
(yes they were my initials first)

3rd Dimentia
10-23-2002, 07:24 PM
Just another note. Why would you manually rotate eyes to animate them when you can use a lookat controller and all you have to do then is animate a dummy to where you want the character to look.



Cg.

GRMac13
10-24-2002, 12:21 AM
Originally posted by 3rd Dimentia
Just another note. Why would you manually rotate eyes to animate them when you can use a lookat controller and all you have to do then is animate a dummy to where you want the character to look.

I do have a dummy set-up as a look-at controller. In fact, I wired the X-forms on the pupils to a custom attributer control on the look at dummy. That way I can rotate the eyes with the dummy and just spin the spinner in the Command Panel to dilate the pupils.

Originally posted by 3rd Dimentia
All you have to do is right click on the morph modifier and select copy on one pupil and select the other pupil and paste instance it onto the other. Then when you adjust one, the one one will follow.

That's a good idea, but it would still mean that one eye would have to be selected. It's just easier for me to not have to touch the eyes at all and instead have all the controls on the look-at controller. By the way, can you wire a morph target? I've never tried it, but it would be a cool way to make customized animation controls.

John-Stetzer
10-24-2002, 03:01 AM
Here's a neat trick for doing eye pupils (if memory serves, got this from Ron Lussier, to give proper credits). You can basically use a cone with inverted normals for your iris/pupil, and then use a custom attribute or wired manipulator or somesuch to control the radius of the pupil portion of the cone. Using a cone and sphere w/the same number of segments as a starting point (combining them using Edit Mesh) can make a decent eyeball with easy mapping for the iris and fairly easy setup for animating the dilating pupil.

gaggle
10-24-2002, 01:12 PM
Originally posted by GRMac13
can you wire a morph target?

you absolutely can, no problems at all.
..well.. in.. there can be a problem.. to make a long story short, there are no problems at all provided you stay away from in-viewport sliders. Those I've personally felt the wrath from.

Link up 'dem morpthargets though and feel the power. Now all we need from MAX is the ability to make a free-floating always-open window we can add custom attributes to. I miss such a feature greatly.

CGTalk Moderation
01-13-2006, 06:00 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.