Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
Adds an optical flow camera that computes pixel velocity through a material/HLSL code. Inspired by carla-simulator/carla#4104, and the discussion at https://github.com/EpicGames/UnrealEngine/pull/6933 (thanks to @finger563 for the discussion and useful code!)
This PR does not make use of UE's native velocity buffer due to issues in its calculation of motion vectors (see https://github.com/EpicGames/UnrealEngine/pull/6933), and hence, can only compute optical flow based on camera motion and not dynamic objects. This is meant as an intermediate step while UE fixes the issues with velocity buffer (more discussion at https://github.com/florian-world/VelocityUE4).
The flow data is exposed in two ways, through two new 'cameras':
How Has This Been Tested?
The two new cameras can be targeted through their ids 8 and 9; and can be visualized either through subwindows or through the normal Python image request API.
Pending accuracy tests of per-pixel flow.
Screenshots (if appropriate):
opticalflow.mp4