Jump to: Board index » General » Fusion

Tracking players in sport and showing their running lines

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

MikeHicks

  • Posts: 3
  • Joined: Fri Aug 24, 2018 9:28 pm
  • Real Name: Michael Hicks

Tracking players in sport and showing their running lines

PostSat Jul 06, 2019 5:17 pm

Hi all,
I've been using the Fusion tab in Davinci Resolve to paint stabilised running lines onto the ground to show where players should be going so we can get a video playbook together and so far it's going pretty well.

Running Lines.png
Running Lines.png (976.87 KiB) Viewed 2306 times

Here's my method

Nodes.PNG
Nodes.PNG (105.71 KiB) Viewed 2306 times

a) Use a planar tracker to steady the pitch in the camera shot
b) Paint the lines on the ground once the shot is steady
c) Add the pitch lines as they weren't marked at the time
d) Use a Delta keyer to extract the players from the green pitch
e) Merge this over the top of the painted footage so the players appear above the lines
f) Invert the stabilisation
g) Clip the edges to remove the stabilisation inversion warping

I've now got two questions:

1) This method works, but from those more experienced in compositing, is it a good way to do it - can people suggest improvements?

2) So far I manually draw the lines with a paint node. I've tried using a tracker on the players and it logs their path nicely for me, however, while I can use this to add a graphic/effect to highlight them, I've yet to find a method of using this data to draw the line?

Any help is much appreciated and hopefully this will help others out there too...

Cheers,
Mike.
Offline
User avatar

Saad Shah

  • Posts: 152
  • Joined: Sun Dec 30, 2018 5:36 pm
  • Real Name: Saad Shah

Re: Tracking players in sport and showing their running line

PostSun Jul 07, 2019 4:39 pm

Hey Mike
Great idea to use Fusion for this. I have no experience with the planar tracker, but I just wanted to say good work!
Hope someone responds and offers improvements. I would love to learn this too!
Saad
Youtube Channel: Gargoyles At Work
Offline

Hendrik Proosa

  • Posts: 3029
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Tracking players in sport and showing their running line

PostSun Jul 07, 2019 6:50 pm

In theory you never want to double-resample the footage by first stabilizing it and then reapplying motion, it will introduce softness. Instead you should transform the lines and merge with original footage. Keying does not need tracking unless you use additional roto shapes.

How this is applicable in Fu more experienced users can hopefully describe, I'm not an everyday Fu user.
I do stuff.
Offline

Sander de Regt

  • Posts: 3562
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Tracking players in sport and showing their running line

PostSun Jul 07, 2019 8:35 pm

In theory you never want to double-resample the footage by first stabilizing it and then reapplying motion, it will introduce softness.

This is partly true in Fusion.

Fusion does concatenation, which means that it applies a chain of transforms just once, if you don't change the pixels inbetween (i.e. with blurs or color or whatever)

So if you stabilize a shot inside a tracker, then merge footage on top of it and then destabilize again with an inverse transform, no additional sampling will happen.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Hendrik Proosa

  • Posts: 3029
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Tracking players in sport and showing their running line

PostSun Jul 07, 2019 9:05 pm

And this is because merge being transform aware too? It only cocatenates the transform from background pipe I guess? How exactly does downstream transform (after merge) get passed upstream to properly transform the fg? I can't wrap my head around how merge is able to not break concatenation in an acyclic graph.
I do stuff.
Offline

Sander de Regt

  • Posts: 3562
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Tracking players in sport and showing their running line

PostMon Jul 08, 2019 8:05 am

I have no idea how it works, I only know that it does work. Since this comes up every once in a while I should do a tutorial on it, someday.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

MikeHicks

  • Posts: 3
  • Joined: Fri Aug 24, 2018 9:28 pm
  • Real Name: Michael Hicks

Re: Tracking players in sport and showing their running line

PostMon Jul 08, 2019 8:44 pm

Cheers guys,
I guess that answers question one that my method is sensible as long I don't apply certain effects between the stabilisation and following inversion... :D

Does anyone have any ideas on part two, if it's possible to use a tracker to draw a line?
As stated, I've managed to get images and particle emitters to follow the tracker by modifying the centre with the tracker position but can't use that method for a paint node.

Any ideas are appreciated,
Cheers,
Mike
Offline

Sander de Regt

  • Posts: 3562
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Tracking players in sport and showing their running line

PostTue Jul 09, 2019 7:25 am

It is possible to do this, but it's not a perfect solution.
You can create a polystroke inside your paint tool and then connect that to the tracked path.
In theory you should be able to connect the displacement along the path to drive the write on end from you polyline stroke, but for some reason I still haven't figured out, this results in small anomalies.
Maybe it won't affect your result too much, but it isn't a 100% perfect solution.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

MikeHicks

  • Posts: 3
  • Joined: Fri Aug 24, 2018 9:28 pm
  • Real Name: Michael Hicks

Re: Tracking players in sport and showing their running line

PostSat Jul 13, 2019 12:03 pm

Sander de Regt wrote:It is possible to do this, but it's not a perfect solution.
You can create a polystroke inside your paint tool and then connect that to the tracked path.
In theory you should be able to connect the displacement along the path to drive the write on end from you polyline stroke, but for some reason I still haven't figured out, this results in small anomalies.
Maybe it won't affect your result too much, but it isn't a 100% perfect solution.

Thanks Sander,

Linking displacement of the tracker to the write on of the polyline has the effect of drawing the line with the player's motion, effectively creating a trail on the ground behind them which looks good.

I'm currently doing this by creating a separate polyline inside the paintnode by hand. Is this what you meant or is there a way you know of to copy the polyline from the tracker so it's more accurate? If I try and copy and paste, Resolve throws an error saying "Different Destination Points Count" presumably as the paths are of different lengths.

Thanks again for your help,

Mike.
Offline

keithbjohnson

  • Posts: 6
  • Joined: Fri Aug 08, 2014 9:07 pm

Re: Tracking players in sport and showing their running line

PostWed Mar 10, 2021 4:31 pm

Here is a recipe for using tracking data to draw a line onscreen.

There are two main ideas here:
A) How to create a polyline in the Paint node with a Path from the Tracker
B) How to create the timing by controling the Write On of the paint node's polyline.

I apologize in advance if I skip a bit.. I'm jotting this down just as I have figured it out myself and have to get on with the day! I'm also not familiar with how to paste in images in the forum yet...

A)
1) Do your tracking of a point..
2) In the tracker node go to the Modifiers Tab. You should see a line for Tracker1Tracker1Path. If it is not expanded double click it to expand it.

At the bottom is "Right-click here for shape animation" which offers "Publish". This will add a line to the modifiers section "Tracker1Tracker1Path:PolyLine" and make it available for other nodes to Connect To.

3) go to your Paint Node.
Put the paint node into PolylineStroke mode by pressing the sinewave like icon fourth from the left in the viewer window. This will create a line in the Modifiers tab for PolylineStroke.

Open up the "Stroke Controls" section at the bottom. At the bottom of this is another "Right-click here for shape animation".
Choose Connect To/Tracker1Tracker1Path:Polyline/Value. This will add a Modifier to the list called "Tracker1Tracker1Path:PolyLine"

B) Now we are ready to control the timing of the Write On of the stroke.

1) In the PaintNode/Modifiers open the section for PolylineStroke1 (not the Tracker1Tracker1Path:PolyLine)
Open the Stroke Controls section to see the Write On control.

2) Right click next to the words "Write On". Choose "Connect To/Tracker1Tracker1Path/Displacement"

Now the line should draw on, following the tracked path.

C) Bonus tip: Tracker paths tend to be pretty squiggly. I imagine there are clever ways to smooth them that I have yet to learn. One way of hiding the wiggles is to use a dotted line...

In Paint node/Modifiers/Brush Controls/Size.. turn it way down.. like 0.004.
In the Stroke Controls section, increase the spacing. You'll start to see dots.
The slider only goes to 1, but you can type in higher numbers for larger spacing.

The dotted line tends to hide the high frequency wiggles of the tracker path.

Hope this helps someone get started with this technique!
iMac Pro Mojave 10.14.6, Resolve 17.1
Offline

birdseye

  • Posts: 357
  • Joined: Fri Jun 12, 2020 2:36 pm
  • Real Name: Iain Fisher

Re: Tracking players in sport and showing their running line

PostThu Mar 11, 2021 11:37 am

You might (or might not) be able to lessen the wiggles by tracking every fourth or fifth or tenth frame, I doubt something like this would need the accuracy of every frame.

Return to Fusion

Who is online

Users browsing this forum: Google [Bot] and 33 guests