2
$\begingroup$

I came across some weird driver behavior and hope someone can explain this to me.

I was trying to create a wheel that rotates automatically on the floor when it is moved along. (Just like real world wheels do.)

To achieve this, I wanted to use a driver. (Use position to calculate rotation -> rotate the wheel) However, I got different results for the same frame while scrubbing on the timeline:

Weird drivers

Note that I'm always on frame 44 and the xLocation is also equal. But the driver result varies and the wheel's rotation vary.

I found the difference to be dependent on whether I scrub using the mouse or the keyboard, and also from which direction I reach the frame. (44 is arbitrary - it's the same for any other frame)

This is the Driver: Driver

(not the solution, yet ;) )

Pressing "update dependencies" seems to fix it, but it is very impractical in this situation, because I'm trying to see if the wheel slips on the floor, and I need to jump quickly back and forth between frames and can't press the button each time.

Thinking this has sth. to do with the Dependency Graph, I tried to open this file in 2.8 and got the same result. Also in 2.79b and 2.79.5.

I would expect to get consistent values on the same frame. Any ideas why this happens? Thanks!!

$\endgroup$

1 Answer 1

0
$\begingroup$

This is the just the dependencies graph not updating in the right time just as you speculated. The value 101° is actually the result of the driver at frame 45 while the value 96.2° is actually the result of the driver at frame 43. The true value of the driver at frame 44 is 98.5°.

When you approach the frame 44 from the left, the last computed value is at frame 45, so its value is used. When you approach the frame 44 from the right, the last computed value is at frame 43, so its value is used. If you updated the dependencies at the frame 44, the true value is used.

I don't think there is an easy way to solve this, and this is one of many reasons I stopped using drivers. I recommend using Animation Nodes instead.

$\endgroup$
2
  • $\begingroup$ Thanks for your answer. I'm just wondering why a frame change wouldn't automatically trigger a dependency update? $\endgroup$
    – michaelh
    Commented Jul 10, 2018 at 10:32
  • $\begingroup$ @michaelh Honestly, I don't know, drivers are unpredictable. However, I think the reason is as follows. When you change the frame from 45 to 44, blender recognizes a change and execute the driver to update, however, blender recognize the change when you are still at frame 45, subsequently it executes the driver when it is at frame 45 and not the target frame 44. $\endgroup$
    – Omar Emara
    Commented Jul 10, 2018 at 12:41

You must log in to answer this question.

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