Clean Color Edges
Clean Color Edges turns the wavy, speckled borders an AI-generated texture puts between two colors into clean lines, and lets you choose how soft each line is. It moves the border itself rather than sharpening it, so the rest of the texture stays exactly as it was. Use it for the bands on a pillar, the line between paint and bare wood, or a trim stripe that came out ragged.
Inputs
Section titled “Inputs”A textured mesh: an imported model, or one painted upstream.
Outputs
Section titled “Outputs”The same mesh with its color borders cleaned in every textured channel.
Parameters
Section titled “Parameters”| Parameter | What it does | Default |
|---|---|---|
Apply to | Which faces get cleaned: Everywhere, or a named selection. Invert flips the choice. | Everywhere |
Straighten | Border wiggles shorter than this are flattened out. Raise it until the border looks clean. | 5 cm |
Edge softness | How wide the blend between two colors is. 0 is Auto: the crispest line the texture can show without stair-steps. | 0 cm |
Direction | Any cleans every border alike. Around X, Y or Z turns every border that runs round that axis into a level ring (pillar bands, trim lines) and leaves borders running along the axis alone. Options: Any, Around X, Around Y, Around Z, Custom axis | Any |
Axis | The axis the borders are levelled round. Shown when Direction is Custom axis. | 0, 1, 0 |
Min contrast | How different two colors must be for the border between them to be cleaned. Raise it if soft shading gets hard lines; lower it if a faint border is skipped. | 0.08 |
How it works
Section titled “How it works”The node sorts the texture’s colors into fine groups and smooths each group over the model’s surface, the way you would blur a mask. At every border it works out which two colors meet there, even two close shades like light and dark orange, so there is no color count to set. Short wiggles along the border average out, and the line is redrawn where the two smoothed sides meet. The strip along the new line is repainted from the texture just beside it on each side, so it shows the real colors of both sides instead of the smeared in-between ones.
Edge softness 0 is Auto: about two texels wide, the crispest line the texture can show without stair-steps. For a hard, texel-sharp line, set a softness smaller than one texel.
Because it works on the 3D surface, it doesn’t matter how the texture is cut up: an AI model’s texture is often split into thousands of small pieces, and a border runs straight across all of them. Every textured channel (color, roughness and metal, glow) moves together, so they stay lined up.
Only real borders change. Smooth shading has no sudden step between colors, so it is left alone, even where it runs through several shades; raise Min contrast if a faint border you want kept soft gets cleaned.
Level rings with Direction
Section titled “Level rings with Direction”Smoothing can only remove wiggles shorter than Straighten. The bands of an AI pillar also drift slowly up and down as they go round it, so they still aren’t level. Set Direction to Around Y (or X, Z, or a Custom axis) and every border that runs round that axis becomes one level ring:
- The node finds the height that best separates the two colors all the way round, and slides the texture along the axis so the border lands exactly on it. The texture’s own detail and shading move with the line, nothing is repainted flat.
- Short bumps along the border, shorter than about Straighten, are redrawn in a thin strip at the line from the texture just above and below it. Edge softness sets how soft that line is.
- Borders running along the axis, corners and smooth shading keep their pixels exactly. A border that wanders farther than Straighten from its level isn’t treated as a ring.
Use Apply to to level one part at a time: rings are found by height over everything the node cleans. On the Sharpen Test pillar, Around Y with Straighten 3 cm takes the top joint from 12 pixels of drift round the pillar to within one pixel; 5–10 cm also redraws the wider dark bumps along each joint.
On an AI-generated model
Section titled “On an AI-generated model”A line can’t come out cleaner than the texture’s own pixels. An AI model’s texture is shared by the whole model, so one part often gets only a few pixels per centimeter, and its borders look blocky however they are cleaned. Give the part its own texture first: Auto Unwrap and then Bake at 2048 gives it about ten times more pixels, and Clean Color Edges then draws crisp, straight lines. The AI mesh cleanup template does exactly that: its Game-Ready Mesh step unwraps and bakes, and Clean Color Edges runs right after it.
See also
Section titled “See also”- AI mesh cleanup: the template that bakes a fresh texture and then cleans it.
- Import: bring in the textured model to clean.
- Bake: move the cleaned texture onto a new, game-ready mesh.
- Paint Masked: paint over the cleaned texture.
- Texture nodes: the other nodes that unwrap, paint and bake.