Ben's Comp Newsletter: Issue 044


Hope you had a productive week -- enjoy this week's newsletter!


Field-of-view Calculator.

At least a couple times a year I find myself needing the equation to calculate a camera's FOV (to have a card perfectly fit & travel within a camera's frustum, for example), and I can never remember how off the top of my head.

Embarrassingly, Frank Reuter made a calculator way back in 2011 that helps to figure this out, and I only discovered it in the most recent instance of needing the aforementioned equation.

Click here for another resource which shows the underlying math.

Click here to download FOV Panel from Nukepedia.

A hack to filter DeepMerge operations.

Unless you're Compositing at Weta, Nuke's Deep tools are quite barebones and don't allow much flexibility. An issue I have commonly encountered is a lack of image filtering when DeepMerging two Deep images together, which causes crunchy edges. You could correctly argue that this comes from a lack of deep samples in rendered images, but this is often necessary to reduce render times out of lighting.

When trying to DeepMerge certain furry characters into a scene with all sorts of things flying around, I encountered situations where fur was doing things fur shouldn't be doing. I had to figure out a solution to DeepMerge patches back into said fur to fix the issues, all while retaining nice soft edges.

What I came up with was essentially a hack that utilizes the DeepExpression node to blur the intersecting pixels from the A and B pipes by 1 pixel (as seen in the gif above). As a nice bonus, blurring further actually helped to get a sense of overlapping fur!

I have wrapped this solution up into a WIP gizmo for you to check out, should you be interested. It's a gizmo I intend on developing into a more robust solution down the line, so please reach out should you have any input, or another tool that solves this issue in a better way!

Click here to download the beta of "DeepMerge_Advanced".

Quick Tip: Disable geo when you're not using it.

A common complaint I hear among compositors, especially those working on large shots is: "My script is so slow". There are many things to consider when trying to speed up a cumbersome script, but the sneaky culprit usually reveals itself in the form of a ReadGeo node importing geometry over the network.

Even when you're importing basic LIDAR information to perhaps project cleanup onto, or help create occlusion shadows, I've found that the performance of reading geo into Nuke can be slow. Most of the time, this is a necessary evil, but can be easily dealt with by keeping a few things in mind:
  1. If you're not using the geo, delete it from your script! Even if it's hanging out off to the side and not being used, Nuke will still read in the data, and it will continue to slow down the speed you're moving around your Node Graph.
  2. Utilize localization. When you're not having to pull massive amounts of data through the network, things naturally speed up! 
  3. If you're using heavy, sub-divided geometry, perhaps when using a StickyProject, do your work and then take advantage of $gui to only enable the geometry during render time.
  4. ImagePlane gizmos come with the same, albeit less-severe warning, as they will slow down your script if you're using too many of them.
Hopefully with this knowledge in your pocket, you'll have another useful idea to call upon next time your Nuke script grinds to a halt, so you can get back to working speedily & efficiently in no time.

An Interactive Introduction to Fourier Transforms.

Fourier Transforms allow us to break down certain datasets into their sine wave components. This has many implications & applications in many industries involving sound and imagery, including audio & image-related compression, reconstruction & filtering. The following article does an amazing job of describing this fundamental concept in a non-mathematical, easily-digestible way.

You can see a visual representation of your images' frequencies in Nuke using the FFT (Fast Fourier Transform) Node. This is hidden by default, and is most easily accessed by hitting x with your cursor over your node graph, and typing FFT. Should we ever be working with plates shot on old film stock (i.e. lots of damage), converting the image into this space could allow us an easy solution for removing dust & scratches, by finding obvious flaws in the frequency's pattern and clone-painting them out, before converting back to our regular RGBA image with the InvFFT node.

If you would like to discover more about Fourier Transforms, I have two additional resources to share with you:
  • This video by Smarter Every Day on YouTube does a similarly great job of explaining the basic concepts behind Fourier Transforms.
  • This article breaks down the math behind what's actually going on with Fourier Transforms, as they relate to images.
Click here to read "An Interactive Introduction to Fourier Transforms".

Did you find this newsletter informative?

Have you created, or do you know of any outstanding Gizmos, Python Scripts or Tutorials that you would like to share with the global Compositing community? Please reply to this email, and I will do my best to include it in a future issue of this newsletter.
Click here to view previous issues.

Support on Patreon

If you get value from reading Ben's Comp Newsletter, please consider contributing via Patreon to help keep it running!
Thankyou to the following supporters
Adam Kelway
Adrian Winter
Hugo's Desk
Julien Laperdrix
Lee Watson
Michael Loithaler
Tiscar Coig
Vincent Desgrippes
William Towle
+ 2 others...

Support Ben's Comp Newsletter on Patreon
Share Share
Share Share
Tweet Tweet
Forward Forward