I have an fbx exported from Agisoft Metashape containing a mesh plus a whole load of cameras.
There is actually one camera per frame of video, frames that were used to generate the mesh using photogrammetry. As I have the parameters for the camera at each frame, I have a camera track.
I want to take this group of cameras and convert it into a single camera with the position and rotation animated on a path. The path would need to pass through each of the cameras in turn. I suppose this is like âun bakingâ the camera path.
If all the cameras are in the scene you could use constraints with animated intensity or visibility to make it follow. Or just create a curve by snapping to the camera positions then match the rotations at those points.
An automatic / scripted approach is what Iâm after. I was hoping this kind of problem might have an existing generic approach - ie âpath through objectsâ kinda thing.
Maybe this wonât help at all but I was trying several open source photogrammetry solutions (Meshroom, Colmap, âŚ) and I always wanted to import an animated camera from their SfM solution.
Some weeks ago a clever guy released this:
And it helped me a lot getting real animated cameras into Blender from Meshroom and Colmap.
Maybe you can get Metashape to export something that this importer understands. Or you could try using the open source alternatives (for free of course) for photogrammetry to get something that fits your needs.
@SteffenD that photogrammetry importer looks like exactly what I need - Iâm trying to get a camera track out alongside the generated mesh. Sadly I donât think I can get the right data out from Metashape. I might try Meshroom but I hear itâs much slower
@Serge_L - thatâs really great! Animation nodes area amazing. Two questions -
Why do we need to use the Delay Time node? It seems to work without.
I can bake keyframes to bake the animation path into the new camera for export. However, Iâd like to be able to space out the source camera keyframes and benefit from interpolation between these generated keyframes. I tried dividing the Time Info frame by (eg) 5, then a math floor on the result, and used this to drive the list lookup. This worked, as in it meant a new camera would be used for keyframing every 5 timeline frames, but âdummyâ keyframes were still added between these which I have to then manually delete. Any idea how I can only bake a keyframe on changed data?
put the number of cameras in âNumberOfObjectsâ the name of the camera must be âcameraâ
clone a camera and rename it âMyAnimatedCameraâ
run the script