# UVwarp 32 | Lossless lens-distortion

**URL:** <https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823>\
**Category:** Flame Questions\
**Tags:** uv, lesn-distortion\
**Created:** [September 16, 2021, 3:37pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823 "2021-09-16T15:37:58Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedrosantos](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Pedrosantos](https://forum.logik.tv/u/Pedrosantos)\
**Post date:** [September 16, 2021, 3:37pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/1 "2021-09-16T15:37:58Z")

</div>

Hi Guys,

My image is losing a lot of details once Undistort my plates using UVwrap32. I created the UV in Nuke 32 bits. Actually I’ve been using this workflow for a long time but I’ve never felt this weird loss of detail. Maybe it has always happened and I realised it just now. I am working on 6K images now.

I find Lens distortion a pain in the ass. Is there any lossless lens-distortion workflow around the market that can help me??

Thank you guys and have a nice week ahead,

---

<div class="post-metadata">

**Author:** ![johnt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnt/32/14040_2.png) [@johnt](https://forum.logik.tv/u/johnt)\
**Post date:** [September 16, 2021, 4:24pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/2 "2021-09-16T16:24:46Z")

</div>

At the moment, I could be wrong, but I think you’re always going get some softening from the undistort round trip. That said, I have found action to get slightly better results than the matchbox. Also Nuke, as you probably my know, has different filters that might get a different result that works better. And doing resizes in log can avoid those horrible little negative pixels that get introduced by certain filters.

Also check this out. If it’s the @cnoellert setup I’m thinking of it’s pretty foolproof.

> [@Creating Lens Distort Presets](https://forum.logik.tv/t/creating-lens-distort-presets/1325/19):
>
> Hey All, [cnoellert](https://forum.logik.tv/u/cnoellert) Christopher Noellert sent me this archive, that has a little more instructions on the workflow! It’s a huge help! and works with ST maps too! Flame2022 only at the moment, sorry, it’s all. I have.

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [September 16, 2021, 4:28pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/3 "2021-09-16T16:28:32Z")

</div>

Undistorting a plate and then redistorting has and will likely continue to always add softening. Try to distort the CG instead of undistort the live action.

---

<div class="post-metadata">

**Author:** ![Pedrosantos](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Pedrosantos](https://forum.logik.tv/u/Pedrosantos)\
**Post date:** [September 16, 2021, 6:54pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/4 "2021-09-16T18:54:34Z")

</div>

Thank you Randy…

---

<div class="post-metadata">

**Author:** ![Pedrosantos](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@Pedrosantos](https://forum.logik.tv/u/Pedrosantos)\
**Post date:** [September 16, 2021, 7:52pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/5 "2021-09-16T19:52:33Z")

</div>

Cool John. Thank you man. Got your archive here.

---

<div class="post-metadata">

**Author:** ![finnjaeger](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@finnjaeger](https://forum.logik.tv/u/finnjaeger)\
**Post date:** [September 19, 2021, 1:01pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/6 "2021-09-19T13:01:33Z")

</div>

yes every filter hit is “bad”.

The correct way to work with lensdistortion is to keep the original plate and instead of undistorting, adding distortion to all elements/cgrender instead - this is however a more cumbersome way.

I have made some pipeline tools that would distort 3D renders right after they have been rendered on the farm to simplify this workflow a bit (using nuke and UVmaps).

but yea, thats the way I would go but then chances are you dont have time and renderpower for X amount if lensdistortion nodes all over the place for all the elements and actions and stuff, even in nuke this is pretty confusing.

A little hack/workaround goes the following:

-undistort/denoise plate  
-do your work  
-redistort/renoise

- difference original plate over comp result

- use difference result(use histogram or somethint to greate a nice matte) as a matte to merge comp over original plate. Or if you keep it in mind getting a clean matte for all the things you have changed/added should be possible, just keep a second matte pipe around where you just keep  
merging all the alphas.

- now most of the image should be original plate only the elements you changed will have a filter hit, so most likely stuff you have added like 3D renders so that doesnt really matter(as we usually have to blur the cg renders anyhow to fit the blurry lenses…).

does that make sense , I hope it does 🙂 I had to really become good at not touching the plate where I wasnt supposed to due to clients rejecting stuff with filter hits…

---

<div class="post-metadata">

**Author:** ![justinbromley](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@justinbromley](https://forum.logik.tv/u/justinbromley)\
**Post date:** [September 21, 2021, 1:02am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/7 "2021-09-21T01:02:05Z")

</div>

If you happen to be using 3d Equalizer for tracking, then it can export a matchbox shader for flame that handles the un-distort, re-distort as nodes. Still will have some softening… but very little. It’s by far the best workflow I’ve used in Flame for this. UV’s and StMaps are a pain in the ass, I agree.

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [September 21, 2021, 1:46am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/8 "2021-09-21T01:46:23Z")

</div>

I am still waiting for someone to give me one of these.

Hope you and the family are well @justinbromley

---

<div class="post-metadata">

**Author:** ![justinbromley](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@justinbromley](https://forum.logik.tv/u/justinbromley)\
**Post date:** [September 21, 2021, 2:14am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/9 "2021-09-21T02:14:10Z")

</div>

@PlaceYourBetts yep all good thanks. You allowed to get a take away coffee yet?

---

<div class="post-metadata">

**Author:** ![PlaceYourBetts](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/placeyourbetts/32/6852_2.png) [@PlaceYourBetts](https://forum.logik.tv/u/PlaceYourBetts)\
**Post date:** [September 21, 2021, 2:16am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/10 "2021-09-21T02:16:41Z")

</div>

Midnight tonight 😉

---

<div class="post-metadata">

**Author:** ![kyleobley](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kyleobley](https://forum.logik.tv/u/kyleobley)\
**Post date:** [September 21, 2021, 4:50am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/11 "2021-09-21T04:50:07Z")

</div>

Just a FYI for anyone who has never used it, you need to load the batch setup, not just the matchbox. The batch setup will include the nodes to pad the image along with the correct values for the distortion/un-distortion node. Made that mistake before and was wondering why nothing was working.

Makes total sense in retrospect but I thought I’d share to save anyone else that moment of confusion.

---

<div class="post-metadata">

**Author:** ![justinbromley](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@justinbromley](https://forum.logik.tv/u/justinbromley)\
**Post date:** [September 21, 2021, 5:08am UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/12 "2021-09-21T05:08:01Z")

</div>

Yes it does require the inevitable 3 rounds of trial and error with the 3d tracking artist. Also can fuck with your brain if the plates used for tracking are not the same (as in aspect ratio) as the plates you grabbed into your system… ah the joys…

But once working… it’s a good thing.

---

<div class="post-metadata">

**Author:** ![john-geehreng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/john-geehreng/32/7195_2.png) [@john-geehreng](https://forum.logik.tv/u/john-geehreng)\
**Post date:** [October 5, 2021, 7:31pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/13 "2021-10-05T19:31:08Z")

</div>

That sounds like a great workflow. I’m going to need a bunch of camera tracks over the next few weeks, and I’ve asked my vendor if they could supply a matchbox shader & batch setup, but they had no idea what I was talking about. Where can I find more info on this or is there a button or plugin I can point them to?  
Thanks!

---

<div class="post-metadata">

**Author:** ![john-geehreng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/john-geehreng/32/7195_2.png) [@john-geehreng](https://forum.logik.tv/u/john-geehreng)\
**Post date:** [October 5, 2021, 7:56pm UTC](https://forum.logik.tv/t/uvwarp-32-lossless-lens-distortion/3823/14 "2021-10-05T19:56:02Z")

</div>

Nevermind. Found it here:

[![](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/8/89e4c4c5ae625b85e5b7891941777e119f20f2e7.jpeg "3DEqualizer4 [featurette] - Release 6 beta 1: What's New") ](https://www.youtube.com/watch?v=AE3brvQ-fGU)
