Realtime Compositor: Implement Movie Distortion node #108230

Merged
Omar Emara merged 3 commits from OmarEmaraDev/blender:compositor-movie-distortion into main 2023-06-07 14:45:53 +02:00

3 Commits

Author SHA1 Message Date
Omar Emara 42a0070f58 Address review 2023-06-06 17:40:52 +03:00
Omar Emara 22baf1e836 Merge branch 'main' into compositor-movie-distortion 2023-06-06 15:45:30 +03:00
Omar Emara 0d390140eb Realtime Compositor: Implement Movie Distortion node
This patch implements the Movie Distortion node for the realtime
compositor. The distorted coordinates are computed and cached for a
particular tracking camera distortion parameters. So for expensive
distortion models, the first run will take some time to compute, but
subsequent runs will be fast.

An alternative implementation would be to implement each of the
distortion modes in the shader, but that was decided against for a few
reasons:

1. We want to hide the implementation details of the distortion models,
   since it is provided through an external library (Libmv).
2. Some distortion models are expensive to solve accurately, and can be
   quite slow to solve each time the shader runs.
3. The typical usage of the node does not involve interactive editing of
   the distortion parameters, rather, the parameters are computed during
   camera calibration, so caching seems most fitting in that case.
2023-05-24 15:46:24 +03:00