floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

comfyUI_TJ_NormalLighting

150

Last updated
2024-05-23

You can enhance your images with virtual lighting effects by utilizing normal maps through this custom ComfyUI node. It leverages both Lambertian and Phong reflection models to simulate realistic lighting conditions based on your input images.

  • Supports the integration of normal maps to create dynamic lighting effects.
  • Allows precise control over the direction and intensity of light sources.
  • Provides adjustable parameters for specular highlights and overall brightness, enhancing image realism.

Context

This tool is a custom node for ComfyUI that introduces virtual lighting capabilities using normal maps. Its primary purpose is to enhance image rendering by simulating realistic lighting effects based on the surface details represented in normal maps.

Key Features & Benefits

The tool allows users to input three types of images: a diffuse map, a normal map, and a specular map. This setup enables the user to create complex lighting effects that mimic real-world light interactions, enhancing the overall visual quality of the images.

Advanced Functionalities

The node employs the Lambertian reflection model for diffuse lighting and the Phong reflection model for specular highlights. Users can adjust the light source's direction using Euler angles and modify the strength of the specular reflection with a parameter called specular_power, which affects the sharpness and spread of highlights depending on the material properties.

Practical Benefits

By incorporating this tool into their workflows, users can significantly improve the control and realism of lighting in their images. The ability to fine-tune various parameters allows for greater flexibility in achieving the desired visual effects, thus enhancing the efficiency of the creative process within ComfyUI.

Credits/Acknowledgments

This custom node was inspired by the work of @tori29umai and @nana_tsukisuwa, who developed a method for generating normals from line art. Their contributions have been instrumental in the creation of this tool, for which the author expresses deep gratitude.