Camera Tracker: discontinuity in camera rotation (from +180 to -180° for instance)

SpaceEye
SpaceEye Posts: 37 Just Starting Out
edited December 2020 in HitFilm

Hi,

For the first time I have an issue with the camera tracker effect, see attached video:

Hitfilm Pro 16 : Camera tracker issue - YouTube

I added the camera tracker effect on my footage (right after Mocha Pro effect but I doubt it's the cause of my issue). Then "Track features", "Solve camera", I select some points to define the ground, the "Create scene".

Everything is good except at two moments :

  • When the generated camera rotation goes from (X,Y,Z) = (3.4, -86.3, 0.0) to (3.8, 86.4, 359.6): there is a discontinuity on 1 frame and the camera is misplaced, then everything is back to normal
  • When the generated camera rotation goes from (X,Y,Z) = (178.3, -88.3, 184.2) to (-179.9, -88.2, 182.4): same issue

For the records I'm using Hitfilm Pro 16, Windows 10, not the latest NVidia drivers (I skipped the latest update).

Is it a known issue or am I doing something wrong here?

Edit : If I do not select points to define the ground, the camera is correct, no glitch at all (but it's upside down as usal so it's a pain in the back to work with it...).

Comments

  • FilmSensei
    FilmSensei Posts: 3,108 Expert

    Wow! That is bizarre. I have never had that happen before. I have no idea why that would happen.

    The workaround would be to manually adjust the Camera Track Point to get everything match the ground plane. It doesn't look like it would be that difficult to do, just make sure everything is parented before you start! 😉

    A secondary work around would be to delete that one keyframe that is out of place. The interpolation between the other two around it should carry it for that one frame.

  • SpaceEye
    SpaceEye Posts: 37 Just Starting Out
    edited December 2020

    Hi Jay, thanks for your answer.

    I'll try to manually adjust the Camera Track Point to get everything match the ground plane. I f I remember correctly you made a tutorial on this a while ago, I'll check again your channel. My current workaround was to simply avoid defining ground and everything works perfectly. But your solution will make my life much easier.

    I also tried to remove the quirky frame but the issue occurs anyway. As soon as there is a switch from +180° to -180° / 0° to 360° the camera goes crazy for one frame. I even tried to manually interpolate the position without success.

    I reproduced this issue manually, just editing a camera Z rotation: 1°, 0.5°, 0°, 359.5° (bang quirk!), 359° (back to normal), 358.5°

    Here is the link to the HFCS file: https://1drv.ms/u/s!AkN-MiCixbTCmsB9ft5P8kjBGRptaQ?e=h1GxaQ

  • SpaceEye
    SpaceEye Posts: 37 Just Starting Out

    Ok, the issue is really an interpolation artefact. If I take the sample above (the simple test with 6 frames):

    • If I change interpolation type for the two frames "0°" and "359.5°" from "Linear" to "Constant", tada, no issue anymore.

    It might not be an HF bug, but the interpolation is messed up by default. It reminds me of antemeridian issue in geography (when you go from +180° coordinates to -180° coordinates"...

  • FilmSensei
    FilmSensei Posts: 3,108 Expert

    That is crazy. Hopefully, you can get it manually rotated to have the ground plane actually belong where it should. It looks like a fairly basic shot, so I wouldn't think it would be too difficult. It is just so strange that The Foundry would do that!