4
$\begingroup$

Drivers editor I created a driver to have a shape key driven from a sound (in the drivers editor) the Prop: object, in this case a pyramid shaped object that has a sound source (pyramid.003). I also tried driven from a Prop:sound, and the sound is a wave. Neither way works. I keep getting the "error invalid python expression". the expression is var and var (just below the "add input value"). both places show just var, I think that is the way it is supposed to be? So how to fix the "error invalid python expression". Tks in advance

$\endgroup$
1

3 Answers 3

4
$\begingroup$

Ok, you try to animate a mouth, here a very very basic example.

  1. add a torus

  2. add an armature

  3. Tab -> Edit mode

  4. Click on the head of the bone

  5. tap E X

enter image description here

  1. click on the head of the first bone

  2. tap E X

  3. click on the upper bone, G X until so:

  4. click on the lower bone, G X until so:

enter image description here

  1. TAB -> object mode

  2. select the torus, shift select the armature -> CTRL-P -> with automatic weights

  3. now you have a VERY basic mouth rig:

enter image description here


Sound driven animation:

  1. do the things i described above

  2. install + enable animation nodes (if you don't have already installed it)

  3. add a sound file in the video editor

  4. use this node setup:

enter image description here

result:

enter image description here

*** UPDATE ***

for me this worked:

enter image description here

might not be the "cleanest" solution, but it works.

OR use this method:

enter image description here

right click on your custom property -> copy as new driver.

Then paste this in your bones location variable with "paste as new driver" -> then it works. If enter the same thing manually, it won't work. I guess this is a bug.

*** UPDATE 5 ***

The reason was:

You have to choose Mesh -> Pyramid in the driver panel.

Not Object -> Pyramid.

Then it works.

$\endgroup$
20
  • $\begingroup$ Hi @Chris I created a new file per your instructions. I can move a bone to animate. What I cannot do is animate using the sound from the sound bone.n we.tl/t-mNYW2QdsKW Suggestions please. $\endgroup$
    – Robert C
    Jan 17, 2022 at 22:56
  • $\begingroup$ The structure of answers seems to be changing. The answer by Marty Fouts Jan 14 is true for my comment 3 hrs ago. The problem I cannot find any other path. This is a new file following chris's example which works but does now include the sound animation part. Please cheers $\endgroup$
    – Robert C
    Jan 18, 2022 at 2:21
  • $\begingroup$ @MartyFouts I tried using shape keys we.tl/t-74IIqUGvQA and it works but have yet to solve using bones we.tl/t-gZLYl63XG8. Cheers $\endgroup$
    – Robert C
    Jan 19, 2022 at 5:54
  • $\begingroup$ i updated my answer. I just know how to use animation nodes to get a sound driven animation. You can download and check out the blend file i appended. $\endgroup$
    – Chris
    Jan 19, 2022 at 6:31
  • $\begingroup$ I know there is a „kind of“ barrier to learn it. It is a new way of thinking - as geometry nodes too. But I just can say: it‘s worth it. Watch some beginner tutorials. Check the reels from years ago what they did with animation nodes. It is still (!) much more powerful than GN (but I hope GN will be better in the near future). And it is maybe more open than GN will ever be, because you can write your own nodes by using python and so you have the same power as any python developer out there! $\endgroup$
    – Chris
    Jan 20, 2022 at 4:58
3
$\begingroup$

I found the driver (dad-base object, go to shape keys, uncheck relative), but everything seems OK:

Now, changing ["Viejo Father"] to what we can see on your screenshot: ["Sound Viejo Father"] does cause an error, because no such custom property exists on the target Pyramid.003:

$\endgroup$
2
  • $\begingroup$ Tks. I think that what I've been doing is trying different way to animate, such as shape keys driven from an object (pyramid.003), mouth bones driven from another posed bone (made just as a source for the sound), etc. And got confused which was which. The problem I have now is that using any method, with your help, does not animate the mouth. I have done this with 'selves' and 'brujo', but can't make it work with other characters. $\endgroup$
    – Robert C
    Jan 17, 2022 at 2:11
  • $\begingroup$ @RobertoCollinsLazo whenever you try to do something new, first create a "prototype" - a simple project, where you test if the functionality you want to use works the way you think it does. Not only it will be easier to test without a ton of other stuff possibly interfering, but it will also be easier to share the problem in the form of a lighter file. Cheers. :) $\endgroup$ Jan 17, 2022 at 9:20
1
$\begingroup$

The Path entry in the input variable section is highlighted in red. It means that what you have entered there is not a valid path. Replace the "Sound..." entry with a valid RNA path to solve your problem.

$\endgroup$
4
  • 1
    $\begingroup$ @RobertoCollinsLazo What is an RNA (or DNA) property? $\endgroup$ Jan 15, 2022 at 19:44
  • $\begingroup$ @RobertoCollinsLazo You are very welcome. $\endgroup$ Jan 15, 2022 at 20:04
  • $\begingroup$ @RobertoCollinsLazo I have ~ 60 kB/s upload speed, so I can relate! $\endgroup$ Jan 15, 2022 at 20:43
  • $\begingroup$ Thank you all. I deleted all drivers + a few other things and now it works. Cheers from an Ol' Fart $\endgroup$
    – Robert C
    Jan 26, 2022 at 5:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .