i’m not sure where, but i’ve heard rumors of a camera matching script (for matching 3d objects to the movements of a real camera) floating around somewhere. Does it actually exist?
This would be very useful for me because i do a lot of 3d compositing in blender. Plus, i don’t have ICARUS because it isn’t freeware anymore!! :x
i can program in BASIC, but not in PYTHON, and a camera matching script sounds like a hard thing to do.
I never really got very far with it though! If you don’t need much more than what I already have in the script, then let me know what more you need and I’ll try and find some time to make the changes…
thx a lot for that link to the program! i have always been looking for a freeware camera matching program!
I’ll try and download your script when i have time. i don’t really know any python so i can’t make changes or add things to your script. but, if it works as-is, then great!
after tracking in Voodoo, i loaded your script and ran it with no errors (this script only works in Blender version 2.28c +)
but, the camera animation didn’t match the tracking results at all. all that was there were a few 5-frame long “jiggles”. This might have been an error i made while using Voodoo, but i’m not sure. i’ll keep you posted on further tests.
In the online manual, it states that the current version only takes into account rotation and zoom camera operations. This implies that the camera origin is fixed, and that translation is not taken into account.
ok leon. i did a short test with the sample image sequence provided with Voodoo (19 frames.) After using your import script, and some major tweaking, i got it working fairly well.
The major problems:
everything is backwards, so i had to reverse some of the camera ipo’s, and then turn it upside down. i don’t know python, so i can’t fix your script.
the ‘reference point’ object works, but it is a long way out from the camera. i had to zoom out really far to see it (although this isn’t as important)
Thanks for the testing! Unfortunately (well, possibly fortunately!) I’m away from computers for the next month or so, so I don’t have any time to fix the things you mentioned.
However, it shouldn’t be too difficult to fix the reversal issue, even if you don’t know python: the following code is where it all happens…
for curv_point in range(no_frames):
cam_euler = mat2euler(cam_rotations[curv_point])
rot_x = -cam_euler[2] - pi / 2
rot_y = cam_euler[0]
rot_z = -cam_euler[1] + pi / 2
rot_x_deg = rot_x * 180 / pi
rot_y_deg = rot_y * 180 / pi
rot_z_deg = rot_z * 180 / pi
This sets the X, Y and Z rotations of the camera. A little playing with these lines should fix the problem.