Combining Keyframing + Time-Steps (Python)

Is there a built-in way to combine the keyframing technique along with making it so that the animation steps through time as well? Or will I have to manually interpolate the camera positions for each timestep-frame?

The animate_keyframes() utility function does not currently support incrementing through time but it’s something we are going to fix. In the meantime you’ll need to manually interpolate the camera and increment the timestep every X frames. Here’s one way you could approach that so the timestep is advanced every 5 frames:

# Import necessary modules

from vapor import session, camera

# Acquire the camera settings from an initial session file

ses1 = session.Session()
ses1.Load(homeDir + "/Examples/eastTroublesome/et_1.vs3")

cam1 = ses1.GetCamera()
dir1 = cam1.GetDirection()
pos1 = cam1.GetPosition()
up1 = cam1.GetUp()

# Acquire the camera settings from a secondary session file that we will transition into

ses2 = session.Session()
ses2.Load( homeDir + "/Examples/eastTroublesome/et_2.vs3")
cam2 = ses2.GetCamera()
dir2 = cam2.GetDirection()
pos2 = cam2.GetPosition()
up2 = cam2.GetUp()

# Difference between camera positions on each axis
dPositionX  = (pos2[0] - pos1[0])
dPositionY  = (pos2[1] - pos1[1])
dPositionZ  = (pos2[2] - pos1[2])

# Difference between camera direction vectors on each axis
dDirectionX = (dir2[0] - dir1[0])
dDirectionY = (dir2[1] - dir1[1])
dDirectionZ = (dir2[2] - dir1[2])

# Difference between camera up vectors on each axis
dUpX        = (up2[0] - up1[0])
dUpY        = (up2[1] - up1[1])
dUpZ        = (up2[2] - up1[2])

# Perform a linear interoplation between the Camera's start position, direction, and up vector

steps=50
for i in range(0,steps):
    position = [
        pos1[0]+dPositionX*i/steps,
        pos1[1]+dPositionY*i/steps,
        pos1[2]+dPositionZ*i/steps
    ]
    cam1.SetPosition( position )

    direction = [
        dir1[0]+dDirectionX*i/steps,
        dir1[1]+dDirectionY*i/steps,
        dir1[2]+dDirectionZ*i/steps
    ]
    cam1.SetDirection( direction )

    up = [
        up1[0]+dUpX*i/steps,
        up1[1]+dUpY*i/steps,
        up1[2]+dUpZ*i/steps
    ]
    cam1.SetUp( up )

    if ( i % 5 ):
            ses1.SetTimestep(int(i/5))

    ses1.Render( homeDir + "/Examples/eastTroublesome/captures/" + str(i) + ".png")