Issue with Child Of Constraint sometimes not working at certain point in animation?

I tried constraining a camera’s location to an object, and now it lags behind whereas before it worked just fine.

It doesn’t linearly lag, it tracks fine then stops tracking/ starts lagging at a certain point.

When I toggle the constraint visibility off then on again, the camera snaps back to where it’s supposed to be. Going back then forward a frame messes it up again.


Some more details:

  • The problem started after I increased resolution of the explosion, and added fire. It don’t think it’s likely the cause of the issue, but perhaps it is, and I’m just somehow putting too much stress on the system?

  • The object the camera’s location is constrained to is a rigid body.

  • I don’t know if it’s because I keyframed location and rotation in addition to the constraint, but other objects without any keyframing that have been constrianed to the ship (such as the smoke emitter) have had issues too, albeit fixable

  • When I render, the view is as broken as in the viewport

  • this happened only once before, but it fixed itself after I moved the playhead a bit. Now moving the playhead doesn’t seem to fix it.

  • The problem always starts at frame 26


some links:
Here is an earlier iteration of the animation, before I started having issues.

and HERE is a Reddit post I made about it, which contains a video I took of the issue, and the .BLEND file (for some reason when I made a backup copy of the file, it deleted the smoke physics bake. But that’s a problem for another post)

EDIT: I posted an updated .BLEND file in my Reddit post. I rebaked the physics, but the problems still start on frame 26, on which the spaceship switches from animated to dynamic.

Thanks for taking a look at my post, and I’d greatly appreciate any help/ advice y’all might have.

EDIT: Now some lamps that I constrained in a similar fashion to the spaceship have started acting up in much the same way-- getting left behind at a certain point in the animation. These lamps have no additional keyframing.

EDIT:Just realised the frame problems start is the frame at which the spaceship switches from animated to simulated. How might I fix this?

EDIT: u/Roger_D solved the issue.

That sounds like dependency issues. Does anything depend on the camera? Open a console window and reload the file and it should warn you (in the console) if there are any dependency loops.

It’s all due to rigidbodies and physics system.
image
The camera cannot find the spacecraft after the current rigidbody cache. You’ll have to rebake the rigidbody world. I tested it out in a blank file and rebaking the cache worked. The camera followed the ship afterward.
testing the spaceship.blend (1.7 MB)

rebaking the rigid body didn’t seem to work for me. Perhaps it’s my computer?

I’ve rebaked several times and I just can’t get it to work

EDIT: Just realised the frame problems start is, as you pointed out, the frame at which the spaceship switches from animated to simulated. How might I fix this, so that I can still have the switch from animated to dynamic?

Did some tests and it does seem to be a dependency issue. I believe it’s a dependency graph issue. If you want to fix it momentarily, I recommend not using forcefields until it’s fixed. The forcefield is in smokey balls. If you get rid of this then it fix the camera.


It works fine in 2.79… But for 2.80+ it causes an issue. Attached a simple file I made from 2.79b.
Rigidbodies and Forcefield bug blend 2.79.blend (617.1 KB)
I’ll do a bug report on this.

Reorganization helped your file but still I feel there is a bug. Here your fixed file using 2.81beta.
spaceship 2.2.blend (1.8 MB)

I do recommend caching rigidbody physics and then cache smoke, just incase.

Thanks mate, you’re amazing :slight_smile:

UPDATE: Deleted forcefield and rebaked, and, whaddya know, it WORKED! Roger_D, you’re an absolute lifesaver.

P.S: Could it be possible that the forcefield was affecting the rigid body world, which in turn affected the forcefield, thus causing a dependency loop? Thanks again for all the help, btw.

UPDATE: So, I added the turbulence back into smokey balls, disabled turbulence in the field weights of the rigid body world and rebaked, just to see what would happen. It did the thing again. So I guess there IS still a bug, unless I did something wrong. And I can’t get it back to working order. I’ll post an updated blend file when I get the chance.

No problem. There is a dependency issue.

Here is a merged bug report if you wanted to scan through. My report was merged with this one
https://developer.blender.org/T58044

Changes needs to be done with the dependency graph and physics before this is fixed sadly.

thanks. Hey, btw, is there a way to quickly find the source of a dependency cycle?

I have no idea how that works. You might be able to talk to Philipp Oeser (lichtwerk).

He was able to find out the cycle in my report. https://developer.blender.org/T71011

Ah, thank you. I’ll be sure to check him out.

I was able to fix the issue by deleting the blend1 file, and rebaking everything. (I should also note that I turned the smoke flow in field weights to zero just incase)

I guess the cache just got “stuck,” and that’s what caused the retention of the bug.

Again, thanks for everything dude; I would’ve never figured it out otherwise.

Happy blending.

1 Like