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 fSpy Camera

ComfyUI Node: 😺NKD fSpy Camera

Class Name

NKDfSpyCamera

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 fSpy Camera Description

Solves camera parameters using vanishing lines for accurate perspective simulation in digital art.

😺NKD fSpy Camera:

The NKDfSpyCamera node is designed to solve camera parameters from vanishing lines drawn over a photograph, leveraging the popular technique introduced by fSpy. This node is particularly useful for AI artists who want to recreate the perspective of a real-world scene in a digital environment. By analyzing two-point vanishing lines, the node calculates the camera's orientation and field of view (FOV), allowing you to accurately simulate the camera's perspective. This process is essential for integrating 3D elements into a scene with correct perspective alignment. The node operates within the ComfyUI framework and provides a seamless integration with its interactive Vue widget, ensuring that the backend calculations mirror the frontend's visual adjustments. The NKDfSpyCamera node is a powerful tool for achieving realistic camera perspectives in digital art and visual effects.

😺NKD fSpy Camera Input Parameters:

image

The image parameter represents the input photograph over which the vanishing lines are drawn. This image serves as the basis for calculating the camera's perspective. The dimensions of the image, specifically its width and height, are crucial for determining the aspect ratio and subsequently the field of view calculations. There are no specific minimum or maximum values for this parameter, but the image should be clear enough to identify vanishing lines accurately.

fspy_state

The fspy_state parameter is a JSON string that contains the state of the vanishing lines and other related settings. This state includes information such as the positions of the vanishing points, the principal point mode, and axis assignments. If not provided, the node defaults to a predefined state. This parameter is essential for customizing the camera solve to match the specific perspective of the input image. The default state includes sensible starting positions for the vanishing points and assumes a centered principal point.

😺NKD fSpy Camera Output Parameters:

camera_info

The camera_info output provides a dictionary containing detailed information about the solved camera, including its orientation and position. This information is crucial for setting up a 3D camera that matches the perspective of the input image, allowing for accurate integration of 3D elements.

img_tensor

The img_tensor output is the tensor representation of the input image. This output is useful for further processing within the ComfyUI framework, as it allows the image to be passed through subsequent nodes while retaining its original data structure.

fov_v_deg

The fov_v_deg output represents the vertical field of view of the solved camera in degrees. This value is important for configuring the camera's lens settings in a 3D environment, ensuring that the perspective matches the original photograph.

focal_mm

The focal_mm output provides the focal length of the camera in millimeters, based on a 35mm-equivalent horizontal field of view. This value is essential for replicating the camera's lens characteristics in a digital setting, allowing for realistic depth and perspective effects.

width

The width output indicates the width of the input image in pixels. This value is used in conjunction with the height to calculate the aspect ratio, which is a key factor in determining the field of view.

height

The height output indicates the height of the input image in pixels. Like the width, this value is used to calculate the aspect ratio, influencing the field of view calculations.

😺NKD fSpy Camera Usage Tips:

  • Ensure that the input image is clear and contains distinct vanishing lines to improve the accuracy of the camera solve.
  • Use the fspy_state parameter to customize the vanishing points and principal point settings for more precise control over the camera's perspective.
  • Experiment with different distance values in the fspy_state to achieve the desired camera placement relative to the scene.

😺NKD fSpy Camera Common Errors and Solutions:

Invalid JSON in fspy_state

  • Explanation: This error occurs when the fspy_state parameter contains malformed JSON, preventing the node from parsing the state correctly.
  • Solution: Ensure that the fspy_state string is properly formatted JSON. Use a JSON validator to check for syntax errors.

NoneType object is not iterable

  • Explanation: This error may occur if the vanishing points are not correctly defined, leading to a failure in the camera solve process.
  • Solution: Verify that the vanishing points in the fspy_state are correctly specified and that they form valid lines for intersection calculations. Adjust the positions if necessary.

😺NKD fSpy Camera 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 fSpy Camera