# Getting pixel occlusion map

**URL:** <https://forums.unrealengine.com/t/getting-pixel-occlusion-map/483654>\
**Category:** World Creation\
**Tags:** occlusion, unreal-engine, pixel, Physics, velocity, question\
**Created:** [May 20, 2021, 10:52am UTC](https://forums.unrealengine.com/t/getting-pixel-occlusion-map/483654 "2021-05-20T10:52:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a7883a09](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a7883a09](https://forums.unrealengine.com/u/anonymous_user_a7883a09)\
**Post date:** [May 20, 2021, 10:52am UTC](https://forums.unrealengine.com/t/getting-pixel-occlusion-map/483654/1 "2021-05-20T10:52:44Z")

</div>

I’m experimenting with using UE4 for generation video frames together with accurate optical flow.

There’re serious problems with Velocity material out of the box, but after applying [https://github.com/EpicGames/UnrealEngine/pull/6933](https://github.com/EpicGames/UnrealEngine/pull/6933) I now get absolutely correct motion vectors, textures warp perfectly from one frame to another.

The only remaining problem is occlusions. Obviously, if previously unseen point of object got projected to a frame, velocity vector of corresponding pixel is of no use and should be ignored. Thus, I need to generate a binary mask to detect such pixels.

Any ideas how to implement that?

[This is a cross-post of [Getting pixel occlusion map](https://forums.unrealengine.com/t/getting-pixel-occlusion-map/230200), hope it’s ok]
