Issues with multiple orbit "laps" in single animation

Hi there,

I’m showing growth of a plant as a point cloud and I’d like to provide a full circular camera orbit pass for each recording of the plant. This is different than what I’ve created already which is a single orbit for multiple plant point clouds (different time steps) rotating.avi - Google Drive.

I believe this is similar to this question Multiple camera orbits in Paraview - Stack Overflow, but it doesn’t have an answer. I found another post here that recommends manually constructing the orbit paths, but that seems pretty arduous for as many timesteps as I have per plant, and the fact I have a large quantity of plants total ( Rotation of the camera at a specific speed - #5 by bastiend ).

I noticed that I could create another CameraKeyFrame and append it to the existing camera, and then I tried to copy the PositionPathPoints and other attributes from the previous camera orbit keyframe to the new one. This seems like it would be a good approach to programmatically adding multiple rotations, but when I add the new Keyframe to the camera track it seems like the KeyTime starts updating in weird unintuitive ways.

Here’s a video showing the things I’ve tried and hopefully it is simple enough to recreate. Screencast from 02-10-2023 08:12:38 AM.webm - Google Drive

Any suggestions for how to approach this differently?

Hi @Devin_Richard_Bayly

What is the question here ? I’m not sure to follow what is not working as you expect or what you are not able to achieve.

Best,

Sorry to be unclear, I also just noticed the video doesn’t seem to be working as a way to showcase the problem. I’ll make sure to update this post by the end of the day.

Well, I’m not sure about the bug I was encountering but I just had some luck with this script. Perhaps we can close the books on this and I’ll suggest my script on the stack overflow link mentioned above.

from paraview.simple import *

anim = GetAnimationScene()
renderView1 = GetActiveViewOrCreate("RenderView")
cameraAnimationCue1 = CameraAnimationCue()
#cameraAnimationCue1 = GetCameraTrack(view=rv)
cameraAnimationCue1.Mode = 'Path-based'
cameraAnimationCue1.AnimatedProxy = renderView1
# create a new key frame
n = 3 
for i in range(n):
    keyFrameN = CameraKeyFrame()
    keyFrameN.Position = [-6.6921304299024635, 0.0, 0.0]
    keyFrameN.FocalPoint = [1e-20, 0.0, 0.0]
    keyFrameN.ViewUp = [0.0, 0.0, 1.0]
    keyFrameN.ParallelScale = 1.7320508075688772
    keyFrameN.PositionPathPoints = [0.0, -5.0, 0.0, 2.938926261462365, -4.045084971874736, 0.0, 4.755282581475766, -1.545084971874737, 0.0, 4.755282581475766, 1.5450849718747361, 0.0, 2.938926261462365, 4.045084971874735, 0.0, 1.3322676295501878e-15, 4.9999999999999964, 0.0, -2.9389262614623624, 4.045084971874735, 0.0, -4.755282581475763, 1.5450849718747368, 0.0, -4.755282581475763, -1.5450849718747341, 0.0, -2.9389262614623632, -4.045084971874731, 0.0]
    keyFrameN.FocalPathPoints = [0.0, 0.0, 0.0]
    keyFrameN.ClosedPositionPath = 1 
    keyFrameN.KeyTime = i/n 
    cameraAnimationCue1.KeyFrames.append(keyFrameN)



# ending scale
keyFrame9333 = CameraKeyFrame()
keyFrame9333.KeyTime = 1.0 
keyFrame9333.Position = [-6.6921304299024635, 0.0, 0.0]
keyFrame9333.FocalPoint = [1e-20, 0.0, 0.0]
keyFrame9333.ViewUp = [0.0, 0.0, 1.0]
keyFrame9333.ParallelScale = 1.7320508075688772


# initialize the animation track
cameraAnimationCue1.KeyFrames.append( keyFrame9333)
anim.Cues.append(cameraAnimationCue1)

Put simply I was running into an issue with the keytimes getting overwritten, but I can’t recreate that anymore.