# Action Motion vectors rendering and using

**URL:** <https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286>\
**Category:** Flame Questions\
**Created:** [February 1, 2021, 5:26pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286 "2021-02-01T17:26:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnt/32/14040_2.png) [@johnt](https://forum.logik.tv/u/johnt)\
**Post date:** [February 1, 2021, 5:26pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/1 "2021-02-01T17:26:12Z")

</div>

Has anyone successfully found a way to render motion vectors to use to stabilise and track? When I’ve done it the results are different to the ones inside action. All 32bit.

This makes it a nightmare for me to close a batch and come back to it at a later date because I have to wait ages for the caching again.

All advice welcome.

---

<div class="post-metadata">

**Author:** ![kirk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/kirk/32/151_2.png) [@kirk](https://forum.logik.tv/u/kirk)\
**Post date:** [February 1, 2021, 5:52pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/2 "2021-02-01T17:52:23Z")

</div>

Is this what you’re looking for?

https://player.vimeo.com/video/311553920

An @andymilkis video of a John @Ashby technique, sent to me by Todd @Gut Gutridge! Team effort!

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [February 1, 2021, 6:10pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/3 "2021-02-01T18:10:48Z")

</div>

Hey @johnt  
If you are happy with the results I have been rendering out a UV pass from action and using this rather than using the motion vectors.  
Motion vectors are a bit of a “land mine” in setups so I have been asking artists to not have them live in the setup. Rather they pipe out a precomp or use a UV map

---

<div class="post-metadata">

**Author:** ![johnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnt/32/14040_2.png) [@johnt](https://forum.logik.tv/u/johnt)\
**Post date:** [February 1, 2021, 6:15pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/4 "2021-02-01T18:15:17Z")

</div>

I’ve just got it to work. It was the 32bit button that was the secret. And in the action applying switch to forward motion vectors. Hoorah. Mrs Miggins Pie Shoppe here we come.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/c/c53ec16f41ffcedee03605841d65480f42c1925e.jpeg) ![image](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/f/f8adc6e38bab2e6094bc2f935e6cff02219a8919.jpeg)

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [February 1, 2021, 6:21pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/5 "2021-02-01T18:21:21Z")

</div>

The motion vectors still require some calculations and a cache no @johnt ?

---

<div class="post-metadata">

**Author:** ![johnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnt/32/14040_2.png) [@johnt](https://forum.logik.tv/u/johnt)\
**Post date:** [February 1, 2021, 6:25pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/6 "2021-02-01T18:25:15Z")

</div>

Not sure it does.

However _ **warning** _

The track is off by a pixel here and there. For accuracy, probably better to stick with UVs.

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [February 1, 2021, 6:29pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/7 "2021-02-01T18:29:51Z")

</div>

I know I shouldn’t do this @johnt but in its first iteration, 2019 I think, it burnt me by subtlety changing the motion vectors calculation each time.  
I now hold a grudge and treat it with caution.

Don’t get me wrong I still think it is amazing but I just can’t stand the re-caching it can do a couple of days later when you are all the way down the other end of the setup.

---

<div class="post-metadata">

**Author:** ![johnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnt/32/14040_2.png) [@johnt](https://forum.logik.tv/u/johnt)\
**Post date:** [February 1, 2021, 6:44pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/8 "2021-02-01T18:44:09Z")

</div>

Yep. Had the same. But they are great. When they work.

---

<div class="post-metadata">

**Author:** ![zorrofx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/zorrofx/32/949_2.png) [@zorrofx](https://forum.logik.tv/u/zorrofx)\
**Post date:** [February 1, 2021, 8:03pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/9 "2021-02-01T20:03:01Z")

</div>

Go @gut !

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [April 3, 2021, 2:16am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/10 "2021-04-03T02:16:24Z")

</div>

Are you guys SURE this is working? I cant get pre rendered Motion Vectors to work on 2021.2.

Ugh.

---

<div class="post-metadata">

**Author:** ![andymilkis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/andymilkis/32/11067_2.png) [@andymilkis](https://forum.logik.tv/u/andymilkis)\
**Post date:** [April 3, 2021, 2:17am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/11 "2021-04-03T02:17:58Z")

</div>

Pre rendered how? Like from an analysis node upstream in batch or a UV pass out of an upstream action?

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [April 3, 2021, 2:21am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/12 "2021-04-03T02:21:13Z")

</div>

I have dozens of stills that need to be Motion Vectored… pre-rendered UVs aren’t an option with these frame ranges.

---

<div class="post-metadata">

**Author:** ![andymilkis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/andymilkis/32/11067_2.png) [@andymilkis](https://forum.logik.tv/u/andymilkis)\
**Post date:** [April 3, 2021, 2:27am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/13 "2021-04-03T02:27:17Z")

</div>

So, upstream motion analysis mode. You’ve set the mode in action to forward/backward? It still has to do come calculating but it should be faster than caching the MVs in action.

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [April 3, 2021, 2:40am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/14 "2021-04-03T02:40:25Z")

</div>

That what it is. Its like a bad gps…

“Recalculating…”

Argh. why does it need to recache a prerendered thing? I think I know why but I will have to care and understand a different time. 🙂

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [April 3, 2021, 3:16am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/15 "2021-04-03T03:16:03Z")

</div>

it was my understanding that even with the motion vectors it still needed to do some caculations under the hood. Hence my love of locking it off and rendering UV maps

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [April 3, 2021, 3:17am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/16 "2021-04-03T03:17:07Z")

</div>

totally. I just have too many frames and too many passes to prerender UVs.

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [April 3, 2021, 3:21am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/17 "2021-04-03T03:21:11Z")

</div>

Arrgh! I bet @MikeV has a python script that does all of this cache rendering for you.

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [April 3, 2021, 3:42am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/18 "2021-04-03T03:42:03Z")

</div>

Or it is in here:  
/opt/Autodesk/flame\_2020.3.1/python\_examples/cache\_motion\_vectors.py

_UPDATE_  
Actually no:

```
This script adds a Create Motion Vectors Maps to a Clip node located in the
Batch Schematic.
An Action node is connected to the clip and the Motion Vectors map is
created and cached.

The same can be done from the Desktop object in the Media Panel.
This version opens a Qt file dialog allowing you to select a clip.
A new Batch Group is created for the clip & the same recipe as the Batch version
above is applied.
```

---

<div class="post-metadata">

**Author:** ![cnoellert](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/cnoellert/32/559_2.png) [@cnoellert](https://forum.logik.tv/u/cnoellert)\
**Post date:** [April 3, 2021, 4:28am UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/19 "2021-04-03T04:28:11Z")

</div>

Unless I misunderstand what’s going on, even if you pre-render the motion vectors the second you set a reference frame to track from, the box is running a legit pixel sim, where the output of every pixel on each frame is pushed along along the vector at the magnitude of it’s corresponding motion vector from from the current frame. At the end, the previous output is looped through again until its complete. There’s no pre-rendering that process… it’s the Touring problem—it’s done when it’s done.

Sorry if I’m explaining something you already know…

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [April 3, 2021, 9:26pm UTC](https://forum.logik.tv/t/action-motion-vectors-rendering-and-using/2286/20 "2021-04-03T21:26:54Z")

</div>

Yup. That makes sense. I wish it happened in the background. It’s easy to forget all the wizardly math happening under the hood when your shot is forever long with all the patches.
