Simulating Physically Accurate Depth of Field in Nuke

Фильм және анимация

A discussion of lenses and optics, and how they affect depth of field behavior in an image.
We talk about depth channels, what they are and how they work. How depth of field can be simulated in Nuke with the ZDefocus tool. We also demonstrate the OpticalZDefocus gizmo, which is a tool for generating physically accurate depth of field. It does this using the depth of field equation, given lens characteristics and a focus distance.
You can set your lens and film-back characteristics, set your focus distance, and adjust the size of your bokeh with the aperture f/stop size, just like a real lens.
Some recommended links:
en.wikipedia.org/wiki/Depth_o...
www.photopills.com/articles/ul...
www.nukepedia.com/gizmos/filte...
www.nukepedia.com/gizmos/3d/do...

Пікірлер: 48

  • @GFinVFX
    @GFinVFX2 жыл бұрын

    Great Breakdown... much appreciated from anyone interested in this topic ;) Thank you

  • @marioCazares
    @marioCazares2 жыл бұрын

    Thank you so much! I've been trying to do this for so long but never took the time to figure it out. This is perfect and now I can use the absolute values from CG depth passes. Your gizmo will be my go to for that now. Again thanks

  • @InLightVFX

    @InLightVFX

    2 жыл бұрын

    I swear I just find you in the most random places on the internet lol

  • @marioCazares

    @marioCazares

    2 жыл бұрын

    @@InLightVFX haha hello Jacob! Glad to see you on this gem of a video x)!

  • @TheCookingPixel
    @TheCookingPixel4 жыл бұрын

    Good work, please continue, make this kind of tutorials. thank you so much.

  • @enriquemunoz6148
    @enriquemunoz61485 жыл бұрын

    Best thorough breakdown on DOF. Thanks so much. I see you haven't updated the channel. I hope you do more vids. This one was great.

  • @jedsmith

    @jedsmith

    5 жыл бұрын

    Thanks for the feedback! I don't get spare time very often but I'll try to make more soon :)

  • @MANIAKRA
    @MANIAKRA5 жыл бұрын

    Absolutely amazing video. Fascinating subject, thx

  • @philipp1674
    @philipp16747 жыл бұрын

    Nice and helpful tutorial, thx Jed!!

  • @sebastianbrandow914
    @sebastianbrandow9143 жыл бұрын

    This is really useful, thank you so much!

  • @jorge0018
    @jorge00187 жыл бұрын

    Thanks ! dude really awesome tool you made !

  • @gblix1on
    @gblix1on5 жыл бұрын

    Very informative. Thank you

  • @IamJohnnyFan
    @IamJohnnyFan3 жыл бұрын

    Thank you for this!

  • @teddyarcher3957
    @teddyarcher39573 жыл бұрын

    very well explained, thx!

  • @cgbintang
    @cgbintang6 жыл бұрын

    Thanks Man ! This is really useful :)

  • @rbalavfx
    @rbalavfx7 жыл бұрын

    Good Job Man !!

  • @nfc8971
    @nfc89715 жыл бұрын

    Best teaching. Thank y-u so much

  • @shivas4831
    @shivas48313 жыл бұрын

    You sovled my problem...thanks man 'every artist must watch this video'

  • @davidmarin6305
    @davidmarin63052 жыл бұрын

    Love it!!

  • @UVtec
    @UVtec2 жыл бұрын

    19:36 Yeah, the bokeh is really cool! =)

  • @YashJoshi-uv3sh
    @YashJoshi-uv3sh9 ай бұрын

    This is 💎

  • @asinnnnn
    @asinnnnn6 жыл бұрын

    cool video , good job.! can i request? ( if u not busy ofcourse) the camera tracking tutorial?

  • @timmy7596
    @timmy75964 жыл бұрын

    Love this tutorial. But unfortunately I am ran into some issues. Soon as I set my focal length I am getting an error ""OpticalZDefocus._ZDEFOCUS_:Kernel not found in cache and source is missing" . Any idea why this happening ?

  • @arifbosstanci
    @arifbosstanci4 жыл бұрын

    Thanks

  • @davideghirelli4453
    @davideghirelli44533 жыл бұрын

    is there any way to get right defocus edge on front and on the back of the object? can't find a way

  • @mamama2568
    @mamama25683 жыл бұрын

    thx!

  • @KikiLem
    @KikiLem6 жыл бұрын

    Thanks. Nice tutorial! How did you change your rgba to depth by just using keyboard?

  • @mattcameronvideo

    @mattcameronvideo

    2 жыл бұрын

    Great info, thanks for sharing!

  • @user-fx5nq6rq6s
    @user-fx5nq6rq6s7 жыл бұрын

    谢谢

  • @thefookCDN
    @thefookCDN4 жыл бұрын

    Fantastic overview and gizmo, thanks! Question though, doesn’t having a “max defocus” slider negate the whole point of simulating a real world lens, because depending on where that value is set, the amount of defocus at the maximum far defocus value can change dramatically. In theory, shouldn’t that value also be determined by a particular lens’ geometries (fstop, aperture size, focal length, and focal plane)? This becomes especially critical in close focus situations where defocussed areas can become very blurred. How do we determine what value to set that to to most closely simulate an actual lens?

  • @jedsmith

    @jedsmith

    4 жыл бұрын

    Consider the max defocus value like a safety maximum. It's a safety to prevent coc sizes greater than the threshold you specify. If you use max defocus to control your defocus size, then absolutely you will not get physically correct results. The user should set the bokeh size with the aperture, just like with a real lens. If you're worried about it you can just set that to a very high value and remove it from the tool. You may get freezing and strange behavior though if the plugin comes in contact with a pixel that has a very small depth value.

  • @alexandrkrasnovitskii2512
    @alexandrkrasnovitskii25122 жыл бұрын

    Hey there! What a nice tutorial, thank you so much! I have only one question which tool you're using to change the AOV passes right in the viewer?

  • @jedsmith

    @jedsmith

    2 жыл бұрын

    Thanks! It's Falk Hoffman's Channel Hotbox www.nukepedia.com/python/ui/channel-hotbox

  • @caihao2037
    @caihao20376 жыл бұрын

    nice vedio ,so i just wanna know that which plugin you have used to change the aov pass by a hotkey ,some cute little box ,during the vedio 。thanks !!

  • @caihao2037

    @caihao2037

    6 жыл бұрын

    😉👍thank you so much !!!

  • @KenedyTorcatt
    @KenedyTorcatt3 жыл бұрын

    Hi, I wanted to know if I can use this tool with nuke 13? It's really awesome

  • @jedsmith

    @jedsmith

    3 жыл бұрын

    Yes it should work fine in Nuke 13. The only thing that would need to be updated is support for Camera3 class nodes in the "Get Selected Camera" python script button.

  • @veronikashmorhun6089
    @veronikashmorhun60899 ай бұрын

    ❤‍🔥 wow

  • @sebek2242
    @sebek22427 жыл бұрын

    Great video. Very useful. Thank you very much for your time and effort. One little suggestion to make better stuff is to practice your oratory skills. But still this is the best video on this subject I've ever seen.

  • @rale1895

    @rale1895

    6 жыл бұрын

    *he got pretty good by the end... He was ace by the time he was roto paiting bokehs! :D

  • @bensasi
    @bensasi4 жыл бұрын

    thank you for this. How can I install the OpticalZDefocus gizmo? i put it in the .nuke folder but didnt work. dragged it in but gives me error. im not a nuke pro so im sorry and i tried to look it up no luck

  • @jedsmith

    @jedsmith

    4 жыл бұрын

    Hey Mo! Yeah I think the default dropHandler doesn't actually import .nk files, which is pretty dumb. A couple options - Make a folder named "ToolSets" in your .nuke folder. Any *.nk files you put in there will be available in the ToolSets menu in the node bar, and searchable in the tab menu. - Or copy the contents of the .nk file and paste it into your node graph. Turning the .nk toolset into a gizmo is a bit more complicated and probably not needed for your use-case. Hope that helps!

  • @bensasi

    @bensasi

    4 жыл бұрын

    ​@@jedsmith thank you for your quick response. I followed ur instructions and tested but I think I need to fix my z Depth from RS or grade it better for better results. I was looking into how to turn that into gizmo and made me wonder why there isnt a gizmo version along side .nk version?

  • @jedsmith

    @jedsmith

    4 жыл бұрын

    ​@@bensasi It's worth noting that it is very important that the z-depth is rendered with real-world scene-units as absolute distance from camera. Or pre-processed to be this before it goes into the OpticalZDefocus tool. Make sure the depth units are set accurately based on your scene-scale in the node, and that your camera geometry is set correctly on the node as well. If you do this, your dof results will be physically correct. If you don't, all bets are off. As for a gizmo version, feel free to do that yourself if you need that functionality. All you need to do is change the node class from Group to Gizmo : Change this line: Group { To this: Gizmo { and save it as a .gizmo file, then put it in your $NUKE_PATH somewhere. Best of luck!

  • @bensasi

    @bensasi

    4 жыл бұрын

    @@jedsmith thank you thank you . I'm trying to use your script on renders from RS. I'm not importing cameras nor a 3D scene into nuke. and yes my maya scene is 1:1 real world units.

  • @bensasi

    @bensasi

    4 жыл бұрын

    I'm also getting an Error: Kernel not found in cache and source is missing. :(

  • @entertainmentchannel8952
    @entertainmentchannel89525 жыл бұрын

    could you please make a tutorial in short ,for just 5-10 minutes,it should relates only to video composting, with minimum points

  • @rikiboomboom
    @rikiboomboom6 жыл бұрын

    Your clicky keyboard tho

Келесі