Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-NKD-VFX-Tools > 😺NKD Perspective Unwarp

ComfyUI Node: 😺NKD Perspective Unwarp

Class Name

NKDPerspectiveUnwarp

Category
😺NKD Nodes/3D
Author
Nekodificador (Account age: 2602days)
Extension
ComfyUI-NKD-VFX-Tools
Latest Updated
2026-07-23
Github Stars
0.06K

How to Install ComfyUI-NKD-VFX-Tools

Install this extension via the ComfyUI Manager by searching for ComfyUI-NKD-VFX-Tools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-NKD-VFX-Tools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

😺NKD Perspective Unwarp Description

Transform selected perspective region into flat 2D image for distortion-free editing in 3D/VFX workflows.

😺NKD Perspective Unwarp:

The NKDPerspectiveUnwarp node is designed to transform a selected four-corner perspective region of an image into a flat, fronto-parallel 2D image. This process is particularly useful for artists who wish to paint or inpaint specific areas of an image without the distortion caused by perspective. By dragging the corners on the node, you can define the area to be unwrapped. The node then calculates the necessary transformation to flatten this region, making it easier to edit. Once the editing is complete, the transformation data can be connected to the NKDPerspectiveRewarp node to seamlessly integrate the edited region back into the original image. This node leverages advanced mathematical techniques, such as homography, to ensure accurate and high-quality results, making it an essential tool for 3D and VFX workflows.

😺NKD Perspective Unwarp Input Parameters:

image

This parameter represents the input image from which a perspective region will be unwrapped. The image should be in a format compatible with the node's processing capabilities. The quality and resolution of the input image can affect the final output, so using a high-resolution image is recommended for the best results.

corners

The corners parameter allows you to specify the four corners of the perspective region you wish to flatten. This is typically done by dragging the corners on the node interface. Accurate placement of these corners is crucial as it defines the area that will be transformed into a flat image. Incorrect corner placement can lead to distorted or unintended results.

aspect_source

This parameter determines how the aspect ratio of the unwrapped image is calculated. It can be set to "Manual," "Metric," or "Auto." "Manual" allows you to specify the aspect ratio directly, "Metric" uses camera metrics like focal length to calculate the aspect, and "Auto" automatically determines the best aspect ratio based on the selected region. Choosing the right aspect source is important for maintaining the correct proportions in the unwrapped image.

manual_ratio_w

When aspect_source is set to "Manual," this parameter specifies the width component of the aspect ratio. It is a floating-point value that, together with manual_ratio_h, defines the desired aspect ratio of the output image. Adjusting this value allows for precise control over the image's proportions.

manual_ratio_h

Similar to manual_ratio_w, this parameter specifies the height component of the aspect ratio when aspect_source is "Manual." It works in conjunction with manual_ratio_w to define the aspect ratio. Proper adjustment of these values ensures that the unwrapped image maintains the intended proportions.

resolution_mode

This parameter controls how the resolution of the output image is determined. It can affect the size and quality of the unwrapped image. Different modes may prioritize different aspects, such as maintaining the original image's resolution or optimizing for a specific output size.

longest_side

This parameter sets the maximum length for the longest side of the output image. It helps in controlling the size of the unwrapped image, ensuring it fits within certain dimensions. This is particularly useful when working with images that need to conform to specific size constraints.

megapixels

The megapixels parameter allows you to specify the desired resolution of the output image in terms of megapixels. This can be useful for ensuring that the unwrapped image has sufficient detail for further editing or printing. Adjusting this parameter can help balance between image quality and processing time.

focal_length_mm

This optional parameter is used when aspect_source is set to "Metric." It specifies the focal length of the camera in millimeters, which is used to calculate the aspect ratio based on camera metrics. Providing an accurate focal length can improve the accuracy of the unwrapping process.

😺NKD Perspective Unwarp Output Parameters:

image

The output image is the flattened, fronto-parallel version of the selected perspective region. This image is ready for further editing, such as painting or inpainting, without the distortions caused by perspective. The quality of this output depends on the input parameters and the accuracy of the corner placement.

warp_data

This output provides the transformation data necessary to reapply the edits back onto the original image. It contains information about the homography used to flatten the image, which can be connected to the NKDPerspectiveRewarp node. This ensures that any edits made to the unwrapped image can be seamlessly integrated back into the original perspective.

😺NKD Perspective Unwarp Usage Tips:

  • Ensure that the corners are accurately placed to avoid distortion in the unwrapped image.
  • Use the "Metric" aspect source with a correct focal length for more accurate results when working with images taken from cameras.
  • Adjust the manual aspect ratio parameters to maintain the desired proportions in the output image.
  • Consider the resolution mode and longest side parameters to control the size and quality of the output image.

😺NKD Perspective Unwarp Common Errors and Solutions:

Invalid/degenerate corners — using the full image

  • Explanation: This error occurs when the specified corners do not form a valid quadrilateral, possibly due to incorrect placement or overlap.
  • Solution: Double-check the corner placements to ensure they form a proper four-corner region. Adjust the corners to avoid overlap and ensure they define a valid area.

Metric aspect needs a focal length — falling back to Auto

  • Explanation: This warning indicates that the "Metric" aspect source was selected, but no valid focal length was provided.
  • Solution: Provide a valid focal length in millimeters if using the "Metric" aspect source, or switch to "Auto" or "Manual" if the focal length is unavailable.

😺NKD Perspective Unwarp Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-NKD-VFX-Tools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

😺NKD Perspective Unwarp