• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Drawing a mask based on three vertices obtained as a result of 3D Tracker

Engaged ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

Hi all.
As a result of the work of 3D Tracker, we get points of 3D space. If we take three points of this space (or more), we will get the average position of such points, but if we choose only 3 such points, then the resulting average value will lie in the plane of these vertices. How to draw a mask along three vertices of such a plane???

TOPICS
Scripting

Views

428

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

The question requires clarification. Can I select specific 3D points obtained from the 3D Camera Tracker plugin's point array. For example 5, 12, 55 or 8, 32, 99

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

You need to work with layer space transforms like fromWorld() and toComp() or create your own code for the matrices.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

Hello Mylenium.

 

Could you tell us in more detail about the formation of space in a layer? First, I select certain 3D points, build a plane, and only then I start transforming the layer space. Here's how to find out the location of a certain 3D point without selecting it on the screen. If it were possible to select all the received 3D points in a certain frame, then generate a Solid for each point, and access the coordinates through numbers... But in my opinion, there is also no command for selecting all 3D points in a certain frame

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

Of course you would need to implement any proximity checks for unselected points yourself. That's a non-trivial math problem completely nothing to do with AE. You need to write your own vector math.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

Hello Mylenium.

Problems of this kind are interesting to me. Is it possible to get to the commands that appear when you press the right mouse button in the 3D Camera Tracker plugin?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I'm sure the command IDs are listed somewhere, but even then you'd have to instate a custom event listener to derive the context. This UI-based stuff doesn't have generalized hooks in the script engine and since the tracker technically is a plug-in, there may be some extra caveats to intercept those commands.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I still don’t understand whether it makes sense to dig further in this direction. It is possible to organize a listener, but whether it will interact with the plugin is not clear from the text of the letter... Is there a channel for communication with Tracker developers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

The trackers in Camera Tracker are added to small areas of detail, don't last for the entire shot, are not numbered, and contain no usable depth information until at least 3 of them are selected to define a 3D plane. If you have a camera pan, there is no depth information.

 

My procedure for using the Camera Tracker is always to establish an Origin and Ground plane with at least three trackers, then add a Camera and a Solid to the scene using the same trackers. If the shot is not a camera pan, you will now have depth information for every tracker. Once you are there, if you want to mark a single tracker, you can select just one tracker and create a new solid (I don't use nulls because you can't see if the track is accurate). You'll get a small solid, and you can see if it accurately tracks the feature. There is no accuracy calculation for individual trackers, so you must run a preview and look at the movement of the new solid to see if it accurately tracks the feature with the solid. 

 

When I get that far, I set all of the solids that I have added using Camera Tracker to Guide Layers and start adding my 3D elements. You could easily pick any of these solids and use them to generate a 2D vector path and keep it stuck to the tracked marker by creating a simple path with the same number of points as the trackers you want to follow. If you want to follow three trackers, create a closed path for a solid shape or complete mask, or 3 points on an open path you want to use to draw a line or create a motion path.  When you have the path created, select it and open Create Nulls From Paths. jsx from the Window menu, and apply Points Follow Nulls. You can now Shift + parent the path nulls to the three-track solids. 

 

The last step is to put thee track solids above the nulls that were created with the script and add this expression to the position property of each null created by the script. 

p = thisComp.layer(index-1).toComp(anchorPoint)

 You will end up with a comp that looks something like this project I recently created:

RickGerard_0-1696271646947.gif

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 03, 2023 Oct 03, 2023

Copy link to clipboard

Copied

Thank you very much for such a detailed description of the work of Tracker Rick. The purpose of my question lay in a different direction. The tracker does not have commands to automate the build process. All points for constructing geometry in the scene are selected manually. Thank you again for your response...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2023 Oct 03, 2023

Copy link to clipboard

Copied

LATEST

I know of no tracker that will build 3D geometry and extract a portion of the geometry for you. You always have to select points: Syntheyes, Mocha Pro, The trackers in Cinema 4D, and Blender or any Photogrammetric app I know of, like Drone Deploy or MetaShape. You always have to select points to extract geometry. Adding a few points to the trackers in AE and extracting their position in 3D space with a simple expression seems to be a viable workflow.

 

It would be nice if AE's camera tracker would give you an error status for the track points or automatically clean up points that didn't stick for a few frames as Syntheyes does. That would be a great feature request.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines