Texture Delight:
x1TextureDelight reduces broad lighting variations in a texture, such as a shadow across one side or a bright patch caused by the lighting in a source photograph. It estimates the overall light pattern from a blurred version of the image, then adjusts brightness to make the surface appear more evenly lit. You can control how strongly it flattens the lighting, how much fine surface detail it keeps, and whether it gently restores color saturation. This can help prepare photographed materials for texture work while retaining more of their visible grain and markings. It does not identify or reconstruct the material’s true color beneath a shadow; review the result where lighting is especially strong or details are obscured.
Texture Delight Input Parameters:
image
Required IMAGE. This is the texture or photograph to process. The node adjusts its RGB color channels and handles each image in a batch separately. If the image has an alpha channel, the source code preserves that channel unchanged. There is no numeric minimum, maximum, or default for this input; you must supply an image.
settings_json
Required STRING. This is a JSON object containing the processing controls. Its displayed default is {"blur_radius":32.0,"flatten_strength":0.85,"detail_preserve":0.8,"shadow_lift":0.3,"highlight_compress":0.2,"saturation_restore":0.18,"mask_feather":8.0,"invert_mask":false}. The settings and their source-defined limits are: blur_radius (1.0–512.0 pixels; default 32.0) sets the scale used to estimate broad lighting, with a larger value responding to broader changes; flatten_strength (0.0–2.0; default 0.85) sets the baseline strength of lighting correction; detail_preserve (0.0–1.0; default 0.8) blends fine brightness detail from the original back into the result, with 1.0 favoring the original detail; shadow_lift (0.0–2.0; default 0.3) adds correction in areas estimated to be darker than the overall light level; highlight_compress (0.0–2.0; default 0.2) adds correction in areas estimated to be brighter; saturation_restore (0.0–1.0; default 0.18) controls a modest saturation increase in those darker and brighter areas; mask_feather (0.0–256.0 pixels; default 8.0) sets the requested softening radius for the effect mask; and invert_mask (true or false; default false) reverses the mask selection. These are settings inside the JSON string, not separate node input sockets. For example, {"flatten_strength":0.5,"detail_preserve":0.9} changes those two settings while leaving the others at their defaults.
mask
Optional MASK. This selects where the correction is blended into the image: stronger mask values permit more of the processed result, while weaker values retain more of the original. mask_feather can soften the selection, and invert_mask reverses it. The node’s provided source does not specify a separate numeric range or default value for this socket; you may leave it unconnected.
Texture Delight Output Parameters:
image
IMAGE. The processed texture, returned in the same batch arrangement, device, and data type as the input image. Its RGB channels contain the lighting adjustment blended according to the effect mask. An input alpha channel, when present, is carried through unchanged. Inspect this output to judge whether uneven illumination has been reduced without losing surface detail you need.
mask
MASK. A per-pixel indication of how much the node changed brightness and saturation in the final result, rather than a copy of the optional input mask. Values are calculated from the size of those changes and limited to 0–1: darker values mean little or no recorded adjustment, and brighter values mean a larger adjustment. You can use it to inspect where the correction had an effect; it should not be interpreted as a material-selection or shadow-detection mask.
delight_info
STRING. A short text summary of the applied settings, including blur radius and mask feathering in pixels, the correction controls, and mask coverage as a percentage. It also notes when the mask was inverted. The coverage figure is based on the average processed effect mask, so it describes where correction was allowed, not how much the image actually changed.
Texture Delight Usage Tips:
- Start with the displayed defaults, then compare the output with the original. If lighting still looks uneven, increase
flatten_strengthgradually; if the surface looks overly flat, reduce it. - Match
blur_radiusto the scale of the unwanted lighting. Try a larger radius for a broad shadow or light gradient, and a smaller one when the variation you want to address is more localized. Check that genuine large-scale color variation in the material remains acceptable. - Keep
detail_preservehigh when grain, pores, or other fine texture features matter. Lower it only after inspecting whether the remaining fine brightness variation is part of the unwanted lighting. - Adjust
shadow_liftorhighlight_compressaccording to which side of the lighting problem remains more visible. Usesaturation_restoreconservatively and compare colors against the source. - Connect a mask when only part of the image needs correction. Increase
mask_featherif the transition is conspicuous, and useinvert_maskwhen the selected and protected areas are reversed. - Check the output
maskalongside the image. It shows where the final brightness or saturation changed, which is useful for spotting unexpectedly strong adjustments.
Texture Delight Common Errors and Solutions:
Invalid JSON in settings_json
- Explanation: A malformed JSON string cannot reliably be read as processing settings. The exact error message depends on the settings parser, whose implementation is not included in the provided source.
- Solution: Check that the text is a JSON object with double-quoted keys, commas between entries, and no trailing comma. Use
trueorfalseforinvert_mask, not quoted text.
Invalid value for a setting
- Explanation: A setting supplied in the wrong form, such as a word where a number is expected, may be rejected by the settings parser. Its exact validation message is not shown in the provided source.
- Solution: Use numeric values for the seven numeric settings and a JSON boolean for
invert_mask. Check the limits listed undersettings_json.
image is missing or incompatible
- Explanation: The node requires an
IMAGEinput. If none is connected, or the supplied data cannot be handled as an image batch, processing cannot complete; the precise message depends on the host and image-conversion helper. - Solution: Connect an image-producing node to
imageand confirm that its output is anIMAGE, not aMASKor string.
mask has an incompatible shape or batch
- Explanation: The optional mask is converted to match the image’s batch, height, and width. A mask the conversion helper cannot accommodate may cause an error; the provided source does not establish its exact message or resizing behavior.
- Solution: Try a mask made for the same image dimensions and batch, or disconnect the mask to check whether it is the cause.
Output looks too flat or loses visible texture
- Explanation: Strong lighting correction can reduce brightness variation that also helps define the material. This may be an unwanted result rather than a software error.
- Solution: Lower
flatten_strength,shadow_lift, orhighlight_compressas appropriate. Raisedetail_preserveand compare fine details with the original.
Masked area appears opposite to what you intended
- Explanation:
invert_maskreverses which areas receive the effect. A dark or light selection may therefore behave differently from your expectation. - Solution: Switch
invert_maskbetweenfalseandtrue, then inspect both the processedimageand the adjustmentmask.
mask_coverage does not match the visible change
- Explanation: The percentage in
delight_infomeasures the average effect mask after mask processing. It does not measure the strength or area of visible correction. - Solution: Use the output
maskto inspect actual adjustments, and usemask_coverageonly to understand how broadly the effect was permitted.
