![]() far = 1 - Near plane = 0, far plane = 1.This is compatible with depth maps generated by Nuke and RenderMan. The values are expected to decrease from large positive values close to the camera to zero at infinity. far = 0 - The Z value in the depth channel is equal to 1/distance.depth - The Z value in the depth channel is the distance between the camera and whatever is in the image at that pixel.For example, if Z is 0.5, then the blur size is 0.5 times the value of the size control (unless this is bigger than maximum, in which case it is clamped to maximum). direct - The Z value in the depth channel directly controls blur.For example, some programs use higher values to denote further away, while in others they mean closer to the camera: Use math to specify how you want to use the depth channel to calculate the distance between the camera and an object. Proceed to Adjusting the Shape of Out-of-Focus Highlights below. ![]() Note that you don’t necessarily need to crop the filter image to a smaller size, as fast Fourier transforms are used to speed up convolutions with large filter images. You can create a filter image using the Roto node ( Draw > Roto) or the Flare node ( Draw > Flare), for example. See Using a Custom Filter Image for more information. Note:Loading scripts from pre- Nuke 8.0v7 enables the legacy resize mode checkbox automatically, for backward compatibilty, and uses the filter bounds dropdown to determine how images used in filtering are resized.Īdding new ZDefocus nodes hides the legacy resize mode checkbox and allows you to use the image filter dropdown to give you more flexibility when calculating blur. As the clip in the image input is blurred, any highlights in the clip bloom in the shape of the filter image, creating a bokeh effect. The filter image represents the shape and size of the camera aperture used to shoot the input footage. If you want to use your own filter image (rather than the predefined disc or bladed images), connect that to the ZDefocus node’s filter input and set filter type to image in the node’s properties. This looks wrong, as it suggests that those edge pixels are floating somewhere between the objects. If it is, pixels along an edge between two objects can be assigned a depth that is in-between the depth of the front object and back objects. Note that the depth map should not be anti-aliased. By default, the depth information is taken from depth.Z. Set depth channel to the channel in the image input that contains the depth map. Use the channels dropdown menu to select the channels you want to blur. If your depth channel and rgba channels exist in two different files, you can use a Shuffle node to combine them. Note:This image also needs to contain a depth map channel. Connecting ZDefocusĬreate a ZDefocus node by clicking Filter > ZDefocus.Ĭonnect the ZDefocus node’s image input to the image you want to blur. If you are using a render license of Nuke, you need to add -gpu on the command line. You must restart Nuke for the change to take effect. Press Shift+ S to open the Preferences dialog, make sure you’re viewing the Preferences > Performance > Hardware tab, and set default blink device to the device you want to use. You can select the GPU to use in the Preferences. Tip:You can check Use GPU if available to have the node run on the graphics processing unit (GPU) rather than the central processing unit (CPU).įor more information on the minimum requirements, please see Windows, macOS, or Linux or refer to the Nuke Release Notes available in Help > Release Notes. If necessary, enhance the highlights to make lens shape effects more visible. See Adjusting the Shape of Out-of-Focus Highlights. Here's a quick overview of the workflow: 1.Ĭreate a ZDefocus node and connect it to your script.Īdjust the shape of any out-of-focus highlights. This allows it to preserve the ordering of objects in the image. After ZDefocus has processed all the layers, it blends them together from the back to the front of the image, with each new layer going over the top of the previous ones. In order to defocus the image, ZDefocus splits the image up into layers, each of which is assigned the same depth value everywhere and processed with a single blur size. Of the filter image, creating a bokeh effect. Whereas areas in front of and behind it are blurred.Īny defocused highlights in the image bloom in the shape In this case, areas under the green sign remain in focus, Using ZDefocus to simulate a more narrow depth of field. This allows you to simulate depth-of-field (DOF) blurring. The ZDefocus node blurs the image according to a depth map channel. Adjusting the Shape of Out-of-Focus Highlights.
0 Comments
Leave a Reply. |