Simulating Physically Accurate Depth of Field in Nuke

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • 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

  • @enriquemunoz6148
    @enriquemunoz6148 5 лет назад +3

    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 лет назад +5

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

  • @GFinVFX
    @GFinVFX 2 года назад

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

  • @TheCookingPixel
    @TheCookingPixel 4 года назад +1

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

  • @marioCazares
    @marioCazares 2 года назад +3

    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 года назад +4

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

    • @marioCazares
      @marioCazares 2 года назад +2

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

  • @MANIAKRA
    @MANIAKRA 5 лет назад

    Absolutely amazing video. Fascinating subject, thx

  • @philipp1674
    @philipp1674 7 лет назад

    Nice and helpful tutorial, thx Jed!!

  • @jorge0018
    @jorge0018 7 лет назад

    Thanks ! dude really awesome tool you made !

  • @sebastianbrandow914
    @sebastianbrandow914 3 года назад

    This is really useful, thank you so much!

  • @cgbintang
    @cgbintang 6 лет назад

    Thanks Man ! This is really useful :)

  • @gblix1on
    @gblix1on 5 лет назад

    Very informative. Thank you

  • @IamJohnnyFan
    @IamJohnnyFan 3 года назад

    Thank you for this!

  • @teddyarcher3957
    @teddyarcher3957 3 года назад

    very well explained, thx!

  • @rbalavfx
    @rbalavfx 7 лет назад +1

    Good Job Man !!

  • @nfc8971
    @nfc8971 5 лет назад

    Best teaching. Thank y-u so much

  • @shivas4831
    @shivas4831 3 года назад

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

  • @UVtec
    @UVtec 2 года назад

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

  • @asinnnnn
    @asinnnnn 6 лет назад

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

  • @davidmarin6305
    @davidmarin6305 2 года назад

    Love it!!

  • @YashJoshi-uv3sh
    @YashJoshi-uv3sh 9 месяцев назад

    This is 💎

  • @arifbosstanci
    @arifbosstanci 4 года назад

    Thanks

  • @mamama2568
    @mamama2568 3 года назад

    thx!

  • @davideghirelli4453
    @davideghirelli4453 3 года назад

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

  • @thefookCDN
    @thefookCDN 4 года назад

    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 года назад +2

      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.

  • @KikiLem
    @KikiLem 6 лет назад +1

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

  • @timmy7596
    @timmy7596 4 года назад

    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 ?

  • @alexandrkrasnovitskii2512
    @alexandrkrasnovitskii2512 2 года назад

    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

  • @user-fx5nq6rq6s
    @user-fx5nq6rq6s 7 лет назад

    谢谢

  • @caihao2037
    @caihao2037 6 лет назад

    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 !!!

  • @sebek2242
    @sebek2242 7 лет назад

    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 лет назад +1

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

  • @KenedyTorcatt
    @KenedyTorcatt 3 года назад

    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
    @veronikashmorhun6089 9 месяцев назад

    ❤‍🔥 wow

  • @bensasi
    @bensasi 4 года назад

    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 года назад +1

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

  • @entertainmentchannel8952
    @entertainmentchannel8952 5 лет назад +1

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

  • @rikiboomboom
    @rikiboomboom 6 лет назад +3

    Your clicky keyboard tho