Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I am very interested in this answer as well, since I am trying to replicate the Photoshop Layer Styles in my open source project:</p> <p><a href="https://github.com/vinniefalco/LayerEffects" rel="noreferrer">https://github.com/vinniefalco/LayerEffects</a></p> <p>This is what I know:</p> <ul> <li><p>Drop Shadow and Inner Shadow are duals of each other. Adding a drop shadow on a layer is the same as adding an Inner Shadow to a layer with an inverted mask.</p></li> <li><p>Outer Glow with Technique set to "Precise" calculates a Euclidean Distance Transform (EDT) with a Chamfer metric.</p></li> <li><p>Stroke set to Gradient, "Shape Burst" uses an identical EDT.</p></li> <li><p>Outer Glow with Technique set to "Softer" uses some unknown transform identical to the one used for Drop Shadow.</p></li> </ul> <p>Since the distance transform plays a key role in almost every Photoshop Layer Style, it might be reasonable to assume that the unknown transform in Drop Shadow is a variation of the EDT. The only other variation I have been able to find is called the "Gaussian Distance Transform" (GDT). Unfortunately there is only one description of it, in the book "2-D and 3-D Image Registration for Medical, Remote Sensing, and Industrial Applications." The PDF is available:</p> <p><a href="http://read.pudn.com/downloads85/ebook/327739/Wiley%5B1%5D.Interscience.2-D.and.3-D.Image.Registration.for.Medical.Remote.Sensing.and.Industrial.Applications.pdf" rel="noreferrer">http://read.pudn.com/downloads85/ebook/327739/Wiley%5B1%5D.Interscience.2-D.and.3-D.Image.Registration.for.Medical.Remote.Sensing.and.Industrial.Applications.pdf</a></p> <p>Here's the description of the GDT:</p> <p><em>If we convolve an image with a monotonically increasing radial function, an image will be obtained that functions like a distance transform image. The inverse of a Gaussian may be used as the monotonically increasing radial function. Therefore, to obtain the distance transform of an image, the image is convolved with a Gaussian and the intensities of the convolved image are inverted. Computation of the distance transform in this manner makes the obtained distances less sensitive to noise. This is demonstrated in an example in Fig.4.6. Figures4.6a and 4.6b show distance transforms of images4.5a and 4.5b, respectively, computed by Gaussian convolution. Compared to the Euclidean distance transform, the distance transform computed by Gaussian convolution is less sensitive to noise.</em></p> <p>Given this image:</p> <p><a href="http://www.imgfsr.com/sitebuilder/images/fig4.5a-256x256.png" rel="noreferrer">Before http://www.imgfsr.com/sitebuilder/images/fig4.5a-256x256.png</a></p> <p>Here's the signed Euclidean Distance Transform and the signed Gaussian Distance Transform:</p> <p><a href="http://www.imgfsr.com/sitebuilder/images/fig4.5c-256x256.png" rel="noreferrer">EDT http://www.imgfsr.com/sitebuilder/images/fig4.5c-256x256.png</a> <a href="http://www.imgfsr.com/sitebuilder/images/fig4.5e-256x256.png" rel="noreferrer">GDT http://www.imgfsr.com/sitebuilder/images/fig4.5e-256x256.png</a></p> <p>(Images from <a href="http://www.imgfsr.com/ifsr_dtg.html" rel="noreferrer">http://www.imgfsr.com/ifsr_dtg.html</a>)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload