Page MenuHome

Drivers don't update properly
Confirmed, NormalPublic

Description

System Information
Operating system: macOS Catalina 10.15.3
Graphics card: NVIDIA GeForce GT 750M 2 GB / Intel Iris Pro 1536 MB

Blender Version
Broken: Version 2.82 (2.82 2020-02-12)
Worked: (optional)

Short description of error
My rolling ball is sliding, a lot when I render a whole animation and a little when I jump frames with left / right arrow keys.

Exact steps for others to reproduce the error

  • Load this file:
  • Make sure you're in LookDev / Rendered / Wireframe to be able to see the ball's rotation
  • Behold the checkered ball
  • Press right arrow five times, notice how the ball rolls (rotates right while moving right), this is good
  • BAD: Now, press left arrow once, notice how the ball moves left but rotates right, this is bad
  • Press left arrow once more, I think this puts the ball back on track but I'm unsure
  • Now, render the animation for frames 359-461 (preset) and watch it
  • BAD: Notice how the ball just slides in the animation, even though it rolls when using the arrow keys

I would like:

  • Right and left arrow to always roll the ball in the right direction
  • Rendering the whole animation to produce a rolling ball, not a sliding one

Event Timeline

Ankit (ankitm) changed the task status from Needs Triage to Needs Information from User.Feb 26 2020, 10:38 PM
Ankit (ankitm) added a subscriber: Ankit (ankitm).

Do you have any indicator on the ball to indicate its sense of rotation ?

In LookDev / Rendered the ball is checkered:

In wireframe you can see the rotation as well.

Ankit (ankitm) changed the task status from Needs Information from User to Needs Triage.Feb 27 2020, 7:34 AM

since I am not aware of the expected behaviour, or if this task is suited for any other feature in blender, marking as needs triage

@Ankit (ankitm) were you able to repro using the provided instructions?

yes, I did. but I cannot assess the seriousness of the first case (one left after some rights); and don't know what to ask for, in the second case (render: ball not rolling, only sliding ).

I've modified the drivers's expression to use self.location[0] instead of getting it through a variable :

@Johan Walles (walles) can you double check that it's working correctly now ?

I'm not sure it's a bug , but I agree that's a bit confusing ... I've already seen a report with the same issue a few month ago...

Ankit (ankitm) added a comment.EditedFeb 27 2020, 5:56 PM

@paul szajner (szap) the file crashes immediately, before even opening . could you please set its render engine to cycles, and not keep material properties active. set it to render properties, or physics.

Try this one :

Thanks Ankit !

Ankit (ankitm) closed this task as Invalid.Feb 27 2020, 6:54 PM
Ankit (ankitm) claimed this task.

seems good!

It works with your changes @Ankit (ankitm).

But following the example here...
https://docs.blender.org/manual/en/latest/animation/drivers/workflow_examples.html#transform-driver
... but using the own object's x coordinate as driver input, fails with the same symptoms:

Symptom is still that rendering the animation slides the cube rather than rolling it.

Not sure how precisely documented something has to be to be considered a bug, but are you *sure* this example should be "Invalid"?

Aaron Carlisle (Blendify) reopened this task as Needs Triage.Feb 27 2020, 8:29 PM
Aaron Carlisle (Blendify) edited projects, added Documentation; removed BF Blender.

I will look into the documentation tomorrow if I get a chance.

The main difference between the example and your case is that in the example it take a property of object A to drive object B.
In your case it's a property from object A that drives object A.

In the example, it's easy for blender to know the order of evaluation, A needs to be evaluated first , then B.

In your case, blender needs to know the position of object A to get the rotation of object A. This is a common problem known as cyclic dependency, this is also why you always have a 1 frame lag in transform evaluation of your object.
This is why you must use self property in the driver, so blender know that object transforms needs to be evaluated twice to get the final transform.

In the end it's not a bug, but ideally the documentation needs to be updated to take that particular case into account, or the driver interface need to be more clear , or in case similar to yours blender should automatically evaluate twice the transforms.
So it's more in the lines of improvements rather than a feature not working as intended, I think this is why there is the "use self" toggle . I totally agree that this is quite confusing for users and ideally they shouldn't need to understand all that dependencies stuff to do what they want. But things are working as they should even if they are a bit confusing in that particular case.

I'm poking @William Reynish (billreynish) so he can look at this to see if it's possible to make the UI more clear (maybe by showing a warning in such cases) as I've already seen a bug report with exactly the same issue.

Thanks for the clarification @paul szajner (szap)!

I ended up adding an empty, and tying both the ball's rotation and its x coordinate to that empty.

Rather unobvious as you said, but works like a charm. TIL :)

I took a look at this yesterday, and was trying to find the right report to merge this into (looks like T64793 is the chosen one), and another report to link that gave the explanation (found it: T72899). Glad @paul szajner (szap) appeared with the explanation and the updated blend!

Ankit (ankitm) removed Ankit (ankitm) as the assignee of this task.Feb 28 2020, 2:13 PM

@paul szajner (szap), I think I know why "self" worked for you.

"self" becomes a Python expression, but without self it's a "simple expression".

My guess is that Python expressions and simple expressions are triggered at different times.

When using "self" you explicitly reference the owner of the driver as 'self'.
When using the variable's target it may not evaluate the target the same way, but the expression 'complexity' in itself doesn't change anything ...
There are "simple expression" based only on math that are evaluated faster, and full python expression but they are only slower to evaluate, when blender compute the value should append at the same time in both cases.
Unless I'm unaware of some stuff in the code source. Indeed I'm only guessing here and only someone familiar with the animation system or dependency graph code could explain what is really happening here.
Feel free to continue this conversation at blenderartists (you can poke me here) this is more appropriate as the tracker is not meant to be a forum for discussions.

Ankit (ankitm) changed the task status from Needs Triage to Confirmed.Thu, Mar 19, 5:54 PM