LS_UVewa strange result

Hi all.
I love and use LS matchboxes a lot and just found out an unexpected result using LS_UVewa.
I guess it’s a filtering issue and I cannot fix it.
I create a UV map and use Distort node to deform it.
Then I use LS_UVewa to apply that to my rush. (not a disco / undisto thing).
Today, I got very jaggy edges with that method. If I use the exact same distorted UV map in Action to apply the deformation, it gives me nice and smooth result as expected.

I create my UV in 16 bits with a color source and a 4 points gradient but it’s the exact same issue if I create it in 32 bits as the Distort node works in 16 bits.

Even more unexpected, if I use the untouched UV map to my rush with LS_UVewa, I already very bad edges even if the UV is completely clean (If I create a 32bit UV, it works well this time)…
Any idea?
@lewis if you have a clue?

Thx all.

Philippe

1 Like

Hi!! I think if you have a 16bit UV map then Ls_UVewa won’t be able to do much to fix the jagged edges - the only time it can really work well with 16bit maps is if you convert them to offset maps in Nuke like the tooltip explains, but that won’t help for something that’s been through Distort so was never 32bit in the first place…

The reason Action does a better job with a 16bit map is that one of the brain geniuses at Autodesk wrote some very clever code that upsamples them to 32bit in a way that restores a lot of the smoothness - it’s kind of miraculous that it can do that because normally 16bit UV maps are a disaster in any app. I don’t think it’s available for use in Matchboxes though sadly :crying_cat_face:

If the warp is fairly smooth you could try converting the map to 32bit after it’s gone through Distort, then blurring it a couple pixels… but otherwise I think using Action is the best you can really do :cat:

4 Likes

Thx @lewis for your answer. It’s quick and crystal clear as usual. So sad Distort node hasn’t been updated for years. I still use it a lot as it is a super nice tool… Doing the same with extended bicubic is very often really painful…
Thank you again. Take care.

1 Like

No prob - I did just have a thought about how you might be able to get more precise maps through Distort but I’m not near a Flame right now… if someone fancies a go something like this might be worth a try:

  • Have one Distort node with a 16bit map going through it like above, but the map is posterized to 16 levels, so there’s only 16 steps in the gradients along X and Y instead of them being smooth
  • Copy the Distort and put a different UV gradient through it, one which is smooth but tiled 16x in X and Y so it gives you 16bits worth of info about the warp, but mapped over only 1/16th of the resolution instead of the full image
  • Convert both to 32bit
  • Take the second map, multiply it down to 1/16th brightness and add it to map from the first step
  • Profit!?

In my brain this would work but I may be forgetting something…

I’ll try that and let you know. For you to know, if after the UV distort, I promote it to 32bits and blur it a little (with a matchbox as I think blur node is 16bits as well no? it doesn’t really help in the UVewa matchbox, can’t get rid of the jagged edges…

But I’ll try to understand your idea and test it maybe today… thx.

You should give the deform mesh a try. It works in action at 32-bit and is well suited to the kinds of tasks for which you might use distort over extended bicubics.

OK, so I understand the idea behind that and it is quite interesting. But unless I didn’t do it right, which is a very possible option, it doesn’t work as expected.

Nice try though. I’ll keep exploring that path… Thx again