FYI: Mocha tracker sale

Tech Diver wrote on 6/19/2014, 10:28 AM
FYI: I just got an email that Imagineer Systems is having a 3-day 50% off sale June 20-22 of their Mocha Pro tracker products. I noticed that if you have Mocha HitFilm you can get their $1500 software for less than $400. Fortunately, I qualify for academic discounts and can get it for just $99 (which sounds great but is still a considerable amount when your total annual income is a mere $18,000 a year from research stipends).

Peter

Comments

John222 wrote on 6/19/2014, 11:15 AM
Do you have a link to that student deal?
John222 wrote on 6/20/2014, 1:55 PM
I was just looking at the specs... It doesn't look like I can use this with Vegas Pro unless I have BCC. It also doesn't look like I can use it with Hitfilm Express 2. Am I correct?

Tech Diver wrote on 6/20/2014, 2:02 PM
Yes, you are correct. But even on its own (which is how I use it 99% of the time) it is a truly amazing piece of software for object removal, stabilization, and lens correction. I have HitFilm Ultimate where I use it for camera solving as well as After Effects where it is tightly integrated for mask generation (rotoscoping), tracking, camera solving and more.

You have to decide if it is right for you given the lack of integration with your tool set.

Peter
John222 wrote on 6/20/2014, 2:12 PM
My primary use would be for object removal and stabilization. So Mocha pro would accomplish this as a stand along package. Where I can import a clip, do what necessary and then save for use in Vegas or Hitfilm Express ??
Tech Diver wrote on 6/20/2014, 7:21 PM
For object removal, you must do everything in Mocha Pro itself, as there is no tool that integrates with it at that level. The only form of integration with Mocha is the importation of motion data (i.e. camera solutions, mask motion, tracking, etc.). After Effects does a pretty good job of automatically starting Mocha and sending a video clip to it, followed by the retrieval of tracking data, but you could just as well do that manually. Bottom line is that for object removal, everyone does it standalone.

My personal opinion is that Mocha's object removal capability by itself is worth the price especially for those in academia. By the way, I sincerely hope that you really are a student and are not just trying to get Mocha at a discounted price.

Peter
TheHappyFriar wrote on 6/21/2014, 11:10 AM
They don't want a student id any more for a student purchase?

I use Syntheyes for similar stuff. The programs are similar but Syntheyes has a couple different price points (based on which feature set you want). The biggest difference (besides price) is Syntheyes comes with stereo scene support, mocha will have it in version 4. I have an old script to import Syntheyes movements in to Vegas but it's not finished, very rough.
Tech Diver wrote on 6/21/2014, 3:25 PM
Yes, they still do require a student/faculty ID or other proof of being in academia. However, people sometime use IDs from years ago when they WERE students.

As for Version 4 of Mocha, they said it will ship in just a few weeks so the current sale is for version 3.1 but includes a free update. I already have 3.1 and made my purchase yesterday which I will use when v4 is released.

Peter
Tech Diver wrote on 6/21/2014, 3:28 PM
Stephen,

Are you willing to share your script? I have been wanting to write one to import data from Mocha, but don't know where to start though I write C++ code on a daily basis.

Peter
Former user wrote on 6/21/2014, 3:37 PM
From their website about academic versions:

Q. Are there restrictions on educational licenses?

Purchasing an educational license means that you are agreeing use the software for non-commercial projects only. Customers who abuse our educational policy will not be supported and run the risk of litigation.
Tim Stannard wrote on 6/21/2014, 3:55 PM
Peter, could you clarify this please:
"The only form of integration with Mocha is the importation of motion data (i.e. camera solutions, mask motion, tracking, etc.)"
Do you mean Mocha will integrate these with Vegas (I don't think Vegas can use camera solves or tracking), HitFilm Express or HitFilm Ultimate.

I have Hitfilm Ultimate 2 but did not see that format available for export in the tutorials for Mocha.
Tech Diver wrote on 6/21/2014, 4:28 PM
The Vegas plugin Hitfilm Ultimate comes with Mocha Hitfilm which can do camera solving (i.e. generate camera position data such that a 3D objecst/text in HitFilm look like they are part of the scene). HitFilm imports the position data as a set of coordinates in a text file that you can examine if you wish. Unfortunately, HitFilm cannot take advantage of any of the more advanced Mocha features that are part of Mocha AE or Mocha Pro.

The Vegas plugin BCC, from Boris FX, can import tracking data in the form of coordinates in a text file. I'm not sure if it can take advantage of other Mocha features.

Adobe After Effects has the tightest integration with Mocha Pro and Mocha AE, the latter of which is included with After Effects. It can import camera position coordinates (i.e. camera solutions), object tracking coordinates, and polygonal masks used for rotoscoping, all of which are in the form of text files that are a list of coordinate values. It does NOT import processed video sequences from Mocha (but you can render out anything you want while within Mocha and then drop it onto your timeline manually). One sort of nice thing is the ability to click on a button to start Mocha from within AE and automatically pass your trimmed clip to it via a small third-party tool call MochaImport+ ($35).

When working from Vegas (my #1 video tool), I render out a clip and manually import it within Mocha if I am doing object removal and then render it out and manually import it back to Vegas. Yes, it seems like a pain, but I am used to it. If I want 3D objects/text camera solving, I do it through the integration of HitFilm Ultimate in Vegas, which is a lot smoother than the manual method.

My goal is to write an integration module for Vegas that integrates Mocha as tightly as AE does. Thus my request to anyone who has similar script even if it's for another product.

I hope this is helpful.

Peter


Edit: fixed some grammatical errors (which I keep finding)
Tim Stannard wrote on 6/21/2014, 4:49 PM
Many thanks Peter. Indeed it was helpful. I am aware of and have used the Mocha HitFilm plug-in, but as you probably gathered, I was interested in what, if any, of the more advanced features are available.

I was particularly interested in importing shape data for rotoscoping, but never mind.

I'll have to decide whether just the object removal is worth it to me :)
John222 wrote on 6/22/2014, 7:22 AM
"My goal is to write an integration module for Vegas that integrates Mocha as tightly as AE does. Thus my request to anyone who has similar script even if it's for another product."

That would be great.
TheHappyFriar wrote on 6/22/2014, 8:41 PM
Peter, here's the instructions for using the script & the code. The guy doing most of the work got a new job and it never got finished (I really should, Syntheyes to Vegas would be really useful). It's a .cs file:
Ok, here's the script, you run it in Vegas (only tested in 10).

How to use it:
1) When you're done doing your tracking use Export -> "Tacker 2D Paths".
2) Save it as "c:\2dtracker.txt"
3) Set up your start/end frame.
4) Setup the U/V scale. U should be NEGATIVE 1/2 the height of your video. V should be 1/2 (not negative) the width of your video.
5) Offsets should be 0.
6) Only checkboxes checked should be "include outcome codes" and "2-d tracks".
7) Currently only one tracker is supported so open the text file and remove all the trackers you don't want to use (IE tracker2, 3, ...)

Now you've got it exported from Syntheyes. Not to use it in Vegas:
1) Import your video to a new track.
2) Make a track above that one and put the image you want to be locked on to the tracker there. Use track motion to adjust the image size to what you want.
3) "Tools"-"Scripting"-"fromfile_test".


using System;
using System.Text;
using System.Windows.Forms;
using Sony.Vegas;
using System.IO;
using System.Collections.Generic;

namespace VegasScriptSetup
{
#region LineData
public class LineData
{
private string mName;
public string Name { get { return mName; } }
private long mFrameNumber;
public long FrameNumber { get { return mFrameNumber; } }
private double mX;
public double X { get { return mX; } }
private double mY;
public double Y { get { return mY; } }
private double mOffset;
public double Offset { get { return mOffset; } }

public LineData(string name, long framenumber, double x, double y, double offset)
{
mName = name;
mFrameNumber = framenumber;
mX = x;
mY = y;
mOffset = offset;
}

public static LineData CreateLineData(string[] data)
{
if (data.Length < 5)
return null;

string name = data[0];
long framenumber;
if (long.TryParse(data[1], out framenumber) == false)
framenumber = 0;
double x;
if (double.TryParse(data[2], out x) == false)
x = 0;
double y;
if (double.TryParse(data[3], out y) == false)
y = 0;
double offset;
if (double.TryParse(data[4], out offset) == false)
offset = 0;

return new LineData(name, framenumber, x, y, offset);
}
}
#endregion

public class EntryPoint
{
private static Vegas mVegas;

public void FromVegas(Vegas vegas)
{
mVegas = vegas;
if (mVegas.Project == null)
return;

//InsertTrackMotionKeyFrame(0, (long)70, 70, -60);

string filename = "2dtracker.txt";
string filefolder = @"c:\";
string filepath = filefolder + filename;

FileStream textfile = File.Open(filepath, FileMode.Open);
if (textfile == null)
return;

StreamReader sr = new StreamReader(textfile);

List<LineData> lineDatas = new List<LineData>();
while (sr.EndOfStream == false)
{
lineDatas.Add(LineData.CreateLineData(sr.ReadLine().Split(' ')));
}

sr.Close();
sr.Dispose();
textfile.Close();
textfile.Dispose();

foreach (LineData data in lineDatas)
{
InsertTrackMotionKeyFrame(0, (long)data.FrameNumber, data.X, data.Y);
}
}

//public delegate void InsertMotionKeyFrameHandler(int tracknum, double milliseconds, double x, double y);
//public void InsertMotionKeyFrame_CallBack(int tracknum, double milliseconds, double x, double y)
//{

// InsertTrackMotionKeyFrame(tracknum, milliseconds, x, y);
//}

//public bool InsertTrackMotionKeyFrame(int tracknum, TrackMotionKeyframe frame)
public bool InsertTrackMotionKeyFrame(int tracknum, long frames, double x, double y)
{
return InsertTrackMotionKeyFrame(tracknum, Timecode.FromFrames(frames), x, y);
}
public bool InsertTrackMotionKeyFrame(int tracknum, double milliseconds, double x, double y)
{
return InsertTrackMotionKeyFrame(tracknum, Timecode.FromMilliseconds(milliseconds), x, y);
}
public bool InsertTrackMotionKeyFrame(int tracknum, Timecode code, double x, double y)
{
//sanitation
if (tracknum >= mVegas.Project.Tracks.Count - 1)
return false;
VideoTrack videoTrack = (VideoTrack)(mVegas.Project.Tracks[tracknum]);
if (videoTrack == null)
return false;

videoTrack.TrackMotion.InsertMotionKeyframe(code);
foreach (TrackMotionKeyframe frame in videoTrack.TrackMotion.MotionKeyframes)
{
if (frame.Position == code)
{
frame.PositionX = x;
frame.PositionY = y;
}
}
return true;
}

#region Conversions
private static double FramesToMilliseconds(double frames, double fps)
{
if (frames <= 0 || fps <= 0)
return 0;

return frames * (1000 * fps);
}
private static double MillisecondsToFrames(double milliseconds, double fps)
{
if (milliseconds <= 0 || fps <= 0)
return 0;

return (milliseconds * fps) / 1000;
}
#endregion
}
}
Tech Diver wrote on 6/23/2014, 7:31 AM
Stephen,

Thank you so much, this is awesome!!! I will work on it this week and next, and report on my progress.

Peter
John222 wrote on 6/27/2014, 8:18 AM
Is there a decent users forum for Mocha. The only one I found is at Creative Cow and it seems to be focused on the AE version. Having mega problems, in three days I've only gotten it to work twice and only for 21 frames and then it stops using the clean plate.
Tech Diver wrote on 6/27/2014, 9:45 AM
Yes, the mocha forum is at http://imagineersystems.com/forum. It looks like it is currently down, but there are probably enough mocha users here who might be able to help (assuming this does not violate Sony forum rules).

Can you briefly describe what is going wrong?

Peter
John222 wrote on 6/27/2014, 12:30 PM
It's not using my clean plates... I locate my pointer to the start frame (1), create a clean plate, open it with Gimp, modify it and save it back to the same file name. I then go back to mocha, select that clean plate in the remove tool and check use cleanplates exclusively. I then set my start and finish frames in the remove tool, make sure the proper layer is highlighted and select render this frame.. and nothing happens. If I tell it to start rendering, it does but it doesn't use my clean plate. When I go to the Results folder. it's filled up with un-modified frames.. On 2 occasions it actually worked. But it only did 21 frames and then reverted to using an unmodified clean plate. When I looked in the results folder. Sure enough the first 21 frames were my cleanplate the rest were unmodified cleanplates.... I'm stumped
John222 wrote on 6/29/2014, 10:46 AM
Figure it out... The objects masked area you want to remove has to be located within the background masked layer.
Tech Diver wrote on 7/1/2014, 4:47 PM
Sorry I did not get back to you sooner, but here is a link to a good tutorial on the use of clean plates in Mocha:
http://www.imagineersystems.com/videos/mocha-pro-tutorial-how-to-remove-objects-and-logos/view

Perhaps your answer lies there. If not, I can help look into it further.

Peter
John222 wrote on 7/1/2014, 5:57 PM
Thanks Peter, but I previous;y watched all those videos. I was missing the fact that the foreground layers splined area needs to be within the splined area of the background layer. In other words I was establishing a splined tracking area on the lower left side of the background layer and then creating a foreground layer with a splined area in the upper right of the layer, where I was going to do some image correction. Once I figured that out everything came to gether perfectly. This software is absolutely amazing.
Tech Diver wrote on 7/2/2014, 7:37 AM
Glad to hear that you got it working. Some of these tools are complicated at first, but once you figure out the technique it all makes sense. I agree, it really is an amazing piece of software. I particularly like the object removal feature.

Peter
John222 wrote on 7/28/2014, 6:53 PM
I noticed when you render with the Mocha Pro insert module it generates a series of layer mask frames in the Results folder... Can they be imported into Vegas and used as masks?