Can you use X & Y values in a driver?

I’m creating a mouth control setup for my character and I want to make it like a puppet with autokey on. I’ve got it working, BUT I am unable to use +X,-Y or -X,+Y in the drivers. Is there a way to do this? Maybe through an expression?

image

Did you try to multiply x or y for -1? I got no problem inverting rotation values with that in a driver expression.

The problem I’m running into is that I can change the mouth shape on Y or X, or if Y and X are both negative or positive, but it’s doesn’t work if one is positive and the other is negative.

It could be I’m going about it the wrong way.

The math node I’m using only has 1 value. I need to create a driver that uses 2 values to turn on an of the mix factors. I’ve tried separating the values but the makes the mouth move to weird places.

That’s not a driver, those are material nodes, apparently rooted in a driven value. The whole structure looks much more complex that it ought to be. If you’re trying to do multiple things at once, start by doing the simplest version first: walk before you run. Maybe you can upload a file?

I know those are material nodes. It’s the driver that is changing the position of my UVs.
Mouth Setup.rar (2.0 MB)

I’ve done a driver setup that works the way I want it to with shapekeys, but shapekey will mix the two values and create a good shape in between. These are mouth sprites, so that method doesn’t work.

I initially started with a tutorial on moving a slider up and down to change the mouth UV position, but I need it to work in a circular method so I can turn on auto key, press play, move around the driver with my mouse and mimic a real-time puppet.
I’ve got it working pretty closely to my needs but I’m limited on my mouth shapes with the current method.


I don’t think I’m being very clear with what I need. I need to be able to place this bone on any of these points and change to a new mouth shape.

Pound out the bugs on first one shape, then on two shapes, then on three shapes. After that, you’ll know where you’re going wrong.

And before that, you probably won’t get any help, because nobody will want to sort out a labyrinth of nodes.

Looking really quickly at your picture, I’m wondering why you’re separating Y from a value node, which is not a vector.

Driven values are not vectors. They are single numbers.

I did do that, and I’m not asking someone to figure out my node setup. It works, just not as fully as I’d like.

You didn’t upload the version you simplified. Make the simplest possible version of it that demonstrates the problem. Right now, if I want to help, I have to simplify it myself.

You probably shouldn’t be using an averaged X+Y value anywhere in your nodes. Without figuring everything out, that’s likeliest to be the root of your problems.

I wouldn’t recommend anything like what you’re doing, BTW. Instead, I would simply take UV +X,Y. To lock the control onto certain locations and prevent it from interpolation between them, I would shrinkwrap constrain the control bone to vertices on a different, non-rendering mesh (that was object parented to the armature.) If I wanted the control to move smoothly, I would instead shrinkwrap a child of the control and use that new child for my drivers.

I’m open to different solutions. I’m not entirely sure what you’re meaning though. Is there an example online of what you’re talking about?

Mouth Setup.rar (414.3 KB)
Alright, so lets start over with this. I’ll scrap the node setup version. Is it possible to turn on and off the visibility of different objects based on the location of this bone control going to any one of these points?

image

I don’t know, probably. Here’s an example:

Notice the shader. All I’m doing is combining X,Y from your driven value nodes and then adding it to UV. That’s all.

Now notice the orange dots in the 3D view. That’s a mesh object. Those are vertices. I’ve placed them roughly by hand. You already know the positions you need for your shapes, so you can place them numerically if you want.

Now notice the bone and its constraint. It’s shrinkwrapping to the nearest vertex of this mesh.