What is the difference between the Dilate/Erode nodes Step and Distance modes? I can tell they are doing different things, but I'm interested in the technical details and the documentation does not cover it.


In Step and Distance mode, the Erode/Dilate node samples through all pixels and compares their value to the neighbouring pixels. If a neighbouring pixel has a lesser value, than it is matched the sample pixels value.

The following pseudo python shall demonstrate.

FOREACH a OF allPixels:
        IF (a > b):
            b = a

In Step mode, the adjacent pixels are right, top, left, bottom.

dilate step mode

In Distance mode, the adjacent pixels include diagonal connections.

dilate distance mode

Here is a comparison of an example.

dilate step distance mode

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.