W_CatsEye v2.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Wes Heo
Named after the cat's eye bokeh effect, the goal of W_CatsEye is to emulate the look of non-uniform bokeh shapes to achieve more realism.
Requirements:
11.0, 10.5 or later
20 Jan 2019
565

01-main

Being into photography before I knew what VFX was, acheving more realistic bokeh in Nuke has been one of my goals as a compositor ever since I saw what the Defocus node does for the first time. Years later, this is my second serious attempt at accomplishing that goal, and the first tool I am sharing on Nukepedia. To get things started, here is a nice article on bokeh with pretty pictures: Understanding Bokeh

 

02-source

Compare the perfectly uniform and round bokeh in the above right image with the 'cats eye' shapes appearing around the corners of the first image. You can get fancy with filter shapes using Convolve or ZDefocus, but it still doesn't address the uniform CG look.

 

03-distpreview

There is a preview feature so you can easily see the characteristics of disotrtion, with a yellow crop warning that appears when you need to increase the 'Overscan' slider. There are some distortion presets that could be used as a starting point.

 

04-catpreview

The Cat's Eye is an independent parameter from distortion, so you could bypass the whole distortion setup and just apply cat's eye for subtlety.



05-filters

These are some filter shape presets I came up with by playing with the sliders in the UI. These are not image files so you can pick one and move some sliders to come up with totally different looks. I recommend using the Filter Preview when tweaking these. An external image can also be used, which I only implemented while rendering out internal filter resuts, but then realized it could be used to build a personal library of interesting filters.

06-more examples

Some more examples showing different combinations of distortion and filters. I used a jpeg as my image source, but if you use it on an image with more dynamic range then the variance in the filter details really start showing.

 

Now on to the UI:

07-UI108-UI2

Many of the sliders/buttons have more information when you hover over them. 


There are a lot of controls, but a lot of the irrelevent menu get hidden depending on your selection to make it easier to use. I tried to include only the essential features that cannot be done outside of this tool, so there is no option for heavy handed grading, vignette, etc. I am on the fence about chromatic abberation though because with the distortions happening applying it after the fact may not give the same results as applying it internally. If you have other suggestions please do let me know.

It should be noted that this version only applies the same amount of defocus to the entire frame. I am also working on a version that applies variable depth of field. It needs some extra features on top of this one so I will wait till this one is more or less final. 

09-future

This is a sneak preview of a possible future update. While the current version is barely adequate for moderate amount of bokeh distortion it can't even come close to matching extreme real life examples. The above image is a test with a different approach that can push things further. It looks promising, but the challenge will be analyzing the behavior and breaking it down into few simple controls that affects multiple variables.

Finally some known bugs in this release that has no effect on performance as far as I can tell:
-When you close the node properties while the defocus method is not set to 'Filter', next time you open it a bunch of filter menu becomes visible that shouldn't be. Clicking on 'Filter' and clicking again on 'Defocus' or 'Disc' fixes the problem. This problem is due to me being a python noob. If anyone could help solve this it would be appreiciated.

-In the node graph, there is a little gray 'x' box above the node. It wasn't there a couple of days ago and I do not know how to get rid of it.

So far I've only tested it on Nuke 10.5 on Windows. Please let me know if you try it on other OS and Nuke versions wheter it runs perfectly or you run into issues.

 

Free for personal and commercial use. If you find it useful all I ask is for you to show it to at least one other Nuke user so I can be motivated to build and share more and better tools.
Please login in order to download these files.

Comments   

 
# Alex Hughes 2019-01-21 03:16
Wow looks great Wes.

I'll share it around the office. Thanks for releasing it!
 
 
# Wes Heo 2019-01-21 15:07
Thank you Alex! I'm sure it could use refinement on the python side. It's only been a couple of months since I started learning interactive UI, so there was a lot of trial and error in the process.
 
 
# Lucas Pfaff 2019-01-21 09:18
Hi there Wes,

thank you so much for this. Even without the CatsEye effect it seems to be something I'm after for quite some time now, this will become really really handy in production!
I also used a similar named tool from Alexander Kulikov before, it's also pretty cool.

Will install asap. Thank you so much!
 
 
# Wes Heo 2019-01-21 15:11
Thank you Lucas, I will definitely take a look! Very curious to see how others have tackled this problem.
 
 
# Juan Olivares 2019-01-21 20:15
This is great! Thanks for sharing Wes!
 
 
# Øyvind Veberg 2019-01-31 08:36
This is looking great! BTW: I found that the little "x" above the node disappears when the "Mix"-slider in the "Speck imperfections"- section is set to 1.

Cheers!
 
 
# Wes Heo 2019-02-01 13:47
Thank you Øyvind, I've also learned that is the standard behavior with all nodes when there is a knob named "mix", so that name should only be used with the overall mix slider, like if you have a knob named "output" the value will be displayed under the node name whether you like it or not.

I've also found out in the current version the alpha disappears when the method is set to "filter". It was fixed by adding a shuffle node with white alpha to the filter input of ZDefocus inside the group.
 
 
# Robin Roeske 2019-02-05 17:16
Thanks for the gizmo! Will you make the ZDefocus available? Been searching for a cat's eye ZDefocus forever :D
 
 
+1 # Wes Heo 2019-02-07 03:09
Thanks Robin, I sure will. I just need to find some time to implement a few changes like remapping the depth channel to 0 to 1 range so when the user changes the focal plane a matte can be created in order to mix back the original image in the in-focus area to avoid things looking soft due to multiple filter hits.
 
 
# Olly Caiden 2019-10-09 00:28
Is w_catseyes_z available anywhere?
 
 
# Alvaro Lomba 2019-03-10 18:11
Amazing tool! Any chance of having two filter inputs, one for the Internal and another one for the External? And somehow to interpolate the inbetweens? (Or perhaps provide an animation, and the further from the centre, the higher the frame?
 
 
+1 # Itami Seijuro 2019-05-08 12:19
Where can I get the W_CatsEye_Z? Even though its a great tool, having it without being able to use some sort of depth renders the tool useless for me.
 
 
# Frédéric Vanmeerbeeck 2019-09-13 12:33
Very good work.
Indeed, is there a place we can test/download the W_CatsEye_Z?

Otherwize, adding a z value between the Shuffle and ZDefocus (DepthTemp) seems to work

Thx
 
 
# Olly Caiden 2019-10-08 21:05
Also looking for w_catseye_z, available anywhere?
 
 
# Olly Caiden 2019-10-08 21:05
Also looking for w_catseye_z, available anywhere?
 

You have no rights to post comments

We have 3181 guests and 61 members online