ComfyUI Node: Calculate Normal Map

Class Name

CalculateNormalMap

Category
gaffer
Author
ray (Account age: 4641 days)
Extension
comfyui's gaffer(ComfyUI native implemen...
Latest Updated
6/19/2024
Github Stars
0.0K

How to Install comfyui's gaffer(ComfyUI native implementation of IC-Light. )

Install this extension via the ComfyUI Manager by searching for  comfyui's gaffer(ComfyUI native implementation of IC-Light. )
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui's gaffer(ComfyUI native implementation of IC-Light. ) 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Calculate Normal Map Description

Generate normal maps from input images for 3D depth illusion.

Calculate Normal Map:

The CalculateNormalMap node is designed to generate a normal map from a sequence of input images. A normal map is a type of texture that stores information about the direction of surface normals, which can be used to create the illusion of depth and detail on a 3D surface without increasing the polygon count. This node processes the input images by centering their brightness levels, applying Gaussian blur to smooth the normal calculation, and then computing the normal map based on the image intensities. The result is a normalized and clamped normal map that can be used in various applications, such as enhancing the realism of 3D models in computer graphics and game development.

Calculate Normal Map Input Parameters:

images

images is a sequence of input images that are used to calculate the normal map. These images should represent different lighting conditions (e.g., left, right, top, bottom) to accurately capture the surface details. The quality and accuracy of the normal map depend on the input images provided.

sigma

sigma is the standard deviation for the Gaussian blur applied during the normal calculation. It controls the smoothness of the resulting normal map. A higher sigma value results in a smoother normal map, while a lower value retains more detail. The value should be chosen based on the desired level of detail and smoothness.

center_input_range

center_input_range is the range used to center the input images, adjusting their brightness levels to have a mean closer to zero. This step is crucial for ensuring consistent lighting conditions across the images, which improves the accuracy of the normal map calculation.

mask

mask is an optional parameter that specifies a mask image to define the computation region. If provided, the normal map calculation will be restricted to the areas defined by the mask, allowing for selective processing of the input images. This can be useful for focusing on specific regions of interest.

Calculate Normal Map Output Parameters:

normal

normal is the calculated normal map, which contains the surface normal information derived from the input images. This output can be used in various applications to enhance the visual realism of 3D models by simulating detailed surface textures and lighting effects.

Calculate Normal Map Usage Tips:

  • Ensure that the input images represent different lighting conditions to capture accurate surface details.
  • Adjust the sigma parameter to balance between smoothness and detail in the normal map.
  • Use the center_input_range parameter to normalize the brightness levels of the input images for consistent lighting.
  • If you need to focus on specific regions, provide a mask image to restrict the normal map calculation to those areas.

Calculate Normal Map Common Errors and Solutions:

"Invalid input images"

  • Explanation: This error occurs when the input images are not provided or are in an incorrect format.
  • Solution: Ensure that you provide a sequence of valid images representing different lighting conditions.

"Sigma value out of range"

  • Explanation: This error occurs when the sigma value is set outside the acceptable range.
  • Solution: Adjust the sigma value to be within a reasonable range for Gaussian blur, typically between 0.1 and 10.

"Mask image format error"

  • Explanation: This error occurs when the mask image is not in the correct format or dimensions.
  • Solution: Ensure that the mask image is a valid image file and matches the dimensions of the input images.

Calculate Normal Map Related Nodes

Go back to the extension to check out more related nodes.
comfyui's gaffer(ComfyUI native implementation of IC-Light. )
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.