Thread: Nuke Zblur?

Reply to Thread
Results 1 to 13 of 13
  1. #1 Nuke Zblur? 
    Join Date
    Mar 2006
    Location
    London, UK
    Posts
    469
    Hi, i have been have some problems with Nuke´s Zblur.

    I Always make a grade with the values of the zdepth (overing with mouse over Depth to have "-" values) to have a Zchannel

    Then I use Zblur to simulate a real lens blur, but I always get a strange glow around the edges in the most focused part of my render.

    I am using Max EXR with Z, Normals and Velocity passes from the Scanline render.

    Also is there any kind of way to make a real Defocus with some lens hexagonal effect, just like the Lens Care effect in After effects from the frischluft Plugin?

    My last question is, what kind of zdepth should I have? White in backgound and black in foreground or the oposite of that?

    Anyway had also problems with this?

    Thanks
    Hugo Guerra
    Director / VFX Supervisor / Nuke Artist / Nuke training

    Portfolio Website
    Twitter: http://twitter.com/HugoCGuerra
    IMDB: http://www.imdb.com/name/nm1512412/
    Reply With Quote  

  2. #2  
    Join Date
    Sep 2006
    Location
    Wellington
    Posts
    232
    >>Also is there any kind of way to make a real Defocus with some lens hexagonal effect

    I believe the Defocus node only uses disks for lens artifacts but you can gain more control over this by using the Convolve Filter. It will allow you to use a second input as the shape of the artifact so you have full control over it.

    >>My last question is, what kind of zdepth should I have? White in backgound and black in foreground or the oposite of that?

    Depending on where your z channel comes from (Maya, 3dsMax, PRMan, self made, etc) and how the near and far values coretae to each other you will have to adjust the "math" knob in the ZBlur node accordingly. I.e. if you normalize your z channel (which you may have implied with your first sentence) to give far values the value of '1' and near ones the value of '0' than set the "math" knob to "far=1".
    Check the "focal-plane setup" to make life easier when setting up the dof.

    I found that sometimes the "distance" value for the math knob behaves strangely but when I then normalized the values manually with a grade node and used the "far=1" setting it worked fine.

    hope this helps.

    cheers,
    frank
    ________
    frank rueter
    compositor / 2D technical director
    www.beingfrank.info
    www.ohufx.com
    Reply With Quote  

  3. #3  
    Join Date
    Sep 2004
    Posts
    1,202
    I believe the Defocus node only uses disks for lens artifacts but you can gain more control over this by using the Convolve Filter. It will allow you to use a second input as the shape of the artifact so you have full control over it.
    Just to add something to what Frank said keep in mind that the convolve filter is really processor intensive so try to keep you shape on the secondary input as small as you can. Also if you are using it to "defocus" something with an alpha channel make sure that your shape in the secondary input is present on the alpha as well.
    dg | ••• | imdb
    Reply With Quote  

  4. #4 Zblur in Nuke 
    Join Date
    Mar 2006
    Location
    London, UK
    Posts
    469
    I still get a very strange blurred edge with the Zblur node, should I try blurring the Zdepth? I tried with the normal blur node but with little results.

    Anyone has a better node, or technic to antilising the Z pass.


    All of best
    Hugo Guerra
    Director / VFX Supervisor / Nuke Artist / Nuke training

    Portfolio Website
    Twitter: http://twitter.com/HugoCGuerra
    IMDB: http://www.imdb.com/name/nm1512412/
    Reply With Quote  

  5. #5  
    Join Date
    May 2007
    Location
    London
    Posts
    52
    If you have really abrupt changes in your depth, like a single sharp foreground object over a distant background, doing the blurring in a single node doesn't work very well. It's better to split your image into near and far plates, blur them individually and comp them back together if you can. You tend to get glows around close objects, maybe that's what you're seeing?

    It's the same in Shake or anything else.
    Reply With Quote  

  6. #6 ZDepth alaising 
    Join Date
    Apr 2006
    Posts
    107
    Z passes are not usually edge aliased at all especially if you are outputting from a render pass or framebuffer rather than a a z shader or a fake Z pass from a projection ramp or something or other. I have seen people get around this problem by blurring z passes, choking there alpha where possible and rendering out Z data at twice resolutionTruthfully I often fake my Z using a projection ramp set to my desired clip values output this via mental ray with ctrl_buffers so there is no real render hit. Also make sure that you are outputting Z data at a minimum of 16 bit.

    s
    Reply With Quote  

  7. #7  
    Join Date
    Feb 2007
    Posts
    19
    When it comes to the zblur im personaly always have some problems on semitransparent or motion blured objects. We always used to fake optical defocus effect somehow but rarely rely on zblur. For example i will attach pic from my latest comp where we wanted to use zblur but switched to prerendered depth of field effect.

    Maybe im doing something wrong please let me know how can i solve this situation.
    IM using zblur node with math turned to far=0 (my depth is far=0 near=1) Depth is antialiased pass and thats is the main problem imo. Because nuke dont know if this is antialiased/motionblured edge or this is object in depth so it produce strange results in motionblured areas or on object edges.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	zblur_passes.jpg‎
Views:	826
Size:	174.4 KB
ID:	4237  
    Reply With Quote  

  8. #8  
    Join Date
    May 2007
    Location
    London
    Posts
    52
    I don't think you're doing anything wrong, that's just a tricky scene to use 2D depth of field post-processing on. Those sharp changes in depth and the motion blur make it really hard.

    Zblur flat out cannot work properly for motion blurred edges, soft edges and transparent objects... the information just isn't there for Nuke (or anything else, as far as I know) to work out what should be blurred and what shouldn't. You'll have to either use true 3D DoF, or split your render into several depth slices and work on them seperately, probably with 2D motion blur in post to avoid having to ZBlur soft edges again...

    You should be able to help the foreground glow by multiplying by the matte after you defocus but otherwise I'd do a shot like that in 3D.
    Reply With Quote  

  9. #9  
    Join Date
    May 2007
    Posts
    14
    In addition to those good points I always grade my Zpasses with a Lookup, if I'm slicing or working with them it helps me to roll things off so I can avoid bad edging.
    Reply With Quote  

  10. #10  
    Join Date
    Nov 2006
    Location
    Stockholm/Sweden
    Posts
    318
    What would zdepth from maya normaly be in? -depth? Don't really get the hang of this.

    Edit... I might be stoopid but the help on focal plane set up says;

    red: less then DOF
    green: inside DOF
    blue: greater then DOF

    Then the question is how they define less and greater. Would something greater then DOF be in the distance "behind" the DOF? And something less then DOF be closer to the cam?
    Last edited by NEO; September 12th, 2007 at 08:51 AM.
    NEO | cto | compositor | cg-artist | www.fxphd.com ...
    Reply With Quote  

  11. #11  
    Join Date
    Nov 2006
    Location
    Stockholm/Sweden
    Posts
    318
    Mkay... Migh have got the hang of it. It should probably -depth on Maya standard IFFs. And I also had to put in an erode node since the Z didn't match up perfect against the color-pass.
    NEO | cto | compositor | cg-artist | www.fxphd.com ...
    Reply With Quote  

  12. #12  
    Join Date
    Sep 2006
    Location
    Wellington
    Posts
    232
    >>Then the question is how they define less and greater. Would something greater then DOF
    >>be in the distance "behind" the DOF? And something less then DOF be closer to the cam?
    yes, "less" should be the area between the camera and the depth valu set with the focus plane knob, blue should be the area between focus plane and infinity

    If you're not sure about which mode to use, sometimes it's easiest to just manually normalize the z channel (use a grade node and set your black and white points to the near and far values respectively), then use "far=1". I like doing that sort of thing as I can apply a gamma to the z channel and therefore control the falloff of my ZBlur.
    ________
    frank rueter
    compositor / 2D technical director
    www.beingfrank.info
    www.ohufx.com
    Reply With Quote  

  13. #13  
    Join Date
    Nov 2006
    Location
    Stockholm/Sweden
    Posts
    318
    Aaah... That's actually a great idea. Thanks rueter.
    NEO | cto | compositor | cg-artist | www.fxphd.com ...
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Nuke vs Shake
    By vivekm in forum NUKE from The Foundry
    Replies: 32
    Last Post: March 19th, 2008, 10:02 AM
  2. NUKE 4.6 released
    By fr3drik in forum Industry News
    Replies: 7
    Last Post: April 2nd, 2007, 04:38 PM
  3. Replies: 0
    Last Post: January 24th, 2007, 03:58 AM
  4. Replies: 0
    Last Post: July 30th, 2006, 01:29 PM
  5. New Version of NUKE to Preview at SIGGRAPH
    By CGnews in forum Industry News
    Replies: 0
    Last Post: July 13th, 2006, 04:35 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts