Mocha OFX 2020 / Distort Map for Autodesk Flame

Hello there,
We’ve just installed the Mocha OFX Plugin 2020 for Autodesk Flame 2020.3 (Linux).
After a test run to create distortion maps from a lens grid, the results aren’t satisfying.
Mocha does export EXRs for distort and undistort. But when using them with the UVWarp32 node inside flame, I can’t recreate the exact same distortion from the original plate.

Are there any documentations/tutorials about the roundtrip of that for flame?

Thanks in advance.



Hi Christopher,
There is no official documentation on the lens workflow specific to Flame users. In this older webinar, Flame artist Joel Osis covered his Lens Calibration workflow:

If you jump to 1:02:00, you can skip to his Lens section.

If you are still having issues, it would be good to get your Mocha and Flame project so we could investigate on our end.


Hi Ross,
First of all: Thanks for your quick response and the link.

Unfortunately Joel doesn’t cover the Redistort-Workflow.

Attached you’ll find a wetransfer link to flame archive with a batch, showing the difference of Mocha’s ST Maps and Nuke’s ST Maps. The Nuke ones works fine.
Flame Version is 2020.3

Maybe you’ll have a solution for that.
Will be deleted within 7 days.


Hi Ross,

so a guy in my team just told me, that there is a bug in mocha with anamorphic footage.
Therefore I did another test with a spheric lens grid.
But still: I can’t recreate the original distortion with Mocha’s ST-Maps.

Here’s another wetransfer-link to a flame archive for the second test. This time with the mocha-plugin embedded.
Flame 2020.3, Mocha 2020 OFX

Please have a look.


Hi Chris,
I just wanted to update that we are looking at the issue and will be sure to get back to you when there is something to report.
Thanks for sharing the footage.

1 Like

Hi Chris,

I spent some time looking into this, and there’s no really simple way to do it at the moment. The UVWarp32 Matchbox shader can’t handle Mocha’s STMaps, because they contain coordinates outside of the image area, that is below 0.0 and above 1.0. As you’ve seen, undistorting is fine but distorting won’t work.

I was able to use Action’s UV mapping workflow instead but it requires a more complex setup. To do this, export the distortion map from Mocha at the normal footage resolution, then set up your surface in Action for UV mapping. You need to adjust the surface corners to compensate by either moving the UV positions into the correct range or pushing the vertices out to match the UV map.

In your shot, the footage was 1920x1080 and the undistorted footage was 1954x1100. The adjustment at each corner will be half the difference between those two sizes:

Assuming you move UV coordinates in:

Lower left: x+17, y+10
Upper left: x+17, y-10
Upper right: x-17, y-10
Lower right: x-17, y+10

For some reason I had to toggle between bilinear and extended bicubic surface types to see a correct result, not sure why. If you use the difference compare mode in Action you can see the grid converge, but because of the resampling, some fractional adjustments to the UV positions might give a small improvement.

It’s worth mentioning that you will not see a completely black difference key with an undistort->distort process, due to the repeated resampling. I ended up with a feint pattern of thin grid lines, and if you A/B the original with the redistorted plate, the softening is visible.

I switched to 32-bit TIFF for my tests as it is more precise than EXR. You probably wouldn’t notice the difference normally, but you can see more errors with the grid and difference matte.

As this is a bit convoluted I have written a Matchbox shader which understands Mocha’s STMaps, once that’s gone through QA internally we’ll publish it as a free download.

Best regards,



Hi JP,

thanks for investigating!
Looking forward to that matchbox shader :slight_smile: