2011

##### Substance Designer - Technical Support - Re: Median/Dust and Scratches Node?

**on:**July 03, 2013, 06:42:40 pm

It's feasible to do a 3x3 median filter, although the result is probably going to be slow compared to Photoshop's filter. The basic idea is to use an FxMap that draws square patterns the size of a pixel. The color of each pattern should be decided by a function graph which reads all colors in the 3x3 neighbourhood and computes the median. You can read pixel values from an FxMap input in a function graph using the Sample node.

In theory, you could do a median filter of any fixed size (5x5, 7x7, etc.) but anything larger than 3x3 is going to be tedious to plug because the size of the comparison network necessary to compute the median grows with the amount of pixels to compare.

In theory, you could do a median filter of any fixed size (5x5, 7x7, etc.) but anything larger than 3x3 is going to be tedious to plug because the size of the comparison network necessary to compute the median grows with the amount of pixels to compare.