đź”´ Matching anamorphic lenses defocus RIGHT? đź”´

I’ve been on a recent job where everything was shot on the popular Caldwell Chameleon Anamorphic 1.79x lenses.

When it comes to compositing new layers into the scene, I’ve always struggled to find nodes or tools that could help me match the specific type of distortion and especially, the bokeh and kernel.

Obviously, there is the normal distortion factor that all lenses have which was dealt with ST-Maps to properly undistort all shots before any work was done. The aspect ratio of the kernel was also adjusted on any blur node I used so it matched the 1.79 squeeze factor…But on these anamorphic lenses, there seems to be additional factors that I can list below which I can’t get my head around if I want to get 100% same results.

  1. Shape of my bokeh & kernel. As I said, the oval shape of the bokeh isn’t too much of an issue, as the aspect ratio can be adjusted. The main problem I get comes when matching the specific sharpness of the bokeh. With these lenses, there is not only a double (sometimes triple edge) coming off but it’s also presenting a sharp edge that no node can seem to give me?
    The classic blur node can definitely provide a graph so I can adjust the density of my kernel, but I feel it’s too limited. I tried playing with the blooming and so on, but it’s just not good enough.

I also did some tests with one of my favourite blur nodes (y_lens_blur matchbox) as it also has interesting features where you can adjust the samples, aspect, aperture, etc but it’s still not taking me near the my source reference.

  1. Generic radial distortion. A type of radial distortion seem to also occur on these anamorphic lenses as the picture gets closer to the edges (see image above). I’ve tried the blur node set to radial too but because this node does not allow gradual dispersion of the pixels with a matte as y_blur does… I thought it was not worth using.

  2. Squeeze near the edges (see image above). Furthermore, there is third and additional noticeable squeeze happening on the closest part of the edges of the frame. My first thought was… “ok I’ll use an elipse gmask and I will feed this into a distort node so I can replicate this phenomenon” but again… didn’t get too happy with the results.

4. Lens breathing. I’ve heard people saying that Syntheyes or 3DEqualizer can solve this problem although I’m not quite sure how this would work on a shot where the focus pull and breathing happens at a completely random moment. Without implementing a script that could cleverly make these 3rd party softwres communicate with Flame in si-tu and understand when this is happening I don’t see a way of compensating this breathing effect other than matching all this manually.

HERE IS THE QUESTION:

Do you guys have an specific setup or workflow to deal with this that you think could be shared with the community? I know Nuke has brilliant nodes to sort this out where you can even feed the nodes with a bespoke Kernel shape and so on… but I do feel we should have a more powerful node that can cope with these more complex lenes and not just spherical ones.

Any advice on this matter would be massively appreciated.

3 Likes

(sees that 62 people have looked at this and not replied)

…No.

but here’s my thinking on the matter:

Before I get into it, don’t get lost in the weeds. No defocus solution is going to perfectly match and we’re not saving lives here. Which is to say this is all gonna be a bit sloppy so it’s not worth your time to worry too much about any one thing. It should all look enough like the BG to fly. Mileage, like clients, may vary.

Step 1 - Undistort the barrel warping on the edges so the plate bokehs are all vertical ovals. Do this either with a Lens Distort if you can, or some other invertable node (Action UVs and Bicubics will do this)

Step 2 - use a basic blur node, pick the “circle ring outline” preset and noodle that a bit so the ring is less prominent, and scale the x and y to match the size.

Step 3 - Do the cats eyes by using two bicubics set to min and warping one to cut out the edges of the other. Two different lens distorts would do that as well, or even just a scale.

Step 4 - apply the barrel warp back over.

So my stack would be:

Anti-Barrel Warp > Bokeh > Cat Eye Min > Barrel Warp

3 Likes

…or we could ask Directors and DPs to stop using those awful lenses. As a viewer i hate the dreadful greasy smear look over the top and bottom edge of every other shot in a show. And i’m sick of people asking me why the shows all look like they’re out of focus.
Its not stylistic or arty, it just looks like a badly shot image!

sorry i can’t help with your issue as i have never had to deal with an anamorphic at work.

1 Like

Maybe @Maurypb will have something for you… Check below this thread…

2 Likes

Is this the general idea?

4 Likes

A little progress on the shader - the way the lens “snoot” kinda cuts off the bokeh towards the edges, making tiny football shapes.



5 Likes

Hey Maurypb.

Oh wow! That’s indeed a very interesting super similar result if you were to compare it with the Caldwell Chameleon lenses.

May I ask… is this the matchbox you said you’re developing? All those results are super interesting but the first image you shared is damn good.

The distortion on the individual bokehs are almost a replica. Massive kudos to your work.

Have you considered launching a Patreon for this matchbox development?

1 Like

It’s very annoying indeed. Totally subjective and purely a nostalgia trigger decision from Directors and DOPs. LOL

1 Like

Hey Andy.

I know sometimes it might not be worth the effort but it kinda becomes a challenge upon perfection that might come from my desire of simply getting a bit better each time. Or it might be another pointless nerdy solution that only myself and no clients will ever notice LOL.

Your manual input sounds interesting… will definitely give a try to this method although I will still have to come up with something that gets those sharp-on-the-bokeh-edges fx.

Thanks for your kind contribution and time to answer. Much appreciated.

Apologies for the late reply.

I do model every single lens on the camera test day taking in consideration the focal lengths range by doing some slices at various lengthts, and then, in case of zooms, various focal distances. This takes quite a bit of time but it is critical.

In Equalizer and build the lens profile which allows me in 3D and comp, to match what the lens does, including breathings but of course, the bokeh signature will need some manually but all camera lens moves will match.

We don’t use STMaps as it brings sequences of images and I rather have a true procedural approach so we use LDPK plugin in Nuke, in any case, generating the STMaps will yield the same results.

I hope that makes sense.

you say nostalgia, but that suggests they’re after a look from times past yet i don’t recall ever watching stuff as obviously badly smeared and weirdly focussed as is the current trend. I think sits more likely Emperors New Clothes…ie. newish and a bit different so everyone has to copy regardless of how silly it looks.

Thanks for the encouragement.

Yeah, that’s one of the shaders I’m working on, on-and-off as time permits. It’s mainly for my own use, but I’ll likely release it when I get a few issues ironed out. I’m pleased to say it’s very fast - realtime on uhd on a 4090. It’s part of a “multiblur” shader toolkit. I’ve been working on this “swirly bokeh” in isolation from the rest of that matchbox, so I’ll have to integrate it back in with the rest.

As you can see by the comments, not everyone is a fan of these looks, and it can certainly be overused (like in the samples I posted lol ). At least with a shader like this, we could work on a clean image and then “destroy it to taste” after the fact. It’s still not a “real lens” so although you can use a depth image, it’s not the same as the real thing, especially with occlusions. I’ve had the same sorts of problems that others have had with depth tools and occlusions - but for a “look”, it seems to work quite well.

3 Likes

It’s definitely nostalgia, but of the 19th century variety and more recently in the 10’s with the reissue of newer Petzval lenses for modern stills cameras.

Edit: in reading through I noticed that Poor Things was shot using a rehoused PL mount Petzval. All things old become new again…

I can’t hate on the usage of stylized lenses. So much of what we do in film and VFX is not making up our minds, enabling others to not make up theirs, and delaying all decisions in the hopes that we can twist one of the upstream knobs to get the perfect result.

Instead we get the “Netflix look”, Marvel films, inoffensive work no one will remember.

So when a director knows they are going to hand their work over to the Committee of Corner Rounding I can’t fault them for carving some aspect of the look into stone. Even if it’s a bad call, it’s at least a call.

8 Likes

We are now on a race in CGI to fully model the lens construction, meaning, all the pieces of glass, this will take a couple of years but I do expect to have lens simulators that can truly mimic real lenses of any kind. Not an easy task but it is the direction we are starting to notice.

Perhaps we will be able to put some of the nostalgia and the imperfections we all have grown up with on the material… young directors love it so I guess this is the new premium.