A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
1 of 2
1
object tracking
Posted: 23 February 2019 04:41 AM   [ Ignore ]  
Avatar
Total Posts:  27
Joined  2007-03-22

Hi guys. First of all i have to say, the 2D tracking in C4D is awesome but I have a problem. How can i use object tracking together with existing camera? I dont want to replace calibrated camera (because it is not moving and it is already calibrated). Is it possible?

thanks
Lopolo

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 23 February 2019 06:07 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Lopolo,

Set the Camera of the Tracking-Object to the same parameters as the camera you have already calibrated.

Create enough manual tracker for the object in question. Select the manual tracker for that object (note: there can be more than one object being tracked, name them wisely)

In the Object-Tracker object, use the Assign-Selected, to get the manual tracker from the Tracking-Object. Use the Reconstruction then.

( … a while ago, I had a question here with a large object-movement and not any camera movement at all. there, my suggestion was different, to auto-track the object and exclude the static part.)

This series covers a lot of ground: (Yes, I assume you know most of it, based on your post)
https://www.cineversity.com/vidplaylist/motion_tracking_object_tracking_inside_cinema_4d/motion_tracking_object_tracking_inside_cinema_4d_introduction

https://help.maxon.net/us/#OPHTRACKEDOBJECT-PH_GROUP_TRACKERS

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 23 February 2019 06:27 AM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.:

Here is a one-minute screen capture, starting with a static camera and a few manual tracks, while using geometry. (Feel free to download the clip)

https://www.amazon.com/clouddrive/share/rZiSwJmKoA1r2jxoelCum4KVmyOwwYJCZYUH05PpMEb

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 23 February 2019 06:50 AM   [ Ignore ]   [ # 3 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 23 February 2019 06:27 AM

P.S.:

Here is a one-minute screen capture, starting with a static camera and a few manual tracks, while using geometry. (Feel free to download the clip)

https://www.amazon.com/clouddrive/share/rZiSwJmKoA1r2jxoelCum4KVmyOwwYJCZYUH05PpMEb

thank you very much! I will check it! grin

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 23 February 2019 06:51 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Lopolo, enjoy your weekend.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 23 February 2019 07:22 AM   [ Ignore ]   [ # 5 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 23 February 2019 06:07 AM

Hi Lopolo,

Set the Camera of the Tracking-Object to the same parameters as the camera you have already calibrated.

I’m doing something wrong because it doesn’t work. When I copy data (PSR + camera data) of calibrated camera (made by Camera Calibrator tag) to the Solved Camera ( I guess you meant this by Camera of the Tracking-Object) it will not hold inputed PSR when reloaded.

I have to try that matrix xpresso trick yet.

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 23 February 2019 07:38 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Lopolo,

The camera below the Tracking Object needs to stay there. IT is produced by the Tracking Object. Fill in the parameters, or use the Global Matrix via XPresso (switch the XPresso off after transfer) and set the Focal length.

If you would share the file, I can take a look at it.

Cheers.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 23 February 2019 05:07 PM   [ Ignore ]   [ # 7 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 23 February 2019 07:38 AM

Lopolo,

The camera below the Tracking Object needs to stay there. IT is produced by the Tracking Object. Fill in the parameters, or use the Global Matrix via XPresso (switch the XPresso off after transfer) and set the Focal length.

If you would share the file, I can take a look at it.

Cheers.

Thank you!
This is a project. I just replaced footage seq (jpegs rather than tiffs) to keep it small but tracks are there.
http://www.3d.cz/_share/cineversity.zip

Thanks again!
Lopolo

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 24 February 2019 12:50 AM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Lopolo,

Thanks for the file, I have sent you an upload link. OR is this your very own server (I looks that way, but I have to ask)? I’m cautious, I hope you can relate.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 24 February 2019 01:18 AM   [ Ignore ]   [ # 9 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 24 February 2019 12:50 AM

Hi Lopolo,

Thanks for the file, I have sent you an upload link. OR is this your very own server (I looks that way, but I have to ask)? I’m cautious, I hope you can relate.

All the best

I see .. Yes, it is mine server and it is safe grin

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 24 February 2019 01:43 AM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks, Lopolo, I got your file. Sorry about that, but I’m rather careful than risking my safety.

I had a first glimpse on the footage, and It looks like that the parallax is pretty low.
I will see what I can get out of it.

My tip so far, without tracking it: if you have to do it again, try to move it away from a perpendicular view, like rotating to the right then to the left, as pre-roll. In that way, the Tracker is better “calibrated”.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 24 February 2019 01:58 AM   [ Ignore ]   [ # 11 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 24 February 2019 01:43 AM

Thanks, Lopolo, I got your file. Sorry about that, but I’m rather careful than risking my safety.

I had a first glimpse on the footage, and It looks like that the parallax is pretty low.
I will see what I can get out of it.

My tip so far, without tracking it: if you have to do it again, try to move it away from a perpendicular view, like rotating to the right then to the left, as pre-roll. In that way, the Tracker is better “calibrated”.

Cheers

No apologies please, it is absolutely fine and I can understand that. Paralax o tracked area? Yes, it is not large but I hope it is enough. I wonder if I should make some python trigonometry script somehow even if it has to be included inside c4D tracker. Mocha gave me a pretty good 2D position of each corner and the length + camera parameters are know. This is my first time Im trying c4d solution. Thanks for the tip, yes it would help but i hope there is enough decimal places to get some acceptable solution in this case as well.

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 24 February 2019 04:00 AM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Here is your file back, Lopolo.

Scene file
https://www.amazon.com/clouddrive/share/f5BWRVr3zBEjGfdzAgegV65zhVk2bnu6JhgRPBciiVX

This is not perfect since I added only a few extra trackers to it. The plane.1, has already some manual adjustment on the f-curve, to follow more the quick movements of the target, but it is indeed not even close.

My suggestion:

Pre-roll, give the flat target more perspective for the camera, slowly to the right, to the left and if possible backward, so the X marks on the white rectangle move through space. Even move closer to the camera for a moment might support the solve.

Use a stronger cardboard, if I’m not mistaken the frames around 190 shows it more bend than before and after.

The best would be of course to stick a little box in the middle of, or perhaps a pyramid in the middle, so the tip of that object would be much closer to the camera and in this way produce better spatial information.

Make a lens profile, the smaller the tracking area, the more any tiny little bit of lens distortion counts. In this case even more, as it is more a planar tracking than a spatial. Take the lens profile in the distance you like to track. Or at least set the focus to that distance. Lenses as you undoubtedly know, breath, so the wrong length will lead to weak results.

Never believe what is written on a lens. (Except it was hand calibrated (Master Prime, etc.). I assume you have a Canon EF 24-70 lens in use (Or Sigma… etc.), which one from that series alone will change the outcome already, as they never give you exact 70mm on the longer end.

Track each of your marks, the more data, the better in this case. There are parts with a lot of motion blur, take especially good care of those.

Typically people suggest measuring from the sensor, (the O with the | in it). If you are close and want to be precise, use the nodal point of the lens in the final measuring. A 70mm on a 24.6 sensor has roughly a 20º field of view, that is relatively long (I do not mention the equivalent measure, as that is nonsense, sensor are cropped, not lenses). While being already on the longer end of the optics, the smaller parallax given is even more limited. Hence my tips to get more data.

Since the scene is measured, so I assume, the tracking rectangle should be used in the exact same size in the scene. I have used an old trick from Tim Dobbert’s book here, to have a polygon (not a primitive!) as a child on a Null. The Null is located on the upper left corner of the plane, precisely on the first point so to say. That allows to quickly position the plane into the scene. All adjustments are made with the Null only: Position it, then rotate it.

Yes, Mocha came to my mind as well, since we’re are here trying the C4D route… Triangulate the camera position perhaps.

As a side note, I wouldn’t use only an X on that target, as they are all too similar, and it takes more time to adjust. Use other signs as well.

BTW.: I created in one exploration also a traveling mask, which allowed me to automatically produce only trackers inside of the target. But the result was not so much better than the manual trackers in the scene above.

All in all, the scene above shows that a result is possible and I hope that by using all X marks on the target, while added my suggestions to the mix, that a result is very likely achievable. If you bake that plane, minor adjustments can be made, e.g., deleting noticeable single frame spikes, or at least lower those.

My best wishes for your project

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 24 February 2019 06:27 PM   [ Ignore ]   [ # 13 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 24 February 2019 04:00 AM

Here is your file back, Lopolo.

Whow. Even if this is not perfect you were able to get far closer to useful solution than me grin Thank you! I was aware that this footage is not ideal but I like use this approach to test any new technology. The suggestion with the pyramid(s) is great idea how to get more points with wide range which should help a lot. Thanks again, this is a way! The solid plane is a good point as well even if I planned to divide the plane into three pieces horizontally because I wanted to get a bit more realistic result. So, thank you for your time again. It helped me a lot! (especially camera xpresso trick). I will have to try to go through entire process again. One more question. When do you apply that xpresso trick? I mean, what step in the process?

Dr. Sassi - 24 February 2019 04:00 AM

Never believe what is written on a lens. (Except it was hand calibrated (Master Prime, etc.). I assume you have a Canon EF 24-70 lens in use (Or Sigma… etc.), which one from that series alone will change the outcome already, as they never give you exact 70mm on the longer end.

I hoped the L series could not be lying much grin You are right, it would be better to make lens profile. I will have to check how to do it in c4d because my only experience with this came from Nuke.

Dr. Sassi - 24 February 2019 04:00 AM

Since the scene is measured, so I assume, the tracking rectangle should be used in the exact same size in the scene. I have used an old trick from Tim Dobbert’s book here, to have a polygon (not a primitive!) as a child on a Null. The Null is located on the upper left corner of the plane, precisely on the first point so to say. That allows to quickly position the plane into the scene. All adjustments are made with the Null only: Position it, then rotate it.

I see. I’m wondering if I should try to adjust one single polygon to the tracked corner points by xpresso. It will not be precise (especially in Z) but it could work, if I will use few correct positions of tracked plane.

Dr. Sassi - 24 February 2019 04:00 AM

All in all, the scene above shows that a result is possible and I hope that by using all X marks on the target, while added my suggestions to the mix, that a result is very likely achievable. If you bake that plane, minor adjustments can be made, e.g., deleting noticeable single frame spikes, or at least lower those.

Absolutely!
Thanks!

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
Posted: 25 February 2019 02:04 AM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the detailed reply, Lopolo.

The Canon L series, since I have the older 24-70 F/2.8 I read the review article when the new one came out. Hence my memory that the range was different in both. It might be longer than 70mm. Creating a profile:
https://www.cineversity.com/vidplaytut/new_in_release_17_quickstart_lens_distortion_tool
Since this is a tutorial with a GoPro, the discussion about the focus pulling or even a zoom lens is excluded. What I have missed in pretty much any source about this profile, even in my beloved books about, Create the lens profile form the focus distance you want to use (Breathing).

The triangulation, given the field of view with around 20º, the given trackable area being not even 20% of it, you get a small angle for the point. Which means the blurriness of the pixels will show up dramatically as a variable in that equation.

I tried last night a different method, but I have to continue today, just to explore more options, No idea if that leads to anything, but that is part of the game.

My best wishes

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 25 February 2019 02:36 AM   [ Ignore ]   [ # 15 ]  
Avatar
Total Posts:  27
Joined  2007-03-22
Dr. Sassi - 25 February 2019 02:04 AM

The triangulation, given the field of view with around 20º, the given trackable area being not even 20% of it, you get a small angle for the point. Which means the blurriness of the pixels will show up dramatically as a variable in that equation.

Yes, you are right but still, every single decimal place should help a lot. Of course, precise tracking points are needed but I was nicely surprised of quality built in 2D tracker. Higher resolution (let’s say 4k footage) helps a bit too. My example was extreme (1/25 shutter speed to get strong motion feel) and I sent it as a low res (and very compressed) footage and you were able to get basic solid track anyway.

Dr. Sassi - 25 February 2019 02:04 AM

I tried last night a different method, but I have to continue today, just to explore more options, No idea if that leads to anything, but that is part of the game.

Interesting grin

Lopolo

 Signature 

Lopolo
http://www.3d.cz

Profile
 
 
   
1 of 2
1
 
‹‹ Moving mesh issue      catenary sag and sway ››