# optical flow as unreal post process material?

**URL:** <https://forums.unrealengine.com/t/optical-flow-as-unreal-post-process-material/1985850>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [August 21, 2024, 10:18am UTC](https://forums.unrealengine.com/t/optical-flow-as-unreal-post-process-material/1985850 "2024-08-21T10:18:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![data\_morphana](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@data\_morphana](https://forums.unrealengine.com/u/data_morphana)\
**Post date:** [August 21, 2024, 10:18am UTC](https://forums.unrealengine.com/t/optical-flow-as-unreal-post-process-material/1985850/1 "2024-08-21T10:18:56Z")

</div>

is it possible to recreate some thing like optical flow with post process materials?

> **[Optical Flow](https://de.mathworks.com/discovery/optical-flow.html)**
>
> Learn about optical flow for motion estimation in video with MATLAB and Simulink. Resources include examples, source code and technical documentation.

I’m not looking necessary for mathematical correct implantation of the optical flow algorithm.

Im new to post processing materials and would be already happy if i could compare the scene texture with the previous frame and draw an effect locally where pixels have changed. I couldn’t find anything online so im happy for every hint!

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [August 21, 2024, 2:29pm UTC](https://forums.unrealengine.com/t/optical-flow-as-unreal-post-process-material/1985850/2 "2024-08-21T14:29:23Z")

</div>

> [@Computing dense optical flow with scene capture component 2D](https://forums.unrealengine.com/t/computing-dense-optical-flow-with-scene-capture-component-2d/1691312/12):
>
> Hm, that makes me think a UV is centered on (0,0) that needs to be centered on (0.5,0.5) or something along those lines. Just did a real quick mockup [OpticalFlow] [image] I think this is right? Maybe not exact for your case but maybe it’ll help… Saturation node is just there to make the color more obvious. Texture sample is the flow field gradient.

This thread has an attempt. It was using motion vectors which can be directly sampled by the post process materials.
