Zero to Hero hopefully!, supporting links and downloads below. Blender Camera Solve for export to HitfilmTutorial 1 :
This tutorial assumes no knowledge of Blender or tracking, it walks you through installing Blender, basic user interface commands and getting your first scene tracked. http://www.youtube.com/watch?v=VREMV00PKJ8 Tutorial 2 :
I work through how to camera solve the track including lens distortion etc.http://www.youtube.com/watch?v=EgcDdEzh3aA Tutorial 3 :
I explain how to install the Blender to Hitfilm export script and use it.https://drive.google.com/file/d/0By8EUjcMjNPRb2lOZWdQOEJHZGM/edit?usp=sharinghttp://www.youtube.com/watch?v=Gk-YTHA1-Jg
Image files used in this demo can be downloaded herehttps://drive.google.com/file/d/0By8EUjcMjNPRVWxtLWxHQ2hXYm8/edit?usp=sharing Script Updates15/01/2014 18:54 added new file name21/01/2014 21:33 changed how animation of emptys calculated, fixed orientation, location is always from global so if it's following a path that will get exported. Rotation is from local so if it's not baked it will be whatever the rotation or animated rotation of the object is, if it is baked you'll get the additional constraint rot added etc. General comments, (covered in tutorials)
http://www.youtube.com/watch?v=HdMqYPbUdHMhttp://www.youtube.com/watch?v=zc8b2Jo7mno Known issues
- It's vital you set the frame rate correctly in blender before you export, hitfilm uses time code in the xml for frame rate so I have to calculate that off the frame rate so it all stays in sync. Make sure you have the framerate set correctly to match in hitfilm as well.
- I'm calculating the zoom off the sensor width etc. just keep that at what your track has refined to I pull it from there. I've tested with my GH3 and Iphone 5 and the random clip in the first post I guessed at the settings for in the first post they all resolve ok, have done some decent pans etc as well. Worth getting lens calibration correct as well but the refine works quite well for that also.
- If you want to export emptys you have to create them where the track point is you want and select them to export, I can change it to auto export everything to skip that step, but I've left it working like that for now.
- By default it will not animate emptys as that takes up loads of space in the xml file, if you look on the export page under scale I've added an export empty animation option so if you have created funky path animations in blender you can parent the empty(s) to that and export into hitfilm, that's pretty cool, watch out for gimble lock that’s not a script bug but a maths issue with Euler
- I've tried hard to get the orientation in the blender export to match what gets into hitfilm. I try and keep the camera scale at 1 and the xyz planes looking sensible so if it's a pov shot something like stick the camera at 90deg rotation parallel to the floor on the x axis as well then it comes into hitfilm at 0 pointing straight ahead for a start
- If there is media that has been tracked the export script will attempt to add that to the composite shot, worst case scenario just link it back in hitfilm.
- I had to derive a lot of this, there's no published api for the XML, I didn't pay much attention in math class about matrix multiplication and euler etc and had to teach myself python/blender etc as I went along so don’t rely on it for paid blockbuster work
- Gimbal lock with the animation export is not that big a deal you just need to be aware of with certain types of animation it so if you see funny animation glitches like in my example spinning banana on a circular path following the path video try changing the relevant objects Euler order of calculation in blender (as gimbal lock video) or work around it in hitfim as I have shown in the example vid I just exported following the path in space but not in orientation to the path just let is spin then key framed orientation every 90 deg in hitfilm to replicate what was happening in blender.
Old .ma export script
- You might get an error popup R6034 application has made an attempt to load the C library incorrectly when you first load the export module. Just click ok, it's a bug on windows with the UUID python lib that i needed for the xml creation and hitfilm, you can look in the code first if you don't believe me Shouldn't get it on linux/mac (i've tried to use libs that will work cross platform). Need to figure out workaround.
- If you do save as in blender to a different directory than the original file was in I get a relative reference to the media that I can't resolve so you have to load the media separately. If you do save as a different file name in the same directory it's fine. I can fix that just need to figure out better place to get media file path.
- I need to re-factor the code (putting it politely ) add proper error handling etc. this is just raw first pass to get it working ish.
- I need to read the blender guide on writing export scripts correctly I didn't realise there was one until the end so will need to tidy it up ;-)
Fixed to the scaling issue with the blender to hit film camera path animation export extension when I was searching about to see how to do it. I had a quick look while I was figuring it out and I think I've fixed it, basically the original version and the one it was based on had hard coded the sensor width size to a fixed value (not that it was obvious it's an maya attribute called .cap that says its an aperture setting and takes inches :0) ) so if you are doing a solve in blender and have that set to anything but the default it throws all the calculations out.
I've changed it so it pulls it from the active blender session and converts the width to inches and it appears to work now with my limited testing and pixel ratio of 1 with 1080p and 720p.
YMMV but it works for me. The's a bug with the rotation translation in the script as well that crops up every now and then when the axis flip from - to +, I'm just rewriting that part but I'm back at work tomorrow so might take a while and I could get distracted and haven't done any python or maya so figuring it out as I go along but as usual it's finding the relevant API references rather than stringing the code together, I'm a bit rusty but if I can do it I'll post it as an update.https://drive.google.com/file/d/0By8EUjcMjNPRbzFyaHV5ZEpjZ0k/edit?usp=sharing
I've been using blender 2.69 into hitfilm ultimate for my tests with the camera solver.http://www.youtube.com/watch?v=XUa5TTLYc-Y