Is it possible to time offset an animation driver?


I’m trying to make some animations mostly driven by functions and noise modifiers, and I would really like to be able to time offset the drivers influence.

This would be very usefull on a hierarchy of objects (like a swinging arm) that all have the same channel as a driver but different time offsets to get overlapping motion throughout the chain. That way I could control everything with far fewer keyframes.

In this particular case I need to animate a number of simple characters, and I would like all the motion to come from just a few controller objects that act as drivers.

I have been searching the web to see if there is any way to get the driven channels to be offset in time. I’ve been looking into if it would be possible to do with python scripting, but I can’t seem to find any reference to time offset animation in blender at all, wich is kind of strange…

Please help!

Ok, so I wasn’t able to do exactly the thing I wanted to do, but I was able to find a kind of work-around thanks to a colleague who helped me out with the scripting.

Basically we made a py driver script that generates a sin function that has its amplitude, frequency and phase exposed to the driver system. That way I can offset the phase for each object that is transforming. It seems to work.

the script looks like this:

import mathutils
import bpy
import math

def delayedSine(amplitude, sineBase, speedFactor, phase):
newVal = math.sin((phase/10 + sineBase/10.0)*speedFactor)
newVal *= amplitude
#path = self.variables[0].targets[0].data_path
return newVal[“delayedSine”] = delayedSine

#syntax for expression field: delayedSine(Amplitude, frame, frequency, phase). Add variables: frame = current frame: single value / scene / frame_current, the others can be numbers or driven by any other value you would like.

It still dosen’t enable me to do time offset for f-curves in general, so if any of you have any advice on how to get the at the f-curve info please speak up.

I added an example file with the script that have a couple of cubes wich are phase-shifted based on their distance from a null at the world origin. That way I automatically get a time delay by copy pasting more cubes into the scene.


sinphaseexample.blend (551 KB)


What about evaluate(frame) for fcurve of an action ?
It evaluates the fcurve at a given frame but not sure if is works with actions defined with py drivers…

I have not tried this… but I know that in the Drivers settings there is the option to use Fcurves…
also setting here looking at it… I see at the very bottom when you first create a Driver… under modifiers… It gives you a polynomial … then under that is a box to add a frame range… I’ve never used these but I always have assumed they might be used for what your talking about…