Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhances 3D model realism by simulating light interaction with normal map surface details for dynamic textures.
The > Normal Map Lighting node is designed to enhance the visual realism of your 3D models by simulating the interaction of light with the surface details represented in a normal map. This node takes into account various lighting parameters such as light direction, color, and intensity to compute the diffuse and specular reflections on the surface. By doing so, it provides a more dynamic and lifelike appearance to textures, making them respond to lighting changes in a realistic manner. This node is particularly useful for artists looking to add depth and detail to their textures without increasing the polygon count of their models. It leverages advanced mathematical operations to ensure that the lighting effects are both accurate and visually appealing.
The diffuse_map parameter represents the base color texture of your model. It is used as the primary color information that will be affected by the lighting calculations. This parameter should be a 4D tensor with dimensions corresponding to batch size, height, width, and color channels. The diffuse map provides the foundational color data upon which lighting effects are applied.
The normal_map parameter is a texture that encodes the surface normals of your model. These normals are used to calculate how light interacts with the surface, creating realistic shading and highlights. The normal map should be a 4D tensor with dimensions corresponding to batch size, height, width, and color channels. It is essential for simulating the fine details of the surface without adding extra geometry.
The specular_map parameter represents the specular reflection properties of the surface. It determines how shiny or reflective the surface appears under lighting. This parameter should be a 4D tensor with dimensions corresponding to batch size, height, width, and color channels. The specular map is crucial for achieving realistic highlights and reflections.
The light_yaw parameter specifies the horizontal angle of the light source in degrees. It controls the direction from which the light is coming, affecting how shadows and highlights are cast on the surface. The value should be a float, typically ranging from 0 to 360 degrees.
The light_pitch parameter specifies the vertical angle of the light source in degrees. It controls the elevation of the light source, influencing the intensity and position of the lighting effects. The value should be a float, typically ranging from -90 to 90 degrees.
The specular_power parameter determines the sharpness of the specular highlights. Higher values result in smaller, sharper highlights, while lower values produce broader, softer highlights. This parameter should be a float, with typical values ranging from 1 to 100.
The ambient_light parameter represents the overall ambient light intensity in the scene. It affects the base illumination level of the surface, ensuring that it is not completely dark even in the absence of direct light. This parameter should be a float, with typical values ranging from 0 to 1.
The NormalDiffuseStrength parameter controls the intensity of the diffuse lighting effect. Higher values increase the impact of the normal map on the diffuse lighting, making surface details more pronounced. This parameter should be a float, with typical values ranging from 0 to 1.
The SpecularHighlightsStrength parameter controls the intensity of the specular highlights. Higher values make the highlights more prominent, enhancing the shiny appearance of the surface. This parameter should be a float, with typical values ranging from 0 to 1.
The TotalGain parameter is a multiplier that adjusts the overall brightness of the final output. It allows you to fine-tune the intensity of the combined lighting effects. This parameter should be a float, with typical values ranging from 0 to 1.
The color parameter specifies the RGB color of the light source. It affects the hue and saturation of the lighting effects on the surface. This parameter should be an integer representing the RGB color value.
The mask parameter is an optional input that allows you to specify areas of the texture that should be excluded from the lighting calculations. It should be a 4D tensor with dimensions corresponding to batch size, height, width, and color channels. If not provided, a default mask will be used.
The output_tensor parameter is the final result of the lighting calculations. It is a 4D tensor with dimensions corresponding to batch size, height, width, and color channels. This tensor represents the texture with applied lighting effects, including diffuse and specular reflections, adjusted according to the input parameters. The output tensor can be used directly in your rendering pipeline to achieve realistic lighting on your 3D models.
© Copyright 2024 RunComfy. All Rights Reserved.